From 0552ef815c96912fec58f26e7bdca758943db421 Mon Sep 17 00:00:00 2001 From: "Brian Moore (AZURE RESOURCE MANAGER)" Date: Mon, 14 May 2018 20:21:48 -0500 Subject: [PATCH] added location parameters --- 101-1vm-2nics-2subnets-1vnet/azuredeploy.json | 445 +-- .../azuredeploy.json | 406 +-- 101-aci-dynamicsnav/azuredeploy.json | 288 +- .../azuredeploy.json | 137 +- 101-aci-storage-file-share/azuredeploy.json | 217 +- 101-acs-dcos/azuredeploy.json | 96 +- 101-acs-kubernetes/azuredeploy.json | 19 +- 101-acs-swarm/azuredeploy.json | 96 +- 101-acsengine-swarmmode/azuredeploy.json | 4 +- .../azuredeploy.json | 125 +- .../azuredeploy.json | 259 +- .../azuredeploy.json | 259 +- .../azuredeploy.json | 13 +- .../azuredeploy.json | 15 +- .../azuredeploy.json | 15 +- .../azuredeploy.json | 15 +- 101-application-gateway-waf/azuredeploy.json | 15 +- 101-automation-configuration/azuredeploy.json | 2 +- .../nested/provisionDNS.json | 5 +- .../nested/provisionNetwork.json | 3 +- .../nested/provisionServer.json | 24 +- .../azuredeploy.json | 12 +- .../azuredeploy.json | 125 +- 101-azure-dns-new-zone/azuredeploy.json | 9 +- .../azuredeploy.json | 11 +- 101-azure-search-create/azuredeploy.json | 11 +- 101-backup-vault-create/azuredeploy.json | 9 +- .../azuredeploy.json | 14 +- 101-cdn-with-custom-origin/azuredeploy.json | 14 +- 101-container-registry/azuredeploy.json | 13 +- .../azuredeploy.json | 11 +- .../azuredeploy.json | 15 +- .../azuredeploy.json | 14 +- 101-create-ase-with-webapp/azuredeploy.json | 23 +- .../azuredeploy.json | 11 +- .../azuredeploy.json | 707 ++--- .../azuredeploy.json | 415 +-- .../azuredeploy.json | 424 +-- .../azuredeploy.json | 427 +-- .../prereqs/prereq.azuredeploy.json | 205 +- .../prereqs/prereq.azuredeploy.json | 71 +- .../azuredeploy.json | 272 +- .../prereqs/prereq.azuredeploy.json | 219 +- .../prereqs/prereq.azuredeploy.json | 53 +- .../azuredeploy.json | 14 +- 101-databricks-workspace/azuredeploy.json | 14 +- .../azuredeploy.json | 11 +- .../azuredeploy.json | 13 +- 101-dtl-create-lab/azuredeploy.json | 9 +- .../azuredeploy.json | 151 +- .../azuredeploy.json | 225 +- .../azuredeploy.json | 185 +- .../azuredeploy.json | 27 +- 101-hdinsight-hbase-linux/azuredeploy.json | 23 +- .../azuredeploy.json | 146 +- .../azuredeploy.json | 55 +- .../azuredeploy.json | 71 +- .../azuredeploy.json | 104 +- 101-hdinsight-kafka/azuredeploy.json | 20 +- .../azuredeploy.json | 80 +- .../prereqs/prereq.azuredeploy.json | 271 +- .../azuredeploy.json | 128 +- .../azuredeploy.json | 14 +- .../prereqs/prereq.azuredeploy.json | 297 +- .../azuredeploy.json | 16 +- .../azuredeploy.json | 103 +- .../azuredeploy.json | 175 +- .../azuredeploy.json | 209 +- .../azuredeploy.json | 63 +- 101-hdinsight-rserver/azuredeploy.json | 129 +- 101-hdinsight-secure-vnet/azuredeploy.json | 439 +-- .../azuredeploy.json | 158 +- 101-hdinsight-spark-linux/azuredeploy.json | 259 +- .../azuredeploy.json | 445 +-- .../azuredeploy.json | 381 +-- .../azuredeploy.json | 22 +- .../azuredeploy.json | 13 +- .../azuredeploy.json | 22 +- 101-jenkins/azuredeploy.json | 22 +- 101-key-vault-create/azuredeploy.json | 19 +- .../azuredeploy.json | 24 +- .../azuredeploy.json | 22 +- .../azuredeploy.json | 19 +- 101-logic-app-create/azuredeploy.json | 9 +- 101-logic-app-ftp-to-blob/azuredeploy.json | 22 +- 101-logic-app-sendgrid/azuredeploy.json | 24 +- 101-logic-app-sql-proc/azuredeploy.json | 30 +- 101-media-services-create/azuredeploy.json | 13 +- 101-mobile-app-create/azuredeploy.json | 25 +- .../azuredeploy.json | 108 +- .../nested/VMtemplate.json | 41 +- 101-nic-publicip-dns-vnet/azuredeploy.json | 18 +- 101-powerbi-workspace-create/azuredeploy.json | 11 +- .../azuredeploy.json | 7 + .../prereqs/prereq.azuredeploy.json | 15 +- .../azuredeploy.json | 107 +- .../azuredeploy.json | 13 +- .../azuredeploy.json | 25 +- .../azuredeploy.json | 288 +- .../azuredeploy.json | 14 +- .../azuredeploy.json | 324 +- .../prereqs/prereq.azuredeploy.json | 64 +- 101-security-group-create/azuredeploy.json | 13 +- .../azuredeploy.json | 11 +- 101-servicebus-namespace/azuredeploy.json | 15 +- 101-servicebus-pn-ar/azuredeploy.json | 171 +- 101-servicebus-queue/azuredeploy.json | 11 +- .../azuredeploy.json | 147 +- .../azuredeploy.json | 11 +- 101-servicebus-topic/azuredeploy.json | 15 +- 101-spinnaker-existing-vnet/azuredeploy.json | 19 +- .../prereqs/prereq.azuredeploy.json | 104 +- 101-spinnaker/azuredeploy.json | 21 +- 101-sql-elastic-pool-create/azuredeploy.json | 283 +- 101-sql-with-failover-group/azuredeploy.json | 243 +- 101-storage-account-create/azuredeploy.json | 24 +- 101-subnet-add-vnet-existing/azuredeploy.json | 11 +- .../prereqs/prereq.azuredeploy.json | 7 +- .../azuredeploy.json | 23 +- .../azuredeploy.json | 13 +- 101-vm-automatic-static-ip/azuredeploy.json | 17 +- .../nested/update-nic.json | 30 +- 101-vm-customdata/azuredeploy.json | 20 +- 101-vm-from-user-image/azuredeploy.json | 15 +- 101-vm-from-user-image/newvnet.json | 16 +- .../prereqs/prereq.azuredeploy.json | 72 +- .../azuredeploy.json | 9 +- .../azuredeploy.json | 9 +- 101-vm-linux-serial-output/azuredeploy.json | 21 +- 101-vm-multiple-data-disk/azuredeploy.json | 20 +- 101-vm-multiple-ipconfig/azuredeploy.json | 17 +- 101-vm-secure-password/azuredeploy.json | 20 +- 101-vm-simple-freebsd/azuredeploy.json | 17 +- .../azuredeploy.json | 30 +- 101-vm-simple-linux/azuredeploy.json | 19 +- 101-vm-simple-rhel-unmanaged/azuredeploy.json | 19 +- 101-vm-simple-rhel/azuredeploy.json | 19 +- 101-vm-simple-windows/azuredeploy.json | 17 +- .../azuredeploy.json | 181 +- .../prereqs/prereq.azuredeploy.json | 513 ++-- .../azuredeploy.json | 205 +- .../prereqs/prereq.azuredeploy.json | 475 +-- .../azuredeploy.json | 129 +- 101-vm-tags/azuredeploy.json | 22 +- 101-vm-user-image-data-disks/azuredeploy.json | 17 +- 101-vm-user-image-data-disks/newvnet.json | 16 +- .../azuredeploy.json | 17 +- .../azuredeploy.json | 47 +- .../nested/noIncomingRemote.json | 32 +- .../nested/yesIncomingRemote.json | 42 +- 101-vm-with-rdp-port/azuredeploy.json | 24 +- .../azuredeploy.json | 5 +- .../nested/IRInstall.json | 80 +- .../nested/V1IRtemplate.json | 54 +- .../nested/V2IRtemplate.json | 54 +- .../nested/VMtemplate.json | 27 +- .../prereqs/prereq.azuredeploy.json | 9 +- 101-vnet-two-subnets/azuredeploy.json | 15 +- 101-vsts-cloudloadtest-rig/azuredeploy.json | 505 ++-- .../azuredeploy.json | 17 +- .../azuredeploy.json | 329 ++- .../azuredeploy.json | 351 +-- 101-webapp-managed-mysql/azuredeploy.json | 355 +-- .../azuredeploy.json | 359 +-- 101-webapp-with-golang/azuredeploy.json | 13 +- .../azuredeploy.json | 4 +- .../azuredeploy.json | 19 +- .../azuredeploy.json | 9 +- .../azuredeploy.json | 9 +- .../azuredeploy.json | 9 +- 201-aci-udp/azuredeploy.json | 209 +- 201-aci-wordpress/azuredeploy.json | 485 +-- .../azuredeploy.json | 27 +- .../azuredeploy.json | 385 +-- .../azuredeploy.json | 338 +-- .../azuredeploy.json | 847 +++--- .../azuredeploy.json | 273 +- .../azuredeploy.json | 313 +- .../update-apim-with-keyvaultssl.json | 163 +- .../azuredeploy.json | 161 +- .../azuredeploy.json | 181 +- .../azuredeploy.json | 329 ++- 201-api-management-create/azuredeploy.json | 119 +- .../azuredeploy.json | 233 +- .../azuredeploy.json | 42 +- .../azuredeploy.json | 15 +- .../azuredeploy.json | 21 +- .../azuredeploy.json | 25 +- .../azuredeploy.json | 15 +- .../azuredeploy.json | 15 +- .../azuredeploy.json | 15 +- .../azuredeploy.json | 21 +- .../azuredeploy.json | 35 +- .../azuredeploy.json | 487 +-- .../azuredeploy.json | 13 +- .../azuredeploy.json | 13 +- .../azuredeploy.json | 13 +- 201-cdn-customize/azuredeploy.json | 13 +- 201-cdn-with-storage-account/azuredeploy.json | 26 +- 201-cdn-with-web-app/azuredeploy.json | 20 +- .../CreateEncryptedManagedDisk-kek.json | 12 +- .../CreateEncryptedManagedDisk-nokek.json | 12 +- .../azuredeploy.json | 22 +- .../azuredeploy.json | 24 +- .../azuredeploy.json | 591 ++-- .../prereqs/prereq.azuredeploy.json | 260 +- 201-decrypt-running-linux-vm/azuredeploy.json | 11 +- .../updateEncryptionSettings.json | 55 +- .../azuredeploy.json | 13 +- .../prereqs/prereq.azuredeploy.json | 33 +- .../azuredeploy.json | 11 +- .../updateEncryptionSettings-All.json | 55 +- .../updateEncryptionSettings-Data.json | 53 +- .../updateEncryptionSettings-OS.json | 55 +- .../azuredeploy.json | 19 +- .../install-mongo.json | 9 +- .../azuredeploy.json | 35 +- 201-documentdb-webapp/azuredeploy.json | 203 +- .../azuredeploy.json | 22 +- .../azuredeploy.json | 22 +- 201-dynamic-web-tests/azuredeploy.json | 21 +- .../azuredeploy.json | 18 +- .../azuredeploy.json | 21 +- .../azuredeploy.json | 338 +-- .../setupvm-kek.json | 221 +- .../setupvm-nokek.json | 213 +- 201-encrypt-running-linux-vm/azuredeploy.json | 21 +- .../updatevm-kek.json | 115 +- .../updatevm-nokek.json | 103 +- .../azuredeploy.json | 9 +- .../updatevm-kek.json | 115 +- .../updatevm-nokek.json | 103 +- .../azuredeploy.json | 27 +- .../prereqs/prereq.azuredeploy.json | 15 +- .../azuredeploy.json | 9 +- .../updatevm-kek.json | 115 +- .../updatevm-nokek.json | 103 +- .../azuredeploy.json | 15 +- .../azuredeploy.json | 80 +- .../azuredeploy.json | 4 +- .../azuredeploy.json | 12 +- .../azuredeploy.json | 12 +- .../azuredeploy.json | 48 +- .../azuredeploy.json | 257 +- .../prereqs/prereq.azuredeploy.json | 103 +- .../azuredeploy.json | 287 +- .../azuredeploy.json | 6 +- .../azuredeploy.json | 157 +- 201-jenkins-acr/azuredeploy.json | 26 +- 201-key-vault-secret-create/azuredeploy.json | 203 +- .../azuredeploy.json | 339 +-- .../azuredeploy.json | 1401 ++++----- 201-logic-app-custom-api/azuredeploy.json | 319 +- .../azuredeploy.json | 93 +- .../prereqs/prereq.azuredeploy.json | 17 +- .../prereqs/prereq.azuredeploy.json | 107 +- 201-nsg-dmz-in-vnet/azuredeploy.json | 15 +- 201-oms-extension-ubuntu-vm/azuredeploy.json | 21 +- 201-oms-extension-windows-vm/azuredeploy.json | 21 +- .../prereqs/prereq.azuredeploy.json | 56 +- .../azuredeploy.json | 23 +- .../prereqs/prereq.azuredeploy.json | 72 +- .../azuredeploy.json | 17 +- .../azuredeploy.json | 113 +- .../prereqs/prereq.azuredeploy.json | 65 +- .../prereqs/prereq.azuredeploy.json | 121 +- .../prereqs/prereq.azuredeploy.json | 148 +- 201-reserved-ip/azuredeploy.json | 273 +- .../prereqs/prereq.azuredeploy.json | 82 +- 201-servicebus-create-queue/azuredeploy.json | 13 +- .../azuredeploy.json | 13 +- .../azuredeploy.json | 13 +- 201-spinnaker-acr-k8s/azuredeploy.json | 27 +- .../azuredeploy.json | 15 +- .../azuredeploy.json | 11 +- .../azuredeploy.json | 35 +- .../azuredeploy.json | 25 +- 201-vm-copy-index-loops/azuredeploy.json | 25 +- 201-vm-copy-managed-disks/azuredeploy.json | 30 +- .../azuredeploy.json | 30 +- 201-vm-custom-script-windows/azuredeploy.json | 329 ++- .../azuredeploy.json | 19 +- 201-vm-different-rg-vnet/azuredeploy.json | 15 +- .../prereqs/prereq.azuredeploy.json | 102 +- 201-vm-domain-join-existing/azuredeploy.json | 145 +- 201-vm-domain-join/azuredeploy.json | 17 +- .../azuredeploy.json | 35 +- 201-vm-efficientip-vhd/azuredeploy.json | 38 +- .../prereqs/prereq.azuredeploy.json | 164 +- .../azuredeploy.json | 26 +- .../azuredeploy.json | 21 +- .../prereqs/prereq.azuredeploy.json | 70 +- 201-vm-msi-linux-terraform/azuredeploy.json | 32 +- .../nestedtemplates/createVM.json | 55 +- .../nestedtemplates/setUpRBAC.json | 4 +- .../nestedtemplates/createVM.json | 17 +- .../nestedtemplates/setUpRBAC.json | 4 +- .../azuredeploy.json | 6 +- .../azuredeploy.json | 19 +- .../prereqs/prereq.azuredeploy.json | 100 +- .../azuredeploy.json | 15 +- .../azuredeploy.json | 18 +- .../prereqs/prereq.azuredeploy.json | 100 +- 201-vm-specialized-vhd/azuredeploy.json | 20 +- 201-vm-sql-full-autobackup/azuredeploy.json | 25 +- .../nested/preparingSqlServerSa.json | 167 +- 201-vm-sql-full-autopatching/azuredeploy.json | 23 +- .../nested/preparingSqlServerSa.json | 167 +- 201-vm-sql-full-keyvault/azuredeploy.json | 37 +- .../nested/preparingSqlServerSa.json | 167 +- 201-vm-vsts-agent/azuredeploy.json | 562 ++-- 201-vm-win-iis-app-ssl/azuredeploy.json | 38 +- 201-vm-winrm-windows/azuredeploy.json | 19 +- 201-vmaccess-on-ubuntu/azuredeploy.json | 22 +- 201-vmss-automation-dsc/azuredeploy.json | 27 +- .../azuredeploy.json | 13 +- .../prereqs/prereq.azuredeploy.json | 104 +- .../azuredeploy.json | 65 +- .../nestedtemplates/createVMSS.json | 18 +- .../nestedtemplates/setUpRBAC.json | 4 +- .../nestedtemplates/createVMSS.json | 18 +- .../nestedtemplates/setUpRBAC.json | 4 +- 201-vmss-ubuntu-web-gitpull/azuredeploy.json | 15 +- 201-vmss-ubuntu-web-ssl/azuredeploy.json | 15 +- 201-vmss-win-iis-app-ssl/azuredeploy.json | 43 +- .../templates/storageaccount.json | 11 +- .../azuredeploy.json | 17 +- .../azuredeploy.json | 462 +-- .../azuredeploy.json | 446 +-- .../prereqs/prereq.azuredeploy.json | 91 +- .../prereqs/prereq.azuredeploy.json | 90 +- .../prereqs/prereq.azuredeploy.json | 92 +- .../prereqs/prereq.azuredeploy.json | 92 +- .../prereqs/prereq.azuredeploy.json | 4 +- 201-web-app-blob-connection/azuredeploy.json | 176 +- .../prereqs/prereq.azuredeploy.json | 66 +- .../azuredeploy.json | 163 +- 201-web-app-github-deploy/azuredeploy.json | 11 +- 201-web-app-java-tomcat/azuredeploy.json | 197 +- 201-web-app-python/azuredeploy.json | 191 +- .../azuredeploy.json | 47 +- 201-web-app-sql-database/azuredeploy.json | 36 +- 201-web-app-with-redis-cache/azuredeploy.json | 17 +- 201-zerto-zca/azuredeploy.json | 427 +-- 301-2fe-lb80-rdp-1be-nsg-rdp/azuredeploy.json | 34 +- .../azuredeploy.json | 35 +- .../azuredeploy.json | 11 +- .../azuredeploy.json | 13 +- .../azuredeploy.json | 42 +- .../nested/CreateAndPrepnewVM.json | 24 +- .../nested/configureADNextDC.json | 7 +- .../nested/createChildDomain.json | 9 +- .../nested/createForest.json | 9 +- .../nested/vnet-with-dns-server.json | 9 +- .../nested/vnet.json | 9 +- 301-custom-images-at-scale/download.json | 9 +- 301-custom-images-at-scale/upload.json | 9 +- 301-dmz-nsg/azuredeploy.json | 29 +- 301-dns-forwarder/azuredeploy.json | 13 +- .../nested/mysql-resources_no.json | 438 ++- .../nested/mysql-resources_yes.json | 5 +- .../azuredeploy.json | 38 +- .../azuredeploy.json | 17 +- .../azuredeploy.json | 13 +- .../azuredeploy.json | 29 +- .../azuredeploy.json | 21 +- .../azuredeploy.json | 29 +- 301-jenkins-vmss-blue-green/azuredeploy.json | 1161 ++++---- 301-multi-tier-loadbalancing/azuredeploy.json | 41 +- .../azuredeploy.json | 48 +- .../azuredeploy.json | 220 +- .../nestedtemplates/deploy-s2d-cluster.json | 597 ++-- .../nestedtemplates/newVM.json | 235 +- .../nestedtemplates/deploy-s2d-cluster.json | 661 +++-- .../nestedtemplates/newVM.json | 255 +- 301-subnet-driven-deployment/AVSet.json | 17 +- 301-subnet-driven-deployment/ConfigDC.json | 17 +- 301-subnet-driven-deployment/LabSubnet.json | 16 +- 301-subnet-driven-deployment/SetVNetDNS.json | 4 +- 301-subnet-driven-deployment/Storage.json | 9 +- 301-subnet-driven-deployment/WinServ.json | 20 +- 301-subnet-driven-deployment/azuredeploy.json | 346 ++- .../confDomainMember.json | 14 +- .../azuredeploy.json | 51 +- .../nested/preparingSqlServerSa.json | 167 +- 301-web-app-sql-docdb-search/azuredeploy.json | 64 +- .../03-Static-public-IP/azuredeploy.json | 241 +- IaaS-Story/11-MultiNIC/azuredeploy.json | 301 +- IaaS-Story/11-MultiNIC/prerequisites.json | 690 ++--- .../nestedtemplates/configureADBDC.json | 33 +- .../nestedtemplates/nic.json | 9 +- .../nestedtemplates/vnet-with-dns-server.json | 9 +- .../nestedtemplates/vnet.json | 9 +- .../azuredeploy.json | 38 +- .../nestedtemplates/configureADBDC.json | 5 +- .../nestedtemplates/nic.json | 9 +- .../nestedtemplates/vnet-with-dns-server.json | 9 +- .../nestedtemplates/vnet.json | 9 +- active-directory-new-domain/azuredeploy.json | 23 +- .../nestedtemplates/vnet-with-dns-server.json | 11 +- .../nestedtemplates/vnet.json | 11 +- ansible-advancedlinux/azuredeploy.json | 32 +- ansible-tower-rhel/azuredeploy.json | 841 +++--- .../azuredeploy.json | 19 +- apache2-on-ubuntu-vm/azuredeploy.json | 19 +- .../azuredeploy.json | 13 +- asr-oms-monitoring/azuredeploy.json | 41 +- azmgmt-demo/nestedtemplates/drEnablement.json | 528 ++-- .../nestedtemplates/managedLinuxBackup.json | 100 +- azmgmt-demo/nestedtemplates/managedVms.json | 775 ++--- .../nestedtemplates/managedVmsBackup.json | 122 +- .../azuredeploy.json | 39 +- .../OMSAutomationRunbooksDashboard.json | 6 +- .../deployRunbookOnSchedule.json | 14 +- .../nested/OMSCommon/OMSCommon.json | 9 +- .../nestedtemplates/Automation.json | 13 +- barracuda-waf-iis/azuredeploy.json | 1235 ++++---- bitcore-centos-vm/azuredeploy.json | 21 +- blockchain/azuredeploy.json | 41 +- bootstorm-vm-boot-time/azuredeploy.json | 15 +- bosh-setup/azuredeploy.json | 32 +- centos-2nics-lb-cluster/azuredeploy.json | 25 +- centos-singularity/azuredeploy.json | 35 +- chef-automate-ha/azuredeploy.json | 17 +- ...fe-be-virtualmachines-with-extensions.json | 1219 ++++---- ...e-be-virtualmachines-with-extensions1.json | 1097 +++---- .../azuredeploy.json | 43 +- cisco-csr-1000v-4-nic/azuredeploy.json | 925 +++--- .../azuredeploy.json | 871 +++--- .../azuredeploy.json | 555 ++-- cisco-csr-1000v/azuredeploy.json | 579 ++-- .../nested/storage.json | 4 +- .../director-node-and-shared-resources.json | 47 +- .../prepare-conf-launch-cluster.json | 25 +- .../shared-resources-new-vnet.json | 13 +- .../update-new-vnet-dns.json | 13 +- cloudera-on-centos/data-node-ds13.json | 21 +- cloudera-on-centos/data-node-ds14.json | 21 +- cloudera-on-centos/master-node.json | 21 +- cloudera-on-centos/setup-cloudera.json | 11 +- .../shared-resources-existing-vnet.json | 15 +- .../shared-resources-new-vnet.json | 17 +- cloudera-on-centos/vm-10-datadisks.json | 21 +- cloudera-on-centos/vm-5-datadisks.json | 21 +- cloudera-tableau/nested/data-node-ds13.json | 21 +- cloudera-tableau/nested/data-node-ds14.json | 21 +- cloudera-tableau/nested/master-node.json | 21 +- cloudera-tableau/nested/setup-cloudera.json | 11 +- .../shared-resources-existing-vnet.json | 17 +- .../nested/shared-resources-new-vnet.json | 19 +- cloudera-tableau/nested/tableau-server.json | 17 +- concourse-ci/azuredeploy.json | 36 +- consul-on-ubuntu/azuredeploy.json | 29 +- coreos-with-fleet-multivm/azuredeploy.json | 18 +- coscale-dev-env/azuredeploy.json | 33 +- .../azuredeploy.json | 20 +- .../customnode-rdma-disabled.json | 15 +- .../customnode-rdma-enabled.json | 17 +- create-hpc-cluster-linux-cn/azuredeploy.json | 13 +- create-hpc-cluster/azuredeploy.json | 11 +- .../headnode-rdma-disabled.json | 13 +- create-hpc-cluster/headnode-rdma-enabled.json | 15 +- create-hpc-cluster/linuxnode.json | 15 +- create-hpc-cluster/mainTemplate.json | 21 +- create-hpc-cluster/publicip-existing.json | 11 +- create-hpc-cluster/publicip-new.json | 11 +- create-hpc-cluster/vnet-with-dns-server.json | 11 +- .../windowsnode-rdma-disabled.json | 15 +- .../windowsnode-rdma-enabled.json | 17 +- custom-private-dns/azuredeploy.json | 531 ++-- custom-private-dns/nested/genericvm.json | 78 +- .../nested/linux-client/setuplinuxclient.json | 102 +- .../nested/server/setupserver.json | 127 +- .../nested/windows-client/setupwinclient.json | 113 +- .../azuredeploy.json | 26 +- .../nested/datameer-hdinsight.json | 19 +- .../orchestrator-server-setup-trend.json | 11 +- .../nested/trendp2p-chefnodes.json | 4 +- .../nested/trendp2p-chefserver.json | 4 +- .../nested/trendp2p-dsagents.json | 4 +- .../nested/trendp2p-orchestrator.json | 4 +- .../nested/trendp2p-splunkenterprise.json | 5 +- .../nested/trendp2p-trenddsm.json | 4 +- .../nested/trendp2p-vnetstorage.json | 4 +- datastax/azuredeploy.json | 9 +- datastax/nested/nodes.json | 3 +- datastax/nested/opscenter.json | 3 +- diagnostics-eventhub-elk/azuredeploy.json | 821 +++--- diagnostics-with-elk/azuredeploy.json | 819 ++--- diskraid-ubuntu-vm/azuredeploy.json | 22 +- django-app/azuredeploy.json | 19 +- dns-records-office365/azuredeploy.json | 156 +- dns-records-office365/mail.json | 143 +- dns-records-office365/mdm.json | 83 +- dns-records-office365/sfb.json | 191 +- dnx-on-ubuntu/azuredeploy.json | 35 +- docker-ckan/azuredeploy.json | 21 +- docker-kibana-elasticsearch/azuredeploy.json | 21 +- docker-neo4j/azuredeploy.json | 26 +- docker-parse/azuredeploy.json | 24 +- docker-rancher/azuredeploy.json | 10 +- docker-rancher/nodes.json | 28 +- docker-rancher/server.json | 28 +- docker-simple-on-ubuntu/azuredeploy.json | 22 +- docker-swarm-cluster/azuredeploy.json | 51 +- docker-wordpress-mysql/azuredeploy.json | 21 +- dokku-vm/azuredeploy.json | 459 +-- drone-ubuntu-vm/azuredeploy.json | 29 +- .../azuredeploy.json | 354 +-- .../azuredeploy.json | 19 +- dsc-pullserver-to-win-server/azuredeploy.json | 29 +- elasticsearch-centos-3node/azuredeploy.json | 32 +- elasticsearch-jmeter/azuredeploy.json | 29 +- .../prereqs/prereq.azuredeploy.json | 888 +++--- elasticsearch/azuredeploy.json | 75 +- .../client-nodes-resources.json | 17 +- .../data-nodes-0disk-resources.json | 17 +- .../data-nodes-16disk-resources.json | 17 +- .../data-nodes-2disk-resources.json | 17 +- .../data-nodes-4disk-resources.json | 17 +- .../data-nodes-8disk-resources.json | 17 +- .../nestedtemplates/empty-resources.json | 9 +- .../nestedtemplates/jumpbox-resources.json | 17 +- .../nestedtemplates/kibana-resources.json | 19 +- .../marvel-nodes-resources.json | 17 +- .../master-nodes-resources.json | 17 +- .../nestedtemplates/shared-resources.json | 21 +- episerver-cms-in-azure/azuredeploy.json | 639 ++-- eris-platform/azuredeploy.json | 24 +- eset-vm-extension/azuredeploy.json | 19 +- ethereum-cpp-on-ubuntu/azuredeploy.json | 22 +- .../azuredeploy.json | 21 +- glassfish-on-suse/azuredeploy.json | 51 +- .../nestedtemplates/azuredeploy.json | 19 +- gluster-file-system/azuredeploy.json | 27 +- go-ethereum-on-ubuntu/azuredeploy.json | 22 +- go-expanse-on-ubuntu/azuredeploy.json | 21 +- .../azuredeploy.json | 2 +- .../prereqs/prereq.azuredeploy.json | 110 +- hazelcast-vm-cluster/azuredeploy.json | 27 +- hdInsight-apache-spark/azuredeploy.json | 21 +- hdinsight-genomics-adam/azuredeploy.json | 20 +- .../azuredeploy.json | 21 +- iis-2vm-sql-1vm/azuredeploy.json | 37 +- iomad-cluster-ubuntu/azuredeploy.json | 35 +- iomad-singlevm-ubuntu/azuredeploy.json | 21 +- jboss-eap-standalone-rhel7/azuredeploy.json | 49 +- jenkins-cicd-container/azuredeploy.json | 783 ++--- .../azuredeploy.parameters.json | 74 +- jenkins-cicd-container/nested/grafana.json | 25 +- jenkins-cicd-container/nested/jenkins.json | 409 +-- jenkins-cicd-vmss/nested/jenkins.json | 23 +- jenkins-cicd-webapp/azuredeploy.json | 129 +- jenkins-cicd-webapp/nested/jenkins.json | 47 +- jenkins-on-ubuntu/azuredeploy.json | 7 + jenkins-on-ubuntu/jenkmaster-resources.json | 21 +- jenkins-on-ubuntu/jenkslave-resources.json | 17 +- jenkins-on-ubuntu/shared-resources.json | 11 +- kafka-on-ubuntu/azuredeploy.json | 33 +- .../jumpbox-resources-enabled.json | 15 +- kafka-on-ubuntu/shared-resources.json | 13 +- kafka-ubuntu-multidisks/azuredeploy.json | 7 + .../datastore-16disk-resources.json | 21 +- .../datastore-2disk-resources.json | 20 +- .../datastore-8disk-resources.json | 20 +- .../jumpbox-resources.json | 14 +- kafka-ubuntu-multidisks/shared-resources.json | 13 +- .../zookeeper-resources.json | 14 +- kemp-loadmaster-ha-pair/azuredeploy.json | 698 ++--- kemp-loadmaster-multinic/azuredeploy.json | 400 +-- lamp-app/azuredeploy.json | 24 +- lap-mysql-ubuntu/azuredeploy.json | 9 +- lap-mysql-ubuntu/lamplap-resources.json | 21 +- lap-mysql-ubuntu/lampmysql-resources.json | 17 +- lap-mysql-ubuntu/shared-resources.json | 16 +- lap-neo4j-ubuntu/azuredeploy.json | 10 +- .../nested/lanplap-resources.json | 22 +- .../nested/lanpneo4j-resources.json | 20 +- lap-neo4j-ubuntu/nested/shared-resources.json | 16 +- .../azuredeploy.json | 23 +- .../azuredeploy.json | 23 +- manifold-endpoint/azuredeploy.json | 22 +- matlab-cluster/azuredeploy.json | 328 +- mcafee-extension-windows-vm/azuredeploy.json | 19 +- .../azuredeploy.json | 117 +- memcached-multi-vm-ubuntu/azuredeploy.json | 37 +- minecraft-on-ubuntu/azuredeploy.json | 26 +- .../arbiter-resources.json | 13 +- mongodb-high-availability/azuredeploy.json | 9 +- .../jumpbox-resources.json | 17 +- .../member-resources-D1.json | 13 +- .../member-resources-D11.json | 13 +- .../member-resources-D12.json | 13 +- .../member-resources-D13.json | 13 +- .../member-resources-D14.json | 13 +- .../member-resources-D2.json | 13 +- .../member-resources-D3.json | 13 +- .../member-resources-D4.json | 13 +- .../shared-resources.json | 17 +- .../arbiter-resources.json | 13 +- .../azuredeploy.json | 9 +- .../frontend-resource.json | 18 +- .../jumpbox-resources.json | 17 +- .../member-resources-D1.json | 13 +- .../member-resources-D11.json | 13 +- .../member-resources-D12.json | 13 +- .../member-resources-D13.json | 13 +- .../member-resources-D14.json | 13 +- .../member-resources-D2.json | 13 +- .../member-resources-D3.json | 13 +- .../member-resources-D4.json | 13 +- .../shared-resources.json | 17 +- mongodb-on-centos/azuredeploy.json | 22 +- mongodb-on-ubuntu/azuredeploy.json | 25 +- mongodb-replica-set-centos/azuredeploy.json | 9 +- .../nested/disksSelector.json | 8 +- .../nested/primary-resources.json | 19 +- .../nested/secondary-resources.json | 21 +- .../nested/shared-resources.json | 15 +- mongodb-sharding-centos/azuredeploy.json | 9 +- .../nested/config-primary-resources.json | 18 +- .../nested/config-secondary-resources.json | 18 +- .../nested/disksSelector.json | 8 +- .../nested/replica-primary-resources.json | 20 +- .../nested/replica-secondary-resources.json | 20 +- .../nested/router1-resources.json | 20 +- .../nested/router2-resources.json | 20 +- .../nested/shared-resources.json | 18 +- .../azuredeploy.json | 1364 ++++----- .../nested/controller.json | 423 +-- .../nested/controllerconfig.json | 109 +- .../nested/elastic.json | 714 ++--- .../nested/elasticconfig.json | 179 +- .../nested/gluster.json | 123 +- .../nested/glustervm.json | 333 ++- .../nested/glustervmconfig.json | 113 +- .../nested/mysql.json | 121 +- .../nested/network.json | 437 +-- .../nested/postgres.json | 121 +- .../nested/recoveryservices.json | 189 +- .../nested/recoveryservicesEnlist.json | 81 +- .../nested/storageAccount.json | 93 +- .../nested/webvmss.json | 391 +-- .../azuredeploy.json | 23 +- mysql-ha-pxc/azuredeploy.json | 40 +- mysql-mha-haproxy-ubuntu/azuredeploy.json | 10 +- .../nested/haproxy-resources.json | 22 +- .../nested/master-resources.json | 20 +- .../nested/shared-resources.json | 16 +- .../nested/slave01-resources.json | 20 +- .../nested/slave02-resources.json | 20 +- mysql-replication/azuredeploy.json | 25 +- mysql-replication/vnet-new.json | 12 +- .../azuredeploy.json | 21 +- nagios-on-ubuntu/azuredeploy.json | 23 +- neo4j-ubuntu-vm/azuredeploy.json | 21 +- netapp-ontap-sql/azuredeploy.json | 978 +++--- netapp-ontap-sql/nested/jump-vm.json | 374 +-- .../nested/netapp-oncommand-cloudmanager.json | 56 +- .../nested/netapp-ontap-cloud.json | 189 +- netapp-ontap-sql/nested/shared-resources.json | 321 +- .../nested/sql-netappotc-connect.json | 118 +- netapp-ontap-sql/nested/sql-vm.json | 325 +- .../azuredeploy.json | 24 +- nylas-email-sync-engine/azuredeploy.json | 30 +- .../azuredeploy.json | 26 +- openedx-devstack-ubuntu/azuredeploy.json | 29 +- openedx-fullstack-ubuntu/azuredeploy.json | 26 +- openedx-scalable-ubuntu/azuredeploy.json | 44 +- openjdk-tomcat-ubuntu-vm/azuredeploy.json | 19 +- openldap-cluster-ubuntu/azuredeploy.json | 28 +- openldap-singlevm-ubuntu/azuredeploy.json | 24 +- opensis-cluster-ubuntu/azuredeploy.json | 39 +- opensis-singlevm-ubuntu/azuredeploy.json | 24 +- openvpn-access-server-ubuntu/azuredeploy.json | 146 +- orchard-cms-video-portal/azuredeploy.json | 428 +-- pf-freebsd-setup/azuredeploy.json | 131 +- phabricator-on-ubuntu/azuredeploy.json | 31 +- php_pgsql-freebsd-setup/azuredeploy.json | 43 +- postgresql-on-ubuntu/azuredeploy.json | 9 +- .../database-16disk-resources.json | 14 +- .../database-2disk-resources.json | 14 +- .../database-8disk-resources.json | 14 +- postgresql-on-ubuntu/jumpbox-resources.json | 16 +- postgresql-on-ubuntu/shared-resources.json | 15 +- .../azuredeploy.json | 22 +- pubnub-eventhub-bridge/azuredeploy.json | 11 +- puppet-agent-linux/azuredeploy.json | 23 +- puppet-agent-windows/azuredeploy.json | 24 +- puppet-enterprise-cluster/azuredeploy.json | 160 +- puppet-enterprise-rhel-win/azuredeploy.json | 128 +- python-proxy-on-ubuntu/azuredeploy.json | 20 +- qlik-sense-enterprise/azuredeploy.json | 40 +- radium-blockchain-ubuntu/azuredeploy.json | 24 +- rds-deployment-existing-ad/azuredeploy.json | 43 +- rds-deployment-ha-gateway/azuredeploy.json | 32 +- rds-deployment/azuredeploy.json | 51 +- rds-deployment/vnet-with-dns-server.json | 9 +- rds-update-certificate/azuredeploy.json | 181 +- rds-update-rdsh-collection/azuredeploy.json | 497 ++-- redis-high-availability/azuredeploy.json | 7 + redis-high-availability/empty-resources.json | 7 + .../jumpbox-resources.json | 17 +- redis-high-availability/node-resources.json | 13 +- redis-high-availability/shared-resources.json | 15 +- rhel-3tier-iaas/azuredeploy.json | 109 +- .../azuredeploy.json | 11 +- .../shared/newnsg.json | 14 +- .../shared/newpip.json | 14 +- .../shared/newvnet.json | 15 +- .../shared/nic-config.json | 12 +- .../shared/os-disk-parts-md.json | 20 +- .../shared/server-md.json | 19 +- sap-2-tier-marketplace-image/azuredeploy.json | 15 +- .../cs-server-Standard_D11_multiNIC_No.json | 20 +- .../cs-server-Standard_D13_multiNIC_No.json | 20 +- .../cs-server-Standard_D14_multiNIC_No.json | 20 +- .../cs-server-Standard_DS11_multiNIC_No.json | 20 +- .../cs-server-Standard_DS13_multiNIC_No.json | 20 +- .../cs-server-Standard_DS14_multiNIC_No.json | 20 +- .../cs-server-Standard_GS5_multiNIC_No.json | 19 +- .../db-server-Standard_GS2_multiNIC_No.json | 23 +- .../db-server-Standard_GS3_multiNIC_No.json | 23 +- .../db-server-Standard_GS4_multiNIC_No.json | 23 +- .../db-server-Standard_GS5_multiNIC_No.json | 23 +- .../shared/disks.json | 85 +- .../shared/disks0.json | 61 +- .../shared/existingnsg.json | 18 +- .../shared/existingpip.json | 17 +- .../shared/existingvnet.json | 15 +- .../shared/existingvnetnsg.json | 15 +- .../shared/lb-DB-HANA.json | 320 +- .../shared/lb-DB-SQL.json | 284 +- .../shared/lb-DB0.json | 169 +- .../shared/lb-ERS-Linux.json | 581 ++-- .../shared/lb-ERS-Windows.json | 195 +- .../shared/lb-ERS0.json | 195 +- .../shared/lb-SCS.json | 896 +++--- .../shared/lb-SCS0.json | 399 +-- .../shared/loadbalancer.json | 13 +- .../shared/newnsg.json | 14 +- .../shared/newpip.json | 16 +- .../shared/newvnet.json | 16 +- .../shared/newvnetnsg.json | 16 +- .../shared/nic-config.json | 17 +- .../shared/os-disk-parts-md.json | 20 +- .../shared/os-disk-parts.json | 21 +- .../shared/server-Standard_multiNIC_No.json | 23 +- .../shared/server-md.json | 19 +- .../shared/server.json | 19 +- .../shared/server2-noplan.json | 434 +-- .../shared/server2.json | 14 +- sap-2-tier-user-disk-md/azuredeploy.json | 11 +- sap-2-tier-user-disk-md/shared/newnsg.json | 14 +- sap-2-tier-user-disk-md/shared/newpip.json | 14 +- .../shared/newvnetnsg.json | 14 +- .../shared/nic-config.json | 12 +- .../shared/os-disk-parts-md.json | 20 +- sap-2-tier-user-disk-md/shared/server-md.json | 19 +- sap-2-tier-user-image-md/azuredeploy.json | 11 +- .../azuredeploy.json | 17 +- .../shared/lb-DB-HANA.json | 319 +- .../shared/lb-DB-SQL.json | 283 +- .../shared/lb-DB0.json | 169 +- .../shared/lb-ERS-Linux.json | 580 ++-- .../shared/lb-ERS-Windows.json | 195 +- .../shared/lb-ERS0.json | 195 +- .../shared/lb-SCS.json | 895 +++--- .../shared/lb-SCS0.json | 399 +-- .../shared/loadbalancer.json | 681 ++--- .../shared/newnsg.json | 14 +- .../shared/newpip.json | 14 +- .../shared/newvnetnsg.json | 14 +- .../shared/nic-config.json | 12 +- .../shared/os-disk-parts-md.json | 20 +- .../shared/server-md.json | 19 +- .../azuredeploy.json | 19 +- .../shared/lb-DB-HANA.json | 319 +- .../shared/lb-DB-SQL.json | 283 +- .../shared/lb-DB0.json | 169 +- .../shared/lb-ERS-Linux.json | 580 ++-- .../shared/lb-ERS-Windows.json | 195 +- .../shared/lb-ERS0.json | 195 +- .../shared/lb-SCS.json | 895 +++--- .../shared/lb-SCS0.json | 399 +-- .../shared/loadbalancer.json | 681 ++--- .../shared/newnsg.json | 14 +- .../shared/newpip.json | 14 +- .../shared/newvnetnsg.json | 14 +- .../shared/nic-config.json | 10 +- .../shared/os-disk-parts-md.json | 20 +- .../shared/server-md.json | 19 +- .../azuredeploy.json | 13 +- .../shared/os-disk-parts-md.json | 20 +- .../shared/server-md.json | 19 +- .../azuredeploy.json | 25 +- .../nestedtemplates/osprofile.json | 150 +- .../azuredeploy.json | 13 +- .../shared/lb-DB-HANA.json | 319 +- .../shared/lb-DB-SQL.json | 283 +- .../shared/lb-DB0.json | 169 +- .../shared/lb-ERS-Linux.json | 580 ++-- .../shared/lb-ERS-Windows.json | 195 +- .../shared/lb-ERS0.json | 195 +- .../shared/lb-SCS.json | 895 +++--- .../shared/lb-SCS0.json | 399 +-- .../shared/loadbalancer.json | 681 ++--- .../shared/newnsg.json | 14 +- .../shared/newpip.json | 14 +- .../shared/newvnetnsg.json | 14 +- .../shared/nic-config.json | 12 +- .../shared/os-disk-parts-md.json | 20 +- .../shared/server-md.json | 19 +- .../azuredeploy.json | 17 +- .../shared/lb-DB-HANA.json | 319 +- .../shared/lb-DB-SQL.json | 283 +- .../shared/lb-DB0.json | 169 +- .../shared/lb-ERS-Linux.json | 580 ++-- .../shared/lb-ERS-Windows.json | 195 +- .../shared/lb-ERS0.json | 195 +- .../shared/lb-SCS.json | 895 +++--- .../shared/lb-SCS0.json | 399 +-- .../shared/loadbalancer.json | 681 ++--- .../shared/newnsg.json | 14 +- .../shared/newpip.json | 14 +- .../shared/newvnetnsg.json | 14 +- .../shared/nic-config.json | 12 +- .../shared/os-disk-parts-md.json | 20 +- .../shared/server-md.json | 19 +- sap-3-tier-user-image-md/azuredeploy.json | 21 +- .../shared/lb-DB-HANA.json | 319 +- .../shared/lb-DB-SQL.json | 283 +- sap-3-tier-user-image-md/shared/lb-DB0.json | 169 +- .../shared/lb-ERS-Linux.json | 580 ++-- .../shared/lb-ERS-Windows.json | 195 +- sap-3-tier-user-image-md/shared/lb-ERS0.json | 195 +- sap-3-tier-user-image-md/shared/lb-SCS.json | 895 +++--- sap-3-tier-user-image-md/shared/lb-SCS0.json | 399 +-- .../shared/loadbalancer.json | 681 ++--- sap-3-tier-user-image-md/shared/newnsg.json | 14 +- sap-3-tier-user-image-md/shared/newpip.json | 14 +- .../shared/newvnetnsg.json | 14 +- .../shared/nic-config.json | 10 +- .../shared/os-disk-parts-md.json | 20 +- .../shared/server-md.json | 19 +- sap-file-server-md/azuredeploy.json | 13 +- .../nestedtemplates/loadbalancer.json | 348 +-- .../nestedtemplates/newpip.json | 14 +- .../nestedtemplates/newvnetnsg.json | 14 +- .../nestedtemplates/nic-config.json | 10 +- .../nestedtemplates/os-disk-parts-md.json | 20 +- .../nestedtemplates/server-md.json | 19 +- sharepoint-adfs/azuredeploy.json | 96 +- sharepoint-server-farm-ha/azuredeploy.json | 2 +- sharepoint-server-farm-ha/mainTemplate.json | 2626 ++++++++--------- .../nestedtemplates/availabilitySets.json | 11 +- .../creatingStorageAccounts.json | 7 +- .../nestedtemplates/publicip-new.json | 2 +- .../nestedtemplates/publicip-rdp.json | 2 +- .../nestedtemplates/setupLBs.json | 2 +- shibboleth-cluster-ubuntu/azuredeploy.json | 43 +- shibboleth-cluster-windows/azuredeploy.json | 43 +- shibboleth-singlevm-ubuntu/azuredeploy.json | 22 +- shibboleth-singlevm-windows/azuredeploy.json | 24 +- slurm-on-sles12-hpc/azuredeploy.json | 28 +- slurm/azuredeploy.json | 23 +- solace-message-router/azuredeploy.json | 72 +- solace-message-router/shared-resources.json | 350 +-- sonarqube-azuresql/azuredeploy.json | 26 +- sonarqube-azuresql/nested/azureDBDeploy.json | 17 +- spark-2.0-on-suse/azuredeploy.json | 172 +- .../azuredeploy.json | 49 +- spark-on-ubuntu/azuredeploy.json | 19 +- .../jumpbox-resources-disabled.json | 7 + .../jumpbox-resources-enabled.json | 15 +- spark-on-ubuntu/shared-resources.json | 13 +- spark-ubuntu-multidisks/azuredeploy.json | 7 + .../datastore-16disk-resources.json | 14 +- .../datastore-2disk-resources.json | 14 +- .../datastore-8disk-resources.json | 16 +- spark-ubuntu-multidisks/empty-resources.json | 7 + .../jumpbox-resources.json | 14 +- spark-ubuntu-multidisks/shared-resources.json | 13 +- splunk-on-ubuntu/azuredeploy-gov.json | 8 +- splunk-on-ubuntu/azuredeploy.json | 5 +- .../nested/clustermaster-resources.json | 7 +- .../nested/clusterpeers-resources.json | 7 +- .../nested/clustersearchhead-resources.json | 7 +- splunk-on-ubuntu/nested/empty-resources.json | 3 +- splunk-on-ubuntu/nested/shared-resources.json | 10 +- .../nested/splunk-2disk-resources-loop.json | 7 +- .../nested/splunk-2disk-resources.json | 7 +- .../nested/splunk-8disk-resources-loop.json | 7 +- .../nested/splunk-8disk-resources.json | 7 +- .../nested/standalone-instance-resources.json | 7 +- splunk-on-ubuntu/nested/vnet-existing.json | 9 +- splunk-on-ubuntu/nested/vnet-new.json | 7 +- .../azuredeploy.json | 26 +- .../nestedtemplates/deploy-sql-cluster.json | 864 +++--- .../nestedtemplates/getIpAddress.json | 43 +- .../nestedtemplates/newVM.json | 197 +- .../azuredeploy.json | 37 +- .../azuredeploy.json | 7 + .../nested/deploy-sql-alwayson.json | 13 +- .../nested/deploy-sql-cluster.json | 951 +++--- .../nested/deploy-sql-witness.json | 11 +- sqldb-django-on-ubuntu/azuredeploy.json | 27 +- sqlvm-alwayson-cluster/azuredeploy.json | 31 +- .../nested/configuringAlwaysOn.json | 254 +- .../nested/configuringBackupADVM.json | 114 +- .../nested/creatingNICS.json | 2 +- sqlvm-alwayson-cluster/nested/nic.json | 2 +- .../nested/preparingSqlServer.json | 426 ++- .../provisioningNetworkStorageAGSet.json | 298 +- .../nested/provisioningVM1.json | 6 +- .../nested/provisioningVM2.json | 6 +- .../nested/provisioningVM3.json | 2 +- .../nested/provisioningVM4.json | 2 +- .../nested/publicip-rdp.json | 93 +- sqlvm-alwayson-cluster/nested/setupLBs.json | 186 +- .../storageAccountVirtualNetworkPublicIP.json | 2 +- sqlvm-alwayson-cluster/nested/vnet-new.json | 28 +- .../nested/vnet-with-dns-server.json | 2 +- sqlvm-provisioning-csp/azuredeploy.json | 17 +- stampery-trailbot-ubuntu/azuredeploy.json | 21 +- steelscript-appfwkdev-linux/azuredeploy.json | 539 ++-- .../azuredeploy.json | 36 +- .../managedDisksDemo.json | 48 +- .../azuredeploy.json | 19 +- tfs-basic-domain/azuredeploy.json | 21 +- tfs-basic-workgroup/azuredeploy.json | 19 +- tfs-dual-server/azuredeploy.json | 9 +- .../nestedtemplates/domainController.json | 15 +- .../nestedtemplates/sqlServer.json | 17 +- tfs-dual-server/nestedtemplates/tfs.json | 17 +- .../nestedtemplates/virtualNetwork.json | 20 +- tfs-standard-existingsql/azuredeploy.json | 17 +- .../nestedtemplates/domainController.json | 16 +- .../prereqs/nestedtemplates/sqlServer.json | 18 +- .../nestedtemplates/virtualNetwork.json | 21 +- .../prereqs/prereq.azuredeploy.json | 9 +- thinkbox-deadline/azuredeploy.json | 30 +- torque-cluster/azuredeploy.json | 25 +- .../azuredeploy.json | 11 +- .../nested/azuredeployappgw.json | 1 - .../nested/nested/azuredeploywebserver.json | 2 - traffic-manager-demo-setup/azuredeploy.json | 17 +- .../nested/azuredeploywebserver.json | 2 - trend-chef-splunk-security/azuredeploy.json | 25 +- .../nested/database-new.json | 3 +- .../nested/empty-resources.json | 3 +- .../orchestrator-server-setup-trend.json | 4 +- .../nested/trendp2p-chefautomate.json | 404 +-- .../nested/trendp2p-chefnodes.json | 5 +- .../nested/trendp2p-dsagents.json | 5 +- .../nested/trendp2p-orchestrator.json | 5 +- .../nested/trendp2p-splunkenterprise.json | 2 +- .../nested/trendp2p-trenddsm.json | 5 +- .../nested/trendp2p-vnetstorage.json | 3 +- .../azuredeploy.json | 533 ++-- ubuntu-apache-test-page/azuredeploy.json | 22 +- ubuntu-desktop-gnome/azuredeploy.json | 31 +- ubuntu-desktop-xfce-rdp/azuredeploy.json | 33 +- ubuntu-netdisk-setup/azuredeploy.json | 102 +- .../azuredeploy.json | 1102 +++---- umbraco-webapp-simple/azuredeploy.json | 879 +++--- .../azuredeploy.json | 22 +- visual-studio-dev-vm-O365/azuredeploy.json | 96 +- .../azuredeploy.json | 323 +- visual-studio-dev-vm/azuredeploy.json | 19 +- .../azuredeploy.json | 41 +- vm-cpu-sysbench-meter/azuredeploy.json | 21 +- vm-disk-performance-meter/azuredeploy.json | 23 +- vm-simple-sles/azuredeploy.json | 19 +- .../azuredeploy.json | 21 +- .../ams/ams-with-automation.json | 3 +- .../ams/ams.json | 19 +- .../ams/automationjob.json | 429 ++- .../aspera/aspera.json | 491 +-- .../azuredeploy.json | 623 ++-- .../desktop/desktop.json | 22 +- .../wowza/wowza.json | 655 ++-- vsts-fullbuild-redhat-vm/azuredeploy.json | 433 +-- vsts-fullbuild-ubuntu-vm/azuredeploy.json | 30 +- vsts-minbuildjava-ubuntu-vm/azuredeploy.json | 30 +- vsts-tomcat-redhat-vm/azuredeploy.json | 42 +- vsts-tomcat-ubuntu-vm/azuredeploy.json | 42 +- webapp-blob-connection/azuredeploy.json | 178 +- webapp-keyvault-ssl/azuredeploy.json | 15 +- .../nestedtemplates/webapp-ssl-bind.json | 91 +- website-cluster-centos/azuredeploy.json | 38 +- .../nested/disksSelector.json | 8 +- .../nested/lb-resources.json | 116 +- .../nested/mysqlMaster-resources.json | 110 +- .../nested/mysqlSlave-resources.json | 110 +- .../nested/redisMaster-resources.json | 110 +- .../nested/redisSlave-resources.json | 110 +- .../nested/shared-resources.json | 18 +- .../nested/web-resources.json | 110 +- .../azuredeploy.json | 23 +- windows-vm-O365/azuredeploy.json | 340 +-- .../azuredeploy.json | 207 +- .../nested/mysql-replication.json | 25 +- .../nested/vnet-existing.json | 61 +- .../nested/vnet-new.json | 9 +- .../nested/website.json | 247 +- wordpress-single-vm-ubuntu/azuredeploy.json | 19 +- .../azuredeploy.json | 29 +- zabbix-monitoring-cluster/azuredeploy.json | 10 +- .../nested/clusterNodes.json | 9 +- .../nested/monitoringAgentByIps.json | 9 +- .../nested/monitoringAgentByVms.json | 9 +- .../nested/monitoringAgentByVnet.json | 14 +- .../nested/monitoringServer.json | 11 +- .../nested/monitoringServerDbExisting.json | 7 + .../nested/monitoringServerDbLocalhost.json | 7 + .../nested/monitoringServerDistroCentOS.json | 10 +- .../nested/monitoringServerDistroUbuntu.json | 10 +- .../nested/monitoringSolution.json | 12 +- zookeeper-cluster-ubuntu-vm/azuredeploy.json | 23 +- 1020 files changed, 59871 insertions(+), 53524 deletions(-) diff --git a/101-1vm-2nics-2subnets-1vnet/azuredeploy.json b/101-1vm-2nics-2subnets-1vnet/azuredeploy.json index fbb0b3b12ff2..2069b8aa1356 100644 --- a/101-1vm-2nics-2subnets-1vnet/azuredeploy.json +++ b/101-1vm-2nics-2subnets-1vnet/azuredeploy.json @@ -1,238 +1,245 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "virtualMachineSize": { - "type": "string", - "defaultValue": "Standard_DS1_v2", - "metadata": { - "description": "Virtual machine size (has to be at least the size of Standard_A3 to support 2 NICs)" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "virtualMachineSize": { + "type": "string", + "defaultValue": "Standard_DS1_v2", + "metadata": { + "description": "Virtual machine size (has to be at least the size of Standard_A3 to support 2 NICs)" + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "Default Admin username" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Default Admin password" + } + }, + "storageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Storage Account type for the VM and VM diagnostic storage" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "virtualMachineName": "VM-MultiNic", + "nic1": "nic-1", + "nic2": "nic-2", + "virtualNetworkName": "virtualNetwork", + "subnet1Name": "subnet-1", + "subnet2Name": "subnet-2", + "publicIPAddressName": "publicIp", + "subnet1Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnet1Name'))]", + "subnet2Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnet2Name'))]", + "diagStorageAccountName": "[concat('diags',uniqueString(resourceGroup().id))]", + "networkSecurityGroupName": "NSG" + }, + "resources": [ + { + "name": "[variables('virtualMachineName')]", + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "comments": "This is the virtual machine that you're building.", + "dependsOn": [ + "[variables('nic1')]", + "[variables('nic2')]", + "[variables('diagStorageAccountName')]" + ], + "properties": { + "osProfile": { + "computerName": "[variables('virtualMachineName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]", + "windowsConfiguration": { + "provisionVmAgent": "true" + } }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "Default Admin username" - } + "hardwareProfile": { + "vmSize": "[parameters('virtualMachineSize')]" }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Default Admin password" - } + "storageProfile": { + "imageReference": { + "publisher": "MicrosoftWindowsServer", + "offer": "WindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [] }, - "storageAccountType": { - "type": "string", - "defaultValue": "Standard_LRS", - "metadata": { - "description": "Storage Account type for the VM and VM diagnostic storage" + "networkProfile": { + "networkInterfaces": [ + { + "properties": { + "primary": true + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1'))]" }, - "allowedValues": [ - "Standard_LRS", - "Premium_LRS" - ] + { + "properties": { + "primary": false + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2'))]" + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('diagStorageAccountName')), '2017-06-01').primaryEndpoints['blob']]" + } } + } }, - "variables": { - "virtualMachineName": "VM-MultiNic", - "nic1": "nic-1", - "nic2": "nic-2", - "virtualNetworkName": "virtualNetwork", - "subnet1Name": "subnet-1", - "subnet2Name": "subnet-2", - "publicIPAddressName": "publicIp", - "subnet1Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnet1Name'))]", - "subnet2Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnet2Name'))]", - "diagStorageAccountName": "[concat('diags',uniqueString(resourceGroup().id))]", - "networkSecurityGroupName": "NSG" + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('diagStorageAccountName')]", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "kind": "Storage", + "properties": {} }, - "resources": [ - { - "name": "[variables('virtualMachineName')]", - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "comments": "This is the virtual machine that you're building.", - "dependsOn": [ - "[variables('nic1')]", - "[variables('nic2')]", - "[variables('diagStorageAccountName')]" - ], - "properties": { - "osProfile": { - "computerName": "[variables('virtualMachineName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "windowsConfiguration": { - "provisionVmAgent": "true" - } - }, - "hardwareProfile": { - "vmSize": "[parameters('virtualMachineSize')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "MicrosoftWindowsServer", - "offer": "WindowsServer", - "sku": "2016-Datacenter", - "version": "latest" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [] - }, - "networkProfile": { - "networkInterfaces": [ - { - "properties": { - "primary": true - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1'))]" - }, - { - "properties": { - "primary": false - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('diagStorageAccountName')), '2017-06-01').primaryEndpoints['blob']]" - } - } - } + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "comments": "This will build a Virtual Network.", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('diagStorageAccountName')]", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "[parameters('storageAccountType')]" - }, - "kind": "Storage", - "properties": {} - }, - { - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "comments": "This will build a Virtual Network.", + "subnets": [ + { + "name": "[variables('subnet1Name')]", "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [ - { - "name": "[variables('subnet1Name')]", - "properties": { - "addressPrefix": "10.0.0.0/24" - } - }, - { - "name": "[variables('subnet2Name')]", - "properties": { - "addressPrefix": "10.0.1.0/24" - } - } - ] + "addressPrefix": "10.0.0.0/24" } - }, - { - "name": "[variables('nic1')]", - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "comments": "This will be your Primary NIC", - "dependsOn": [ - "[variables('publicIpAddressName')]", - "[variables('networkSecurityGroupName')]", - "[variables('virtualNetworkName')]" - ], + }, + { + "name": "[variables('subnet2Name')]", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "subnet": { - "id": "[variables('subnet1Ref')]" - }, - "privateIPAllocationMethod": "Dynamic", - "publicIpAddress": { - "id": "[resourceId('Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]" - } - } - } - ], - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" - } + "addressPrefix": "10.0.1.0/24" } - }, - { - "name": "[variables('nic2')]", - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "comments": "This will be your Secondary NIC", - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" - ], + } + ] + } + }, + { + "name": "[variables('nic1')]", + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "comments": "This will be your Primary NIC", + "dependsOn": [ + "[variables('publicIpAddressName')]", + "[variables('networkSecurityGroupName')]", + "[variables('virtualNetworkName')]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "subnet": { - "id": "[variables('subnet2Ref')]" - }, - "privateIPAllocationMethod": "Dynamic" - } - } - ] + "subnet": { + "id": "[variables('subnet1Ref')]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId('Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]" + } } - }, - { - "name": "[variables('publicIpAddressName')]", - "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "comments": "Public IP for your Primary NIC", + } + ], + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + } + } + }, + { + "name": "[variables('nic2')]", + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "comments": "This will be your Secondary NIC", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "publicIPAllocationMethod": "Dynamic" + "subnet": { + "id": "[variables('subnet2Ref')]" + }, + "privateIPAllocationMethod": "Dynamic" } - }, - { - "name": "[variables('networkSecurityGroupName')]", - "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2016-09-01", - "location": "[resourceGroup().location]", - "comments": "Network Security Group (NSG) for your Primary NIC", + } + ] + } + }, + { + "name": "[variables('publicIpAddressName')]", + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "comments": "Public IP for your Primary NIC", + "properties": { + "publicIPAllocationMethod": "Dynamic" + } + }, + { + "name": "[variables('networkSecurityGroupName')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2016-09-01", + "location": "[parameters('location')]", + "comments": "Network Security Group (NSG) for your Primary NIC", + "properties": { + "securityRules": [ + { + "name": "default-allow-rdp", "properties": { - "securityRules": [ - { - "name": "default-allow-rdp", - "properties": { - "priority": 1000, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "3389", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - } - ] + "priority": 1000, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "3389", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } - } - ], - "outputs": {} -} \ No newline at end of file + } + ] + } + } + ], + "outputs": {} +} diff --git a/101-Telegraf-InfluxDB-Grafana/azuredeploy.json b/101-Telegraf-InfluxDB-Grafana/azuredeploy.json index 48479cfeeca1..04fc64530563 100644 --- a/101-Telegraf-InfluxDB-Grafana/azuredeploy.json +++ b/101-Telegraf-InfluxDB-Grafana/azuredeploy.json @@ -1,209 +1,227 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "metadata": { - "description": "User name for the Virtual Machine." - } - }, - "sshPublicKey": { - "type": "string", - "metadata": { - "description": "Configure the linux machines with the SSH public key string. Your key should include three parts, for example 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'" - } - }, - "tigDnsPrefix": { - "type": "string", - "maxLength": 50, - "metadata": { - "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." - } - }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-Telegraf-InfluxDB-Grafana/" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "type": "string", + "metadata": { + "description": "User name for the Virtual Machine." + } + }, + "sshPublicKey": { + "type": "string", + "metadata": { + "description": "Configure the linux machines with the SSH public key string. Your key should include three parts, for example 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'" + } + }, + "tigDnsPrefix": { + "type": "string", + "maxLength": 50, + "metadata": { + "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." + } + }, + "_artifactsLocation": { + "type": "string", + "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": "" + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-Telegraf-InfluxDB-Grafana/" + }, + "_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": { + "resourcePrefix": "tig", + "storageAccountName": "[concat(variables('resourcePrefix'), uniquestring(resourceGroup().id))]", + "OSDiskName": "[concat(variables('resourcePrefix'), 'OSDisk')]", + "nicName": "[concat(variables('resourcePrefix'), 'VMNic')]", + "subnetName": "[concat(variables('resourcePrefix'), 'Subnet')]", + "publicIPAddressName": "[concat(variables('resourcePrefix'), 'PublicIP')]", + "vmStorageAccountContainerName": "vhds", + "vmName": "[concat(variables('resourcePrefix'), 'VM')]", + "vmExtensionName": "[concat(variables('resourcePrefix'), 'Init')]", + "virtualNetworkName": "[concat(variables('resourcePrefix'), 'VNET')]", + "_extensionScript": "tigscript.sh", + "_configfilelocation": "[concat(parameters('_artifactsLocation'), 'scripts/Configfiles.zip',parameters('_artifactsLocationSasToken'))]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} }, - "variables": { - "resourcePrefix": "tig", - "storageAccountName": "[concat(variables('resourcePrefix'), uniquestring(resourceGroup().id))]", - "OSDiskName": "[concat(variables('resourcePrefix'), 'OSDisk')]", - "nicName": "[concat(variables('resourcePrefix'), 'VMNic')]", - "subnetName": "[concat(variables('resourcePrefix'), 'Subnet')]", - "publicIPAddressName": "[concat(variables('resourcePrefix'), 'PublicIP')]", - "vmStorageAccountContainerName": "vhds", - "vmName": "[concat(variables('resourcePrefix'), 'VM')]", - "vmExtensionName": "[concat(variables('resourcePrefix'), 'Init')]", - "virtualNetworkName": "[concat(variables('resourcePrefix'), 'VNET')]", - "_extensionScript": "tigscript.sh", - "_configfilelocation": "[concat(parameters('_artifactsLocation'), 'scripts/Configfiles.zip',parameters('_artifactsLocationSasToken'))]" + { + "apiVersion": "2017-10-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[concat(parameters('tigDnsPrefix'),uniquestring(resourceGroup().id))]" + } + } }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": {} - }, { - "apiVersion": "2017-10-01", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[concat(parameters('tigDnsPrefix'),uniquestring(resourceGroup().id))]" - } - } - }, { - "apiVersion": "2017-10-01", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + { + "apiVersion": "2017-10-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "10.0.0.0/24" - - } - }] + "addressPrefix": "10.0.0.0/24" } - }, { - "apiVersion": "2016-09-01", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", - "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" - ], + } + ] + } + }, + { + "apiVersion": "2016-09-01", + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('nicName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [{ - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'),variables('subnetName'))]" - } - } - }] + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" + }, + "subnet": { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'),variables('subnetName'))]" + } } + } + ] + } + }, + { + "apiVersion": "2017-12-01", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" }, - - { - "apiVersion": "2017-12-01", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", - "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "Standard_D1_v2" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [{ - "path": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", - "keyData": "[parameters('sshPublicKey')]" - }] - } - } - }, - "storageProfile": { - "imageReference": { - "publisher": "Canonical", - "offer": "UbuntuServer", - "sku": "14.04.5-LTS", - "version": "latest" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/', variables('OSDiskName'), '.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [{ - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" - }] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob)]" - } + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", + "keyData": "[parameters('sshPublicKey')]" } + ] + } + } + }, + "storageProfile": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "14.04.5-LTS", + "version": "latest" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/', variables('OSDiskName'), '.vhd')]" }, - "resources": [{ - "type": "extensions", - "name": "[variables('vmExtensionName')]", - "apiVersion": "2017-12-01", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'),'scripts/',variables('_extensionScript'),parameters('_artifactsLocationSasToken'))]" - ], - "timestamp": 16012018 - }, - "protectedSettings": { - "commandToExecute": "[concat('sh tigscript.sh',' ',variables('_configfilelocation'))]" - } - - } - }] - } - ], - "outputs": { - "TIGVmFQDN": { - "type": "string", - "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" + "caching": "ReadWrite", + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" + } + ] }, - "SSH": { - "type": "string", - "value": "[concat('ssh -L 3000:localhost:3000 -L 8083:localhost:8083 ', parameters('adminUsername'), '@', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]" + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob)]" + } } + }, + "resources": [ + { + "type": "extensions", + "name": "[variables('vmExtensionName')]", + "apiVersion": "2017-12-01", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'),'scripts/',variables('_extensionScript'),parameters('_artifactsLocationSasToken'))]" + ], + "timestamp": 16012018 + }, + "protectedSettings": { + "commandToExecute": "[concat('sh tigscript.sh',' ',variables('_configfilelocation'))]" + } + } + } + ] + } + ], + "outputs": { + "TIGVmFQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" + }, + "SSH": { + "type": "string", + "value": "[concat('ssh -L 3000:localhost:3000 -L 8083:localhost:8083 ', parameters('adminUsername'), '@', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]" } -} \ No newline at end of file + } +} diff --git a/101-aci-dynamicsnav/azuredeploy.json b/101-aci-dynamicsnav/azuredeploy.json index 39b581aacf48..ed6398fffffc 100644 --- a/101-aci-dynamicsnav/azuredeploy.json +++ b/101-aci-dynamicsnav/azuredeploy.json @@ -1,151 +1,159 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "type": "string", - "metadata": { - "description": "Name for the container group" - }, - "defaultValue": "acinavcontainergroup" - }, - "navRelease": { - "type": "string", - "metadata": { - "description": "Before the colon: dynamics-nav for NAV or bcsandbox for Business Central. After the colon: Identifier for the specific release like 2018-cu4-de for NAV or de for BC. Possible values can be found at https://hub.docker.com/r/microsoft/dynamics-nav/tags/ or https://hub.docker.com/r/microsoft/bcsandbox/tags/" - }, - "defaultValue": "microsoft/bcsandbox:us" - }, - "username": { - "type": "string", - "metadata": { - "description": "Username for your NAV super user" - } - }, - "password": { - "type": "string", - "metadata": { - "description": "Password for your NAV/BC super user and your sa user on the database" - } - }, - "cpuCores": { - "type": "string", - "metadata": { - "description": "The number of CPU cores to allocate to the container" - }, - "defaultValue": "2.0" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "type": "string", + "metadata": { + "description": "Name for the container group" }, - "memoryInGb": { - "type": "string", - "metadata": { - "description": "The amount of memory to allocate to the container in gigabytes. Provide a minimum of 2 as he container will include SQL Server and NAV NST" - }, - "defaultValue": "2.0" + "defaultValue": "acinavcontainergroup" + }, + "navRelease": { + "type": "string", + "metadata": { + "description": "Before the colon: dynamics-nav for NAV or bcsandbox for Business Central. After the colon: Identifier for the specific release like 2018-cu4-de for NAV or de for BC. Possible values can be found at https://hub.docker.com/r/microsoft/dynamics-nav/tags/ or https://hub.docker.com/r/microsoft/bcsandbox/tags/" }, - "acceptEula": { - "type": "string", - "metadata": { - "description": "Change to 'Y' to accept the end user license agreement available at https://go.microsoft.com/fwlink/?linkid=861843. This is necessary to successfully run the container" - }, - "defaultValue": "N", - "allowedValues": [ - "Y", "N" - ] + "defaultValue": "microsoft/bcsandbox:us" + }, + "username": { + "type": "string", + "metadata": { + "description": "Username for your NAV super user" + } + }, + "password": { + "type": "string", + "metadata": { + "description": "Password for your NAV/BC super user and your sa user on the database" } }, - "variables": { - "image": "[parameters('navRelease')]" + "cpuCores": { + "type": "string", + "metadata": { + "description": "The number of CPU cores to allocate to the container" + }, + "defaultValue": "2.0" + }, + "memoryInGb": { + "type": "string", + "metadata": { + "description": "The amount of memory to allocate to the container in gigabytes. Provide a minimum of 2 as he container will include SQL Server and NAV NST" + }, + "defaultValue": "2.0" }, - "resources": [ - { - "name": "[parameters('name')]", - "type": "Microsoft.ContainerInstance/containerGroups", - "apiVersion": "2017-10-01-preview", - "location": "[resourceGroup().location]", - "properties": { - "containers": [ - { - "name": "[parameters('name')]", - "properties": { - "environmentVariables": [ - { - "name": "ACCEPT_EULA", - "value": "[parameters('acceptEula')]" - }, - { - "name": "username", - "value": "[parameters('username')]" - }, - { - "name": "password", - "value": "[parameters('password')]" - } - ], - "image": "[variables('image')]", - "ports": [ - { - "protocol": "tcp", - "port": "443" - }, - { - "protocol": "tcp", - "port": "80" - }, - { - "protocol": "tcp", - "port": "7049" - }, - { - "protocol": "tcp", - "port": "8080" - }, - { - "protocol": "tcp", - "port": "1433" - } - ], - "resources": { - "requests": { - "cpu": "[parameters('cpuCores')]", - "memoryInGb": "[parameters('memoryInGb')]" - } - } - } - } - ], - "osType": "Windows", - "ipAddress": { - "type": "Public", - "ports": [ - { - "protocol": "tcp", - "port": "443" - }, - { - "protocol": "tcp", - "port": "80" - }, - { - "protocol": "tcp", - "port": "7049" - }, - { - "protocol": "tcp", - "port": "8080" - }, - { - "protocol": "tcp", - "port": "1433" - } - ] - } + "acceptEula": { + "type": "string", + "metadata": { + "description": "Change to 'Y' to accept the end user license agreement available at https://go.microsoft.com/fwlink/?linkid=861843. This is necessary to successfully run the container" + }, + "defaultValue": "N", + "allowedValues": [ + "Y", + "N" + ] + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "image": "[parameters('navRelease')]" + }, + "resources": [ + { + "name": "[parameters('name')]", + "type": "Microsoft.ContainerInstance/containerGroups", + "apiVersion": "2017-10-01-preview", + "location": "[parameters('location')]", + "properties": { + "containers": [ + { + "name": "[parameters('name')]", + "properties": { + "environmentVariables": [ + { + "name": "ACCEPT_EULA", + "value": "[parameters('acceptEula')]" + }, + { + "name": "username", + "value": "[parameters('username')]" + }, + { + "name": "password", + "value": "[parameters('password')]" + } + ], + "image": "[variables('image')]", + "ports": [ + { + "protocol": "tcp", + "port": "443" + }, + { + "protocol": "tcp", + "port": "80" + }, + { + "protocol": "tcp", + "port": "7049" + }, + { + "protocol": "tcp", + "port": "8080" + }, + { + "protocol": "tcp", + "port": "1433" + } + ], + "resources": { + "requests": { + "cpu": "[parameters('cpuCores')]", + "memoryInGb": "[parameters('memoryInGb')]" + } } + } } - ], - "outputs": { - "containerIPv4Address":{ - "type": "string", - "value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', parameters('name'))).ipAddress.ip]" + ], + "osType": "Windows", + "ipAddress": { + "type": "Public", + "ports": [ + { + "protocol": "tcp", + "port": "443" + }, + { + "protocol": "tcp", + "port": "80" + }, + { + "protocol": "tcp", + "port": "7049" + }, + { + "protocol": "tcp", + "port": "8080" + }, + { + "protocol": "tcp", + "port": "1433" + } + ] } + } + } + ], + "outputs": { + "containerIPv4Address": { + "type": "string", + "value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', parameters('name'))).ipAddress.ip]" } + } } diff --git a/101-aci-linuxcontainer-public-ip/azuredeploy.json b/101-aci-linuxcontainer-public-ip/azuredeploy.json index fd14bba89c73..7b74a4372e05 100644 --- a/101-aci-linuxcontainer-public-ip/azuredeploy.json +++ b/101-aci-linuxcontainer-public-ip/azuredeploy.json @@ -1,87 +1,94 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": { + "parameters": { "name": { - "type": "string", - "metadata": { - "description": "Name for the container group" - }, - "defaultValue": "acilinuxpublicipcontainergroup" - }, - "image": { - "type": "string", - "metadata": { - "description": "Container image to deploy. Should be of the form accountName/imagename:tag for images stored in Docker Hub or a fully qualified URI for a private registry like the Azure Container Registry." - }, - "defaultValue": "microsoft/aci-helloworld" + "type": "string", + "metadata": { + "description": "Name for the container group" + }, + "defaultValue": "acilinuxpublicipcontainergroup" + }, + "image": { + "type": "string", + "metadata": { + "description": "Container image to deploy. Should be of the form accountName/imagename:tag for images stored in Docker Hub or a fully qualified URI for a private registry like the Azure Container Registry." + }, + "defaultValue": "microsoft/aci-helloworld" }, "port": { - "type": "string", - "metadata": { - "description": "Port to open on the container and the public IP address." - }, - "defaultValue": "80" - }, + "type": "string", + "metadata": { + "description": "Port to open on the container and the public IP address." + }, + "defaultValue": "80" + }, "cpuCores": { - "type": "string", - "metadata": { - "description": "The number of CPU cores to allocate to the container. Must be an integer." - }, - "defaultValue": "1.0" + "type": "string", + "metadata": { + "description": "The number of CPU cores to allocate to the container. Must be an integer." + }, + "defaultValue": "1.0" }, "memoryInGb": { - "type": "string", - "metadata": { - "description": "The amount of memory to allocate to the container in gigabytes." - }, - "defaultValue": "1.5" + "type": "string", + "metadata": { + "description": "The amount of memory to allocate to the container in gigabytes." + }, + "defaultValue": "1.5" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, "resources": [ { + "name": "[parameters('name')]", + "type": "Microsoft.ContainerInstance/containerGroups", + "apiVersion": "2017-08-01-preview", + "location": "[parameters('location')]", + "properties": { + "containers": [ + { "name": "[parameters('name')]", - "type": "Microsoft.ContainerInstance/containerGroups", - "apiVersion": "2017-08-01-preview", - "location": "[resourceGroup().location]", "properties": { - "containers": [ - { - "name": "[parameters('name')]", - "properties": { - "image": "[parameters('image')]", - "ports": [ - { - "port": "[parameters('port')]" - } - ], - "resources": { - "requests": { - "cpu": "[parameters('cpuCores')]", - "memoryInGb": "[parameters('memoryInGb')]" - } - } - } - } - ], - "osType": "Linux", - "ipAddress": { - "type": "Public", - "ports": [ - { - "protocol": "tcp", - "port": "[parameters('port')]" - } - ] - } + "image": "[parameters('image')]", + "ports": [ + { + "port": "[parameters('port')]" + } + ], + "resources": { + "requests": { + "cpu": "[parameters('cpuCores')]", + "memoryInGb": "[parameters('memoryInGb')]" + } + } + } + } + ], + "osType": "Linux", + "ipAddress": { + "type": "Public", + "ports": [ + { + "protocol": "tcp", + "port": "[parameters('port')]" } + ] } + } + } ], "outputs": { - "containerIPv4Address":{ - "type": "string", - "value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', parameters('name'))).ipAddress.ip]" - } + "containerIPv4Address": { + "type": "string", + "value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', parameters('name'))).ipAddress.ip]" + } } } diff --git a/101-aci-storage-file-share/azuredeploy.json b/101-aci-storage-file-share/azuredeploy.json index 2a90dab6893c..b3258e9a3af2 100644 --- a/101-aci-storage-file-share/azuredeploy.json +++ b/101-aci-storage-file-share/azuredeploy.json @@ -1,110 +1,117 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "storageAccountType": { - "type": "string", - "defaultValue": "Standard_LRS", - "allowedValues": [ - "Standard_LRS", - "Standard_GRS", - "Standard_ZRS" - ], - "metadata": { - "description": "Storage Account type" - } - }, - "storageAccountName": { - "type": "string", - "defaultValue": "[uniquestring(resourceGroup().id)]", - "metadata": { - "description": "Storage Account Name" - } - }, - "fileShareName": { - "type": "string", - "metadata": { - "description": "File Share Name" - } - }, - "containerInstanceLocation": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "allowedValues": [ - "westus", - "eastus", - "westeurope", - "southeastaisa", - "westus2" - ], - "metadata": { - "description": "Container Instance Location" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "storageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_ZRS" + ], + "metadata": { + "description": "Storage Account type" + } }, - "variables": { - "image": "microsoft/azure-cli", - "cpuCores": "1.0", - "memoryInGb": "1.5", - "containerGroupName":"createshare-containerinstance", - "containerName": "createshare" + "storageAccountName": { + "type": "string", + "defaultValue": "[uniquestring(resourceGroup().id)]", + "metadata": { + "description": "Storage Account Name" + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('storageAccountName')]", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "[parameters('storageAccountType')]" - }, - "kind": "Storage", - "properties": {} - }, - { - "name": "[variables('containerGroupName')]", - "type": "Microsoft.ContainerInstance/containerGroups", - "apiVersion": "2018-02-01-preview", - "location": "[parameters('containerInstanceLocation')]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]" - ], + "fileShareName": { + "type": "string", + "metadata": { + "description": "File Share Name" + } + }, + "containerInstanceLocation": { + "type": "string", + "defaultValue": "[parameters('location')]", + "allowedValues": [ + "westus", + "eastus", + "westeurope", + "southeastaisa", + "westus2" + ], + "metadata": { + "description": "Container Instance Location" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "image": "microsoft/azure-cli", + "cpuCores": "1.0", + "memoryInGb": "1.5", + "containerGroupName": "createshare-containerinstance", + "containerName": "createshare" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('storageAccountName')]", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "kind": "Storage", + "properties": {} + }, + { + "name": "[variables('containerGroupName')]", + "type": "Microsoft.ContainerInstance/containerGroups", + "apiVersion": "2018-02-01-preview", + "location": "[parameters('containerInstanceLocation')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]" + ], + "properties": { + "containers": [ + { + "name": "[variables('containerName')]", "properties": { - "containers": [ - { - "name": "[variables('containerName')]", - "properties": { - "image": "[variables('image')]", - "command": [ - "az", - "storage", - "share", - "create", - "--name", - "[parameters('fileShareName')]" - ], - "environmentVariables": [ - { - "name": "AZURE_STORAGE_KEY", - "value": "[listKeys(parameters('storageAccountName'),'2017-10-01').keys[0].value]" - }, - { - "name": "AZURE_STORAGE_ACCOUNT", - "value": "[parameters('storageAccountName')]" - } - ], - "resources": { - "requests": { - "cpu": "[variables('cpuCores')]", - "memoryInGb": "[variables('memoryInGb')]" - } - } - } - } - ], - "restartPolicy": "OnFailure", - "osType": "Linux" + "image": "[variables('image')]", + "command": [ + "az", + "storage", + "share", + "create", + "--name", + "[parameters('fileShareName')]" + ], + "environmentVariables": [ + { + "name": "AZURE_STORAGE_KEY", + "value": "[listKeys(parameters('storageAccountName'),'2017-10-01').keys[0].value]" + }, + { + "name": "AZURE_STORAGE_ACCOUNT", + "value": "[parameters('storageAccountName')]" + } + ], + "resources": { + "requests": { + "cpu": "[variables('cpuCores')]", + "memoryInGb": "[variables('memoryInGb')]" + } + } } - } - ] -} \ No newline at end of file + } + ], + "restartPolicy": "OnFailure", + "osType": "Linux" + } + } + ] +} diff --git a/101-acs-dcos/azuredeploy.json b/101-acs-dcos/azuredeploy.json index 0d9087204134..7bfb064a0387 100644 --- a/101-acs-dcos/azuredeploy.json +++ b/101-acs-dcos/azuredeploy.json @@ -14,24 +14,61 @@ "metadata": { "description": "The number of agents for the cluster. This value can be from 1 to 100 (note, for DC/OS clusters you will also get 1 or 2 public agents in addition to these seleted masters)" }, - "minValue":1, - "maxValue":100 + "minValue": 1, + "maxValue": 100 }, "agentVMSize": { "type": "string", "defaultValue": "Standard_D2_v2", "allowedValues": [ - "Standard_A0", "Standard_A1", "Standard_A2", "Standard_A3", "Standard_A4", "Standard_A5", - "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A9", "Standard_A10", "Standard_A11", - "Standard_D1", "Standard_D2", "Standard_D3", "Standard_D4", - "Standard_D11", "Standard_D12", "Standard_D13", "Standard_D14", - "Standard_D1_v2", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", - "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", - "Standard_G1", "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", - "Standard_DS1", "Standard_DS2", "Standard_DS3", "Standard_DS4", - "Standard_DS11", "Standard_DS12", "Standard_DS13", "Standard_DS14", - "Standard_GS1", "Standard_GS2", "Standard_GS3", "Standard_GS4", "Standard_GS5" - ], + "Standard_A0", + "Standard_A1", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_A8", + "Standard_A9", + "Standard_A10", + "Standard_A11", + "Standard_D1", + "Standard_D2", + "Standard_D3", + "Standard_D4", + "Standard_D11", + "Standard_D12", + "Standard_D13", + "Standard_D14", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_G1", + "Standard_G2", + "Standard_G3", + "Standard_G4", + "Standard_G5", + "Standard_DS1", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS11", + "Standard_DS12", + "Standard_DS13", + "Standard_DS14", + "Standard_GS1", + "Standard_GS2", + "Standard_GS3", + "Standard_GS4", + "Standard_GS5" + ], "metadata": { "description": "The size of the Virtual Machine." } @@ -78,25 +115,32 @@ "metadata": { "description": "Enable or disable VM diagnostics." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "adminUsername":"[parameters('linuxAdminUsername')]", - "agentCount":"[parameters('agentCount')]", - "agentsEndpointDNSNamePrefix":"[concat(parameters('dnsNamePrefix'),'agents')]", - "agentVMSize":"[parameters('agentVMSize')]", - "masterCount":"[parameters('masterCount')]", - "mastersEndpointDNSNamePrefix":"[concat(parameters('dnsNamePrefix'),'mgmt')]", - "orchestratorType":"[parameters('orchestratorType')]", - "sshRSAPublicKey":"[parameters('sshRSAPublicKey')]", - "enableDiagnostics":"[parameters('enableDiagnostics')]" + "adminUsername": "[parameters('linuxAdminUsername')]", + "agentCount": "[parameters('agentCount')]", + "agentsEndpointDNSNamePrefix": "[concat(parameters('dnsNamePrefix'),'agents')]", + "agentVMSize": "[parameters('agentVMSize')]", + "masterCount": "[parameters('masterCount')]", + "mastersEndpointDNSNamePrefix": "[concat(parameters('dnsNamePrefix'),'mgmt')]", + "orchestratorType": "[parameters('orchestratorType')]", + "sshRSAPublicKey": "[parameters('sshRSAPublicKey')]", + "enableDiagnostics": "[parameters('enableDiagnostics')]" }, "resources": [ { "apiVersion": "2016-09-30", "type": "Microsoft.ContainerService/containerServices", - "location": "[resourceGroup().location]", - "name":"[concat('containerservice-',resourceGroup().name)]", + "location": "[parameters('location')]", + "name": "[concat('containerservice-',resourceGroup().name)]", "properties": { "orchestratorProfile": { "orchestratorType": "[variables('orchestratorType')]" @@ -114,8 +158,8 @@ } ], "diagnosticsProfile": { - "vmDiagnostics" : { - "enabled": "[variables('enableDiagnostics')]" + "vmDiagnostics": { + "enabled": "[variables('enableDiagnostics')]" } }, "linuxProfile": { diff --git a/101-acs-kubernetes/azuredeploy.json b/101-acs-kubernetes/azuredeploy.json index d9554b92ef26..03a8bf27003d 100644 --- a/101-acs-kubernetes/azuredeploy.json +++ b/101-acs-kubernetes/azuredeploy.json @@ -14,8 +14,8 @@ "metadata": { "description": "The number of agents for the cluster. This value can be from 1 to 100 (note, for Kubernetes clusters you will also get 1 or 2 public agents in addition to these seleted masters)" }, - "minValue":1, - "maxValue":100 + "minValue": 1, + "maxValue": 100 }, "agentVMSize": { "type": "string", @@ -71,11 +71,18 @@ }, "type": "securestring", "defaultValue": "n/a" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "agentsEndpointDNSNamePrefix":"[concat(parameters('dnsNamePrefix'),'agents')]", - "mastersEndpointDNSNamePrefix":"[concat(parameters('dnsNamePrefix'),'mgmt')]", + "agentsEndpointDNSNamePrefix": "[concat(parameters('dnsNamePrefix'),'agents')]", + "mastersEndpointDNSNamePrefix": "[concat(parameters('dnsNamePrefix'),'mgmt')]", "useServicePrincipalDictionary": { "DCOS": 0, "Swarm": 0, @@ -94,8 +101,8 @@ { "apiVersion": "2016-09-30", "type": "Microsoft.ContainerService/containerServices", - "location": "[resourceGroup().location]", - "name":"[concat('containerservice-',resourceGroup().name)]", + "location": "[parameters('location')]", + "name": "[concat('containerservice-',resourceGroup().name)]", "properties": { "orchestratorProfile": { "orchestratorType": "[parameters('orchestratorType')]" diff --git a/101-acs-swarm/azuredeploy.json b/101-acs-swarm/azuredeploy.json index 5935969bb935..e33b97df3d2a 100644 --- a/101-acs-swarm/azuredeploy.json +++ b/101-acs-swarm/azuredeploy.json @@ -14,24 +14,61 @@ "metadata": { "description": "The number of swarm nodes for the cluster. This value can be from 1 to 100" }, - "minValue":1, - "maxValue":100 + "minValue": 1, + "maxValue": 100 }, "agentVMSize": { "type": "string", "defaultValue": "Standard_D2_v2", "allowedValues": [ - "Standard_A0", "Standard_A1", "Standard_A2", "Standard_A3", "Standard_A4", "Standard_A5", - "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A9", "Standard_A10", "Standard_A11", - "Standard_D1", "Standard_D2", "Standard_D3", "Standard_D4", - "Standard_D11", "Standard_D12", "Standard_D13", "Standard_D14", - "Standard_D1_v2", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", - "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", - "Standard_G1", "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", - "Standard_DS1", "Standard_DS2", "Standard_DS3", "Standard_DS4", - "Standard_DS11", "Standard_DS12", "Standard_DS13", "Standard_DS14", - "Standard_GS1", "Standard_GS2", "Standard_GS3", "Standard_GS4", "Standard_GS5" - ], + "Standard_A0", + "Standard_A1", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_A8", + "Standard_A9", + "Standard_A10", + "Standard_A11", + "Standard_D1", + "Standard_D2", + "Standard_D3", + "Standard_D4", + "Standard_D11", + "Standard_D12", + "Standard_D13", + "Standard_D14", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_G1", + "Standard_G2", + "Standard_G3", + "Standard_G4", + "Standard_G5", + "Standard_DS1", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS11", + "Standard_DS12", + "Standard_DS13", + "Standard_DS14", + "Standard_GS1", + "Standard_GS2", + "Standard_GS3", + "Standard_GS4", + "Standard_GS5" + ], "metadata": { "description": "The size of the Virtual Machine." } @@ -78,25 +115,32 @@ "metadata": { "description": "Enable or disable VM diagnostics." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "adminUsername":"[parameters('linuxAdminUsername')]", - "agentCount":"[parameters('agentCount')]", - "agentsEndpointDNSNamePrefix":"[concat(parameters('dnsNamePrefix'),'agents')]", - "agentVMSize":"[parameters('agentVMSize')]", - "masterCount":"[parameters('masterCount')]", - "mastersEndpointDNSNamePrefix":"[concat(parameters('dnsNamePrefix'),'mgmt')]", - "orchestratorType":"[parameters('orchestratorType')]", - "sshRSAPublicKey":"[parameters('sshRSAPublicKey')]", - "enableDiagnostics":"[parameters('enableDiagnostics')]" + "adminUsername": "[parameters('linuxAdminUsername')]", + "agentCount": "[parameters('agentCount')]", + "agentsEndpointDNSNamePrefix": "[concat(parameters('dnsNamePrefix'),'agents')]", + "agentVMSize": "[parameters('agentVMSize')]", + "masterCount": "[parameters('masterCount')]", + "mastersEndpointDNSNamePrefix": "[concat(parameters('dnsNamePrefix'),'mgmt')]", + "orchestratorType": "[parameters('orchestratorType')]", + "sshRSAPublicKey": "[parameters('sshRSAPublicKey')]", + "enableDiagnostics": "[parameters('enableDiagnostics')]" }, "resources": [ { "apiVersion": "2016-09-30", "type": "Microsoft.ContainerService/containerServices", - "location": "[resourceGroup().location]", - "name":"[concat('containerservice-',resourceGroup().name)]", + "location": "[parameters('location')]", + "name": "[concat('containerservice-',resourceGroup().name)]", "properties": { "orchestratorProfile": { "orchestratorType": "[variables('orchestratorType')]" @@ -114,8 +158,8 @@ } ], "diagnosticsProfile": { - "vmDiagnostics" : { - "enabled": "[variables('enableDiagnostics')]" + "vmDiagnostics": { + "enabled": "[variables('enableDiagnostics')]" } }, "linuxProfile": { diff --git a/101-acsengine-swarmmode/azuredeploy.json b/101-acsengine-swarmmode/azuredeploy.json index b29f7b11810a..e13a239bc9aa 100644 --- a/101-acsengine-swarmmode/azuredeploy.json +++ b/101-acsengine-swarmmode/azuredeploy.json @@ -229,7 +229,7 @@ "type": "string" }, "location": { - "defaultValue": "", + "defaultValue": "[resourceGroup().location]", "metadata": { "description": "Sets the location for all resources in the cluster" }, @@ -389,7 +389,7 @@ "dataStorageAccountPrefixSeed": 97, "location": "[variables('locations')[mod(add(2,length(parameters('location'))),add(1,length(parameters('location'))))]]", "locations": [ - "[resourceGroup().location]", + "[parameters('location')]", "[parameters('location')]" ], "masterAvailabilitySet": "[concat(variables('orchestratorName'), '-master-availabilitySet-', variables('nameSuffix'))]", diff --git a/101-api-management-create-with-msi/azuredeploy.json b/101-api-management-create-with-msi/azuredeploy.json index 0974211823cc..89607d65c622 100644 --- a/101-api-management-create-with-msi/azuredeploy.json +++ b/101-api-management-create-with-msi/azuredeploy.json @@ -1,62 +1,69 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "publisherEmail": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The email address of the owner of the service" - } - }, - "publisherName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The name of the owner of the service" - } - }, - "sku": { - "type": "string", - "allowedValues": [ - "Developer", - "Standard", - "Premium" - ], - "defaultValue": "Developer", - "metadata": { - "description": "The pricing tier of this API Management service" - } - }, - "skuCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance size of this API Management service." - } - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "publisherEmail": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The email address of the owner of the service" + } }, - "variables": { - "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + "publisherName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The name of the owner of the service" + } }, - "resources": [ - { - "apiVersion": "2017-03-01", - "name": "[variables('apiManagementServiceName')]", - "type": "Microsoft.ApiManagement/service", - "location": "[resourceGroup().location]", - "tags": {}, - "sku": { - "name": "[parameters('sku')]", - "capacity": "[parameters('skuCount')]" - }, - "properties": { - "publisherEmail": "[parameters('publisherEmail')]", - "publisherName": "[parameters('publisherName')]" - }, - "identity": { - "type": "systemAssigned" - } - } - ] -} \ No newline at end of file + "sku": { + "type": "string", + "allowedValues": [ + "Developer", + "Standard", + "Premium" + ], + "defaultValue": "Developer", + "metadata": { + "description": "The pricing tier of this API Management service" + } + }, + "skuCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance size of this API Management service." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "name": "[variables('apiManagementServiceName')]", + "type": "Microsoft.ApiManagement/service", + "location": "[parameters('location')]", + "tags": {}, + "sku": { + "name": "[parameters('sku')]", + "capacity": "[parameters('skuCount')]" + }, + "properties": { + "publisherEmail": "[parameters('publisherEmail')]", + "publisherName": "[parameters('publisherName')]" + }, + "identity": { + "type": "systemAssigned" + } + } + ] +} diff --git a/101-app-service-certificate-standard/azuredeploy.json b/101-app-service-certificate-standard/azuredeploy.json index 45230e1fc366..321a45a0a156 100644 --- a/101-app-service-certificate-standard/azuredeploy.json +++ b/101-app-service-certificate-standard/azuredeploy.json @@ -1,129 +1,136 @@ { - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "certificateOrderName":{ - "type":"string", - "metadata":{ - "description":"Name of the App Service Certificate" - } - }, - "productType":{ - "type":"string", - "allowedValues":[ - "StandardDomainValidatedSsl", - "StandardDomainValidatedWildCardSsl" - ], - "defaultValue":"StandardDomainValidatedSsl", - "metadata":{ - "description":"App Service Certificate type" - } - }, - "existingKeyVaultId":{ - "type":"string", - "metadata":{ - "description":"Existing Key Vault resource Id that already has access policies to allow Microsoft.CertificateRegistration and Microsoft.Web RPs to perform required operations on secret (Checkout README.md for more information)" - } - }, - "existingAppName":{ - "type":"string", - "metadata":{ - "description":"Existing App name to use for verification and assignment. This App should have the domain assigned as a custom domain" - } - }, - "rootHostname":{ - "type":"string", - "metadata":{ - "description":"Hostname for App Service Certificate. The root and www subdomain should be assigned to the Web App as custom domains" - } - }, - "existingAppLocation":{ - "type":"string", - "metadata":{ - "description":"App location" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "certificateOrderName": { + "type": "string", + "metadata": { + "description": "Name of the App Service Certificate" } - }, - "variables":{ - "distinguishedName":"[concat('CN=', parameters('rootHostname'))]", - "wwwHostname":"[concat('www.', parameters('rootHostname'))]" - }, - "resources":[ - { - "type":"Microsoft.CertificateRegistration/certificateOrders", - "name":"[parameters('certificateOrderName')]", - "apiVersion":"2015-08-01", - "location":"global", - "properties":{ - "DistinguishedName":"[variables('distinguishedName')]", - "ValidityInYears":1, - "ProductType":"[parameters('productType')]" - } - }, - { - "type":"Microsoft.Web/sites/domainOwnershipIdentifiers", - "name":"[concat(parameters('existingAppName'), concat('/', parameters('certificateOrderName')))]", - "apiVersion":"2016-08-01", - "location":"[parameters('existingAppLocation')]", - "dependsOn":[ - "[resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))]" - ], - "properties":{ - "id":"[reference(resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))).DomainVerificationToken]" - } - }, - { - "type":"Microsoft.CertificateRegistration/certificateOrders/certificates", - "name":"[concat(parameters('certificateOrderName'), concat('/', parameters('certificateOrderName')))]", - "apiVersion":"2015-08-01", - "location":"global", - "dependsOn":[ - "[resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))]", - "[resourceId('Microsoft.Web/sites/domainOwnershipIdentifiers', parameters('existingAppName'), parameters('certificateOrderName'))]" - ], - "properties":{ - "keyVaultId":"[parameters('existingKeyVaultId')]", - "keyVaultSecretName":"[parameters('certificateOrderName')]" - } - }, - { - "type":"Microsoft.Web/certificates", - "name":"[parameters('certificateOrderName')]", - "apiVersion":"2015-08-01", - "location":"[parameters('existingAppLocation')]", - "dependsOn":[ - "[resourceId('Microsoft.CertificateRegistration/certificateOrders/certificates', parameters('certificateOrderName'), parameters('certificateOrderName'))]" - ], - "properties":{ - "keyVaultId":"[parameters('existingKeyVaultId')]", - "keyVaultSecretName":"[parameters('certificateOrderName')]" - } - }, - { - "type":"Microsoft.Web/sites", - "name":"[parameters('existingAppName')]", - "apiVersion":"2015-08-01", - "location":"[parameters('existingAppLocation')]", - "dependsOn":[ - "[resourceId('Microsoft.Web/certificates', parameters('certificateOrderName'))]" - ], - "properties":{ - "name":"[parameters('existingAppName')]", - "hostNameSslStates":[ - { - "name":"[parameters('rootHostname')]", - "sslState":1, - "thumbprint":"[reference(resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))).SignedCertificate.Thumbprint]", - "toUpdate":true - }, - { - "name":"[variables('wwwHostname')]", - "sslState":1, - "thumbprint":"[reference(resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))).SignedCertificate.Thumbprint]", - "toUpdate":true - } - ] - } + }, + "productType": { + "type": "string", + "allowedValues": [ + "StandardDomainValidatedSsl", + "StandardDomainValidatedWildCardSsl" + ], + "defaultValue": "StandardDomainValidatedSsl", + "metadata": { + "description": "App Service Certificate type" } - ] -} \ No newline at end of file + }, + "existingKeyVaultId": { + "type": "string", + "metadata": { + "description": "Existing Key Vault resource Id that already has access policies to allow Microsoft.CertificateRegistration and Microsoft.Web RPs to perform required operations on secret (Checkout README.md for more information)" + } + }, + "existingAppName": { + "type": "string", + "metadata": { + "description": "Existing App name to use for verification and assignment. This App should have the domain assigned as a custom domain" + } + }, + "rootHostname": { + "type": "string", + "metadata": { + "description": "Hostname for App Service Certificate. The root and www subdomain should be assigned to the Web App as custom domains" + } + }, + "existingAppLocation": { + "type": "string", + "metadata": { + "description": "App location" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "distinguishedName": "[concat('CN=', parameters('rootHostname'))]", + "wwwHostname": "[concat('www.', parameters('rootHostname'))]" + }, + "resources": [ + { + "type": "Microsoft.CertificateRegistration/certificateOrders", + "name": "[parameters('certificateOrderName')]", + "apiVersion": "2015-08-01", + "location": "global", + "properties": { + "DistinguishedName": "[variables('distinguishedName')]", + "ValidityInYears": 1, + "ProductType": "[parameters('productType')]" + } + }, + { + "type": "Microsoft.Web/sites/domainOwnershipIdentifiers", + "name": "[concat(parameters('existingAppName'), concat('/', parameters('certificateOrderName')))]", + "apiVersion": "2016-08-01", + "location": "[parameters('existingAppLocation')]", + "dependsOn": [ + "[resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))]" + ], + "properties": { + "id": "[reference(resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))).DomainVerificationToken]" + } + }, + { + "type": "Microsoft.CertificateRegistration/certificateOrders/certificates", + "name": "[concat(parameters('certificateOrderName'), concat('/', parameters('certificateOrderName')))]", + "apiVersion": "2015-08-01", + "location": "global", + "dependsOn": [ + "[resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))]", + "[resourceId('Microsoft.Web/sites/domainOwnershipIdentifiers', parameters('existingAppName'), parameters('certificateOrderName'))]" + ], + "properties": { + "keyVaultId": "[parameters('existingKeyVaultId')]", + "keyVaultSecretName": "[parameters('certificateOrderName')]" + } + }, + { + "type": "Microsoft.Web/certificates", + "name": "[parameters('certificateOrderName')]", + "apiVersion": "2015-08-01", + "location": "[parameters('existingAppLocation')]", + "dependsOn": [ + "[resourceId('Microsoft.CertificateRegistration/certificateOrders/certificates', parameters('certificateOrderName'), parameters('certificateOrderName'))]" + ], + "properties": { + "keyVaultId": "[parameters('existingKeyVaultId')]", + "keyVaultSecretName": "[parameters('certificateOrderName')]" + } + }, + { + "type": "Microsoft.Web/sites", + "name": "[parameters('existingAppName')]", + "apiVersion": "2015-08-01", + "location": "[parameters('existingAppLocation')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/certificates', parameters('certificateOrderName'))]" + ], + "properties": { + "name": "[parameters('existingAppName')]", + "hostNameSslStates": [ + { + "name": "[parameters('rootHostname')]", + "sslState": 1, + "thumbprint": "[reference(resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))).SignedCertificate.Thumbprint]", + "toUpdate": true + }, + { + "name": "[variables('wwwHostname')]", + "sslState": 1, + "thumbprint": "[reference(resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))).SignedCertificate.Thumbprint]", + "toUpdate": true + } + ] + } + } + ] +} diff --git a/101-app-service-certificate-wildcard/azuredeploy.json b/101-app-service-certificate-wildcard/azuredeploy.json index 6e7a7b2c91a1..36ba9efc1cf4 100644 --- a/101-app-service-certificate-wildcard/azuredeploy.json +++ b/101-app-service-certificate-wildcard/azuredeploy.json @@ -1,129 +1,136 @@ { - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "certificateOrderName":{ - "type":"string", - "metadata":{ - "description":"Name of the App Service Certificate" - } - }, - "productType":{ - "type":"string", - "allowedValues":[ - "StandardDomainValidatedSsl", - "StandardDomainValidatedWildCardSsl" - ], - "defaultValue":"StandardDomainValidatedWildCardSsl", - "metadata":{ - "description":"App Service Certificate type" - } - }, - "existingKeyVaultId":{ - "type":"string", - "metadata":{ - "description":"Existing Key Vault resource Id that already has access policies to allow Microsoft.CertificateRegistration and Microsoft.Web RPs to perform required operations on secret (Checkout README.md for more information)" - } - }, - "existingAppName":{ - "type":"string", - "metadata":{ - "description":"Existing App name to use for creating SSL bindings. This App should have the domain assigned as a custom domain" - } - }, - "rootHostname":{ - "type":"string", - "metadata":{ - "description":"Hostname for App Service Certificate. The root and www subdomain should be assigned to the Web App as custom domains" - } - }, - "existingAppLocation":{ - "type":"string", - "metadata":{ - "description":"App location" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "certificateOrderName": { + "type": "string", + "metadata": { + "description": "Name of the App Service Certificate" } - }, - "variables":{ - "distinguishedName":"[concat('CN=*.', parameters('rootHostname'))]", - "wwwHostname":"[concat('www.', parameters('rootHostname'))]" - }, - "resources":[ - { - "type":"Microsoft.CertificateRegistration/certificateOrders", - "name":"[parameters('certificateOrderName')]", - "apiVersion":"2015-08-01", - "location":"global", - "properties":{ - "DistinguishedName":"[variables('distinguishedName')]", - "ValidityInYears":1, - "ProductType":"[parameters('productType')]" - } - }, - { - "type":"Microsoft.DomainRegistration/domains/domainOwnershipIdentifiers", - "name":"[concat(parameters('rootHostname'), concat('/', parameters('certificateOrderName')))]", - "apiVersion":"2015-04-01", - "location":"global", - "dependsOn":[ - "[resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))]" - ], - "properties":{ - "ownershipId":"[reference(resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))).DomainVerificationToken]" - } - }, - { - "type":"Microsoft.CertificateRegistration/certificateOrders/certificates", - "name":"[concat(parameters('certificateOrderName'), concat('/', parameters('certificateOrderName')))]", - "apiVersion":"2015-08-01", - "location":"global", - "dependsOn":[ - "[resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))]", - "[resourceId('Microsoft.DomainRegistration/domains/domainOwnershipIdentifiers', parameters('rootHostname'), parameters('certificateOrderName'))]" - ], - "properties":{ - "keyVaultId":"[parameters('existingKeyVaultId')]", - "keyVaultSecretName":"[parameters('certificateOrderName')]" - } - }, - { - "type":"Microsoft.Web/certificates", - "name":"[parameters('certificateOrderName')]", - "apiVersion":"2015-08-01", - "location":"[parameters('existingAppLocation')]", - "dependsOn":[ - "[resourceId('Microsoft.CertificateRegistration/certificateOrders/certificates', parameters('certificateOrderName'), parameters('certificateOrderName'))]" - ], - "properties":{ - "keyVaultId":"[parameters('existingKeyVaultId')]", - "keyVaultSecretName":"[parameters('certificateOrderName')]" - } - }, - { - "type":"Microsoft.Web/sites", - "name":"[parameters('existingAppName')]", - "apiVersion":"2015-08-01", - "location":"[parameters('existingAppLocation')]", - "dependsOn":[ - "[resourceId('Microsoft.Web/certificates', parameters('certificateOrderName'))]" - ], - "properties":{ - "name":"[parameters('existingAppName')]", - "hostNameSslStates":[ - { - "name":"[parameters('rootHostname')]", - "sslState":1, - "thumbprint":"[reference(resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))).SignedCertificate.Thumbprint]", - "toUpdate":true - }, - { - "name":"[variables('wwwHostname')]", - "sslState":1, - "thumbprint":"[reference(resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))).SignedCertificate.Thumbprint]", - "toUpdate":true - } - ] - } + }, + "productType": { + "type": "string", + "allowedValues": [ + "StandardDomainValidatedSsl", + "StandardDomainValidatedWildCardSsl" + ], + "defaultValue": "StandardDomainValidatedWildCardSsl", + "metadata": { + "description": "App Service Certificate type" } - ] -} \ No newline at end of file + }, + "existingKeyVaultId": { + "type": "string", + "metadata": { + "description": "Existing Key Vault resource Id that already has access policies to allow Microsoft.CertificateRegistration and Microsoft.Web RPs to perform required operations on secret (Checkout README.md for more information)" + } + }, + "existingAppName": { + "type": "string", + "metadata": { + "description": "Existing App name to use for creating SSL bindings. This App should have the domain assigned as a custom domain" + } + }, + "rootHostname": { + "type": "string", + "metadata": { + "description": "Hostname for App Service Certificate. The root and www subdomain should be assigned to the Web App as custom domains" + } + }, + "existingAppLocation": { + "type": "string", + "metadata": { + "description": "App location" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "distinguishedName": "[concat('CN=*.', parameters('rootHostname'))]", + "wwwHostname": "[concat('www.', parameters('rootHostname'))]" + }, + "resources": [ + { + "type": "Microsoft.CertificateRegistration/certificateOrders", + "name": "[parameters('certificateOrderName')]", + "apiVersion": "2015-08-01", + "location": "global", + "properties": { + "DistinguishedName": "[variables('distinguishedName')]", + "ValidityInYears": 1, + "ProductType": "[parameters('productType')]" + } + }, + { + "type": "Microsoft.DomainRegistration/domains/domainOwnershipIdentifiers", + "name": "[concat(parameters('rootHostname'), concat('/', parameters('certificateOrderName')))]", + "apiVersion": "2015-04-01", + "location": "global", + "dependsOn": [ + "[resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))]" + ], + "properties": { + "ownershipId": "[reference(resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))).DomainVerificationToken]" + } + }, + { + "type": "Microsoft.CertificateRegistration/certificateOrders/certificates", + "name": "[concat(parameters('certificateOrderName'), concat('/', parameters('certificateOrderName')))]", + "apiVersion": "2015-08-01", + "location": "global", + "dependsOn": [ + "[resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))]", + "[resourceId('Microsoft.DomainRegistration/domains/domainOwnershipIdentifiers', parameters('rootHostname'), parameters('certificateOrderName'))]" + ], + "properties": { + "keyVaultId": "[parameters('existingKeyVaultId')]", + "keyVaultSecretName": "[parameters('certificateOrderName')]" + } + }, + { + "type": "Microsoft.Web/certificates", + "name": "[parameters('certificateOrderName')]", + "apiVersion": "2015-08-01", + "location": "[parameters('existingAppLocation')]", + "dependsOn": [ + "[resourceId('Microsoft.CertificateRegistration/certificateOrders/certificates', parameters('certificateOrderName'), parameters('certificateOrderName'))]" + ], + "properties": { + "keyVaultId": "[parameters('existingKeyVaultId')]", + "keyVaultSecretName": "[parameters('certificateOrderName')]" + } + }, + { + "type": "Microsoft.Web/sites", + "name": "[parameters('existingAppName')]", + "apiVersion": "2015-08-01", + "location": "[parameters('existingAppLocation')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/certificates', parameters('certificateOrderName'))]" + ], + "properties": { + "name": "[parameters('existingAppName')]", + "hostNameSslStates": [ + { + "name": "[parameters('rootHostname')]", + "sslState": 1, + "thumbprint": "[reference(resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))).SignedCertificate.Thumbprint]", + "toUpdate": true + }, + { + "name": "[variables('wwwHostname')]", + "sslState": 1, + "thumbprint": "[reference(resourceId('Microsoft.CertificateRegistration/certificateOrders', parameters('certificateOrderName'))).SignedCertificate.Thumbprint]", + "toUpdate": true + } + ] + } + } + ] +} diff --git a/101-application-gateway-create/azuredeploy.json b/101-application-gateway-create/azuredeploy.json index b64e162b2125..60c3b7b92f81 100644 --- a/101-application-gateway-create/azuredeploy.json +++ b/101-application-gateway-create/azuredeploy.json @@ -105,6 +105,13 @@ "metadata": { "description": "cookie based affinity" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -117,7 +124,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -138,7 +145,7 @@ "apiVersion": "2017-06-01", "name": "[parameters('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" ], @@ -229,4 +236,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-application-gateway-public-ip-ssl-offload/azuredeploy.json b/101-application-gateway-public-ip-ssl-offload/azuredeploy.json index 72e2dd3a8a81..7b3853eb96df 100644 --- a/101-application-gateway-public-ip-ssl-offload/azuredeploy.json +++ b/101-application-gateway-public-ip-ssl-offload/azuredeploy.json @@ -58,6 +58,13 @@ "metadata": { "description": "Password for .pfx certificate" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -76,7 +83,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -85,7 +92,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -106,7 +113,7 @@ "apiVersion": "2017-06-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -216,4 +223,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-application-gateway-public-ip/azuredeploy.json b/101-application-gateway-public-ip/azuredeploy.json index 4bc0a1057931..85f7ab4387b4 100644 --- a/101-application-gateway-public-ip/azuredeploy.json +++ b/101-application-gateway-public-ip/azuredeploy.json @@ -46,6 +46,13 @@ "metadata": { "description": "IP Address for Backend Server 2" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -64,7 +71,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -73,7 +80,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -94,7 +101,7 @@ "apiVersion": "2017-06-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -193,4 +200,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-application-gateway-redirect/azuredeploy.json b/101-application-gateway-redirect/azuredeploy.json index 088e496b3440..077768bd6581 100644 --- a/101-application-gateway-redirect/azuredeploy.json +++ b/101-application-gateway-redirect/azuredeploy.json @@ -84,6 +84,13 @@ "metadata": { "description": "Password for .pfx certificate" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -99,7 +106,7 @@ "apiVersion": "2017-03-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -108,7 +115,7 @@ "apiVersion": "2017-03-01", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -129,7 +136,7 @@ "apiVersion": "2017-06-01", "name": "[parameters('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -346,4 +353,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-application-gateway-waf/azuredeploy.json b/101-application-gateway-waf/azuredeploy.json index 2a0937cb4f31..b15bfbe14184 100644 --- a/101-application-gateway-waf/azuredeploy.json +++ b/101-application-gateway-waf/azuredeploy.json @@ -98,6 +98,13 @@ "metadata": { "description": "WAF Rule Set Version" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -114,7 +121,7 @@ "apiVersion": "2017-03-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -123,7 +130,7 @@ "apiVersion": "2017-03-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -144,7 +151,7 @@ "apiVersion": "2017-06-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('virtualNetworkName')]", "[variables('publicIPAddressName')]" @@ -250,4 +257,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-automation-configuration/azuredeploy.json b/101-automation-configuration/azuredeploy.json index 85f4242a6c55..f234f04f583a 100644 --- a/101-automation-configuration/azuredeploy.json +++ b/101-automation-configuration/azuredeploy.json @@ -264,4 +264,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/101-automation-configuration/nested/provisionDNS.json b/101-automation-configuration/nested/provisionDNS.json index 7044bf46d323..1e2c7a8d9ea6 100644 --- a/101-automation-configuration/nested/provisionDNS.json +++ b/101-automation-configuration/nested/provisionDNS.json @@ -6,7 +6,8 @@ "type": "string", "metadata": { "Description": "The region to deploy the resources into" - } + }, + "defaultValue": "[resourceGroup().location]" }, "virtualNetworkName": { "type": "string", @@ -53,5 +54,5 @@ } } ], - "outputs": {} + "outputs": {} } diff --git a/101-automation-configuration/nested/provisionNetwork.json b/101-automation-configuration/nested/provisionNetwork.json index 8c600f00e4d0..fa7cec38565a 100644 --- a/101-automation-configuration/nested/provisionNetwork.json +++ b/101-automation-configuration/nested/provisionNetwork.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "virtualNetworkName": { "type": "string" diff --git a/101-automation-configuration/nested/provisionServer.json b/101-automation-configuration/nested/provisionServer.json index f3cafacc9a8b..ab3f8fd1f755 100644 --- a/101-automation-configuration/nested/provisionServer.json +++ b/101-automation-configuration/nested/provisionServer.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "vmName": { "type": "string" @@ -28,8 +29,7 @@ "defaultValue": "DomainControllerConfig.localhost" } }, - "variables": { - }, + "variables": {}, "resources": [ { "name": "[parameters('automationAccountName')]", @@ -102,7 +102,7 @@ "autoUpgradeMinorVersion": true, "protectedSettings": { "Items": { - "registrationKeyPrivate": "[listKeys(resourceId('Microsoft.Automation/automationAccounts/', parameters('automationAccountName')), '2018-01-15').Keys[0].value]" + "registrationKeyPrivate": "[listKeys(resourceId('Microsoft.Automation/automationAccounts/', parameters('automationAccountName')), '2018-01-15').Keys[0].value]" } }, "settings": { @@ -110,20 +110,20 @@ { "Name": "RegistrationKey", "Value": { - "UserName": "PLACEHOLDER_DONOTUSE", - "Password": "PrivateSettingsRef:registrationKeyPrivate" + "UserName": "PLACEHOLDER_DONOTUSE", + "Password": "PrivateSettingsRef:registrationKeyPrivate" }, "TypeName": "System.Management.Automation.PSCredential" }, { - "Name": "RegistrationUrl", - "Value": "[reference(concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))).registrationUrl]", - "TypeName": "System.String" + "Name": "RegistrationUrl", + "Value": "[reference(concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))).registrationUrl]", + "TypeName": "System.String" }, { - "Name": "NodeConfigurationName", - "Value": "[parameters('nodeConfigurationName')]", - "TypeName": "System.String" + "Name": "NodeConfigurationName", + "Value": "[parameters('nodeConfigurationName')]", + "TypeName": "System.String" }, { "Name": "ConfigurationMode", diff --git a/101-availability-set-create-3FDs-20UDs/azuredeploy.json b/101-availability-set-create-3FDs-20UDs/azuredeploy.json index 045ac72b8904..458d4dd58546 100644 --- a/101-availability-set-create-3FDs-20UDs/azuredeploy.json +++ b/101-availability-set-create-3FDs-20UDs/azuredeploy.json @@ -1,13 +1,21 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": { }, + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, "resources": [ { "type": "Microsoft.Compute/availabilitySets", "name": "availabilitySet1", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": 3, "platformUpdateDomainCount": "20" diff --git a/101-azure-api-management-create/azuredeploy.json b/101-azure-api-management-create/azuredeploy.json index e040b910e729..a703edec14d9 100644 --- a/101-azure-api-management-create/azuredeploy.json +++ b/101-azure-api-management-create/azuredeploy.json @@ -1,63 +1,70 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "publisherEmail": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The email address of the owner of the service" - } - }, - "publisherName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The name of the owner of the service" - } - }, - "sku": { - "type": "string", - "allowedValues": [ - "Developer", - "Standard", - "Premium" - ], - "defaultValue": "Developer", - "metadata": { - "description": "The pricing tier of this API Management service" - } - }, - "skuCount": { - "type": "string", - "allowedValues": [ - "1", - "2" - ], - "defaultValue": "1", - "metadata": { - "description": "The instance size of this API Management service." - } - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "publisherEmail": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The email address of the owner of the service" + } }, - "variables": { - "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + "publisherName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The name of the owner of the service" + } }, - "resources": [ - { - "apiVersion": "2017-03-01", - "name": "[variables('apiManagementServiceName')]", - "type": "Microsoft.ApiManagement/service", - "location": "West US", - "tags": {}, - "sku": { - "name": "[parameters('sku')]", - "capacity": "[parameters('skuCount')]" - }, - "properties": { - "publisherEmail": "[parameters('publisherEmail')]", - "publisherName": "[parameters('publisherName')]" - } - } - ] + "sku": { + "type": "string", + "allowedValues": [ + "Developer", + "Standard", + "Premium" + ], + "defaultValue": "Developer", + "metadata": { + "description": "The pricing tier of this API Management service" + } + }, + "skuCount": { + "type": "string", + "allowedValues": [ + "1", + "2" + ], + "defaultValue": "1", + "metadata": { + "description": "The instance size of this API Management service." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "name": "[variables('apiManagementServiceName')]", + "type": "Microsoft.ApiManagement/service", + "location": "West US", + "tags": {}, + "sku": { + "name": "[parameters('sku')]", + "capacity": "[parameters('skuCount')]" + }, + "properties": { + "publisherEmail": "[parameters('publisherEmail')]", + "publisherName": "[parameters('publisherName')]" + } + } + ] } diff --git a/101-azure-dns-new-zone/azuredeploy.json b/101-azure-dns-new-zone/azuredeploy.json index 1c9f7e2a8aff..cb38503fbcea 100644 --- a/101-azure-dns-new-zone/azuredeploy.json +++ b/101-azure-dns-new-zone/azuredeploy.json @@ -15,6 +15,13 @@ "metadata": { "description": "The name of the DNS record to be created. The name is relative to the zone, not the FQDN." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -23,7 +30,7 @@ "name": "[parameters('newZoneName')]", "apiVersion": "2016-04-01", "location": "global", - "properties": { } + "properties": {} }, { "type": "Microsoft.Network/dnszones/a", diff --git a/101-azure-relay-create-namespace/azuredeploy.json b/101-azure-relay-create-namespace/azuredeploy.json index 746792f6d0e1..285d0d161d0f 100644 --- a/101-azure-relay-create-namespace/azuredeploy.json +++ b/101-azure-relay-create-namespace/azuredeploy.json @@ -7,10 +7,17 @@ "metadata": { "description": "Name of the Azure Relay namespace" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-07-01", "defaultSASKeyName": "RootManageSharedAccessKey", "defaultAuthRuleResourceId": "[resourceId('Microsoft.Relay/namespaces/authorizationRules', parameters('name'), variables('defaultSASKeyName'))]" @@ -35,4 +42,4 @@ "value": "[listkeys(variables('defaultAuthRuleResourceId'), variables('apiVersion')).primaryKey]" } } -} \ No newline at end of file +} diff --git a/101-azure-search-create/azuredeploy.json b/101-azure-search-create/azuredeploy.json index c7d80ee4e4fa..745eacf4560a 100644 --- a/101-azure-search-create/azuredeploy.json +++ b/101-azure-search-create/azuredeploy.json @@ -58,6 +58,13 @@ "metadata": { "description": "Applicable only for SKU set to standard3. You can set this property to enable a single, high density partition that allows up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -65,7 +72,7 @@ "apiVersion": "2015-08-19", "name": "[parameters('name')]", "type": "Microsoft.Search/searchServices", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[toLower(parameters('sku'))]" }, @@ -76,4 +83,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-backup-vault-create/azuredeploy.json b/101-backup-vault-create/azuredeploy.json index 4108ff4dd830..b78640f9e77b 100644 --- a/101-backup-vault-create/azuredeploy.json +++ b/101-backup-vault-create/azuredeploy.json @@ -17,6 +17,13 @@ "metadata": { "description": "SKU for the vault" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -24,7 +31,7 @@ "type": "Microsoft.Backup/BackupVault", "apiVersion": "2015-03-15", "name": "[parameters('vaultName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "sku": { "name": "[parameters('skuName')]" diff --git a/101-batchaccount-with-storage/azuredeploy.json b/101-batchaccount-with-storage/azuredeploy.json index 32aea1b99131..53ddad3bd05d 100644 --- a/101-batchaccount-with-storage/azuredeploy.json +++ b/101-batchaccount-with-storage/azuredeploy.json @@ -20,16 +20,24 @@ "metadata": { "description": "Storage Account type" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" }, - "resources": [{ + "resources": [ + { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountname')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This storage account is used to associate to a batch account", "sku": { "name": "[parameters('storageAccountsku')]" @@ -44,7 +52,7 @@ "type": "Microsoft.Batch/batchAccounts", "name": "[parameters('batchAccountName')]", "apiVersion": "2015-12-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "ObjectName": "[parameters('batchAccountName')]" }, diff --git a/101-cdn-with-custom-origin/azuredeploy.json b/101-cdn-with-custom-origin/azuredeploy.json index ea6d55fcf577..6feb9fcbddf4 100644 --- a/101-cdn-with-custom-origin/azuredeploy.json +++ b/101-cdn-with-custom-origin/azuredeploy.json @@ -31,25 +31,31 @@ "Standard_Verizon", "Premium_Verizon" ] + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "name": "[parameters('profileName')]", "type": "Microsoft.Cdn/profiles", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-04-02", "sku": { "name": "[parameters('CDNSku')]" }, - "resources": - [ + "resources": [ { "apiVersion": "2016-04-02", "dependsOn": [ "[resourceId('Microsoft.Cdn/profiles', parameters('profileName'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[parameters('endpointName')]", "type": "endpoints", "properties": { diff --git a/101-container-registry/azuredeploy.json b/101-container-registry/azuredeploy.json index 3faee7868aad..0133cad5d8bf 100644 --- a/101-container-registry/azuredeploy.json +++ b/101-container-registry/azuredeploy.json @@ -28,6 +28,13 @@ "metadata": { "description": "Type of the storage account that will store container registry datas." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -39,7 +46,7 @@ "name": "[variables('acrStorageName')]", "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This storage account is used by Container Registry for storing its datas.", "dependsOn": [], "tags": { @@ -54,7 +61,7 @@ "name": "[parameters('acrName')]", "type": "Microsoft.ContainerRegistry/registries", "apiVersion": "2016-06-27-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Container registry for storing docker images", "dependsOn": [ "[variables('acrStorageId')]" @@ -78,4 +85,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/101-cosmosdb-api-for-mongodb-account-create/azuredeploy.json b/101-cosmosdb-api-for-mongodb-account-create/azuredeploy.json index b1e3e48bd8c1..0f30647656f8 100644 --- a/101-cosmosdb-api-for-mongodb-account-create/azuredeploy.json +++ b/101-cosmosdb-api-for-mongodb-account-create/azuredeploy.json @@ -7,6 +7,13 @@ "metadata": { "description": "The MongoDB database account name. Needs to be globally unique." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -16,11 +23,11 @@ "type": "Microsoft.DocumentDB/databaseAccounts", "kind": "MongoDB", "name": "[parameters('databaseAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "databaseAccountOfferType": "Standard", "name": "[parameters('databaseAccountName')]" } } ] -} \ No newline at end of file +} diff --git a/101-cosmosdb-create-arm-template/azuredeploy.json b/101-cosmosdb-create-arm-template/azuredeploy.json index 4d80de093bdf..d0ad5ace7eb9 100644 --- a/101-cosmosdb-create-arm-template/azuredeploy.json +++ b/101-cosmosdb-create-arm-template/azuredeploy.json @@ -21,6 +21,13 @@ "metadata": { "description": "The Azure Cosmos DB account name." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -32,17 +39,17 @@ "type": "Microsoft.DocumentDB/databaseAccounts", "kind": "[if(equals(parameters('apiType'), 'MongoDB'), 'MongoDB', 'GlobalDocumentDB')]", "name": "[parameters('databaseAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "name": "[parameters('databaseAccountName')]", "databaseAccountOfferType": "[variables('offerType')]", "locations": [ { - "locationName": "[resourceGroup().location]", + "locationName": "[parameters('location')]", "failoverPriority": 0 }, { - "locationName": "[resourceGroup().location]", + "locationName": "[parameters('location')]", "failoverPriority": 1 } ], @@ -57,4 +64,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-cosmosdb-create-multi-region-account/azuredeploy.json b/101-cosmosdb-create-multi-region-account/azuredeploy.json index 368917416e9b..336ed51ddd66 100644 --- a/101-cosmosdb-create-multi-region-account/azuredeploy.json +++ b/101-cosmosdb-create-multi-region-account/azuredeploy.json @@ -11,7 +11,8 @@ "writeRegionLocation": { "type": "string", "metadata": { - "description": "The location of the write region of the database account. For Azure Gov, China, and Germany, the allowed values are different." }, + "description": "The location of the write region of the database account. For Azure Gov, China, and Germany, the allowed values are different." + }, "allowedValues": [ "eastasia", "southeastasia", @@ -74,6 +75,13 @@ "koreacentral", "koreasouth" ] + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -84,7 +92,7 @@ "apiVersion": "2015-04-08", "type": "Microsoft.DocumentDB/databaseAccounts", "name": "[parameters('databaseAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "name": "[parameters('databaseAccountName')]", "databaseAccountOfferType": "[variables('offerType')]", @@ -101,4 +109,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-create-ase-with-webapp/azuredeploy.json b/101-create-ase-with-webapp/azuredeploy.json index 51d686069aa8..a58cdb3a156b 100644 --- a/101-create-ase-with-webapp/azuredeploy.json +++ b/101-create-ase-with-webapp/azuredeploy.json @@ -1,6 +1,6 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": { "ASE-APP-SERVICE-APPWorkerSize": { "type": "string", @@ -63,7 +63,7 @@ "ASE-frontEndCount": { "type": "int", "defaultValue": 2, - "minValue" : 2, + "minValue": 2, "metadata": { "description": "Number of instances in the front-end pool. Minimum of two." } @@ -147,6 +147,13 @@ "metadata": { "description": "Defines the number of workers from the worker pool that will be used by the app service plan." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -164,7 +171,7 @@ { "name": "[variables('ASE-VNET-Name')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -197,7 +204,6 @@ "type": "Microsoft.Web/hostingEnvironments", "name": "[variables('ASE-Name')]", "location": "[parameters('ASE-Location')]", - "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks', variables('ASE-VNET-Name'))]" ], @@ -240,7 +246,9 @@ "type": "Microsoft.Web/serverfarms", "location": "[parameters('ASE-Location')]", "apiVersion": "2014-06-01", - "dependsOn": [ "[resourceId('Microsoft.Web/hostingEnvironments', variables('ASE-Name'))]" ], + "dependsOn": [ + "[resourceId('Microsoft.Web/hostingEnvironments', variables('ASE-Name'))]" + ], "tags": { "displayName": "ASE-APP-SERVICE-APP" }, @@ -277,6 +285,5 @@ } } ], - "outputs": { - } + "outputs": {} } diff --git a/101-data-factory-blob-to-sql-copy-stored-proc/azuredeploy.json b/101-data-factory-blob-to-sql-copy-stored-proc/azuredeploy.json index f78efd92d553..7ad14192e3dd 100644 --- a/101-data-factory-blob-to-sql-copy-stored-proc/azuredeploy.json +++ b/101-data-factory-blob-to-sql-copy-stored-proc/azuredeploy.json @@ -67,6 +67,13 @@ "metadata": { "description": "Name of the stored procedure that upserts (updates/inserts) data into the target table." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -83,7 +90,7 @@ "name": "[variables('dataFactoryName')]", "apiVersion": "2015-10-01", "type": "Microsoft.DataFactory/datafactories", - "location": "West US", + "location": "[parameters('location')]", "resources": [ { "type": "linkedservices", @@ -254,4 +261,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/101-data-factory-chained-copy-activities/azuredeploy.json b/101-data-factory-chained-copy-activities/azuredeploy.json index 2f2d9970d5f9..2e06a6912381 100644 --- a/101-data-factory-chained-copy-activities/azuredeploy.json +++ b/101-data-factory-chained-copy-activities/azuredeploy.json @@ -1,370 +1,379 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "dataLakeStoreUri": { - "type": "string", - "metadata": { - "description": "URI of Azure Data Lake store" - } - }, - "dataLakeStoreServicePrincipalID": { - "type": "string", - "metadata": { - "description": "ID of Azure Service Principal used for accessing Data Lake" - } - }, - "dataLakeStoreServicePrincipalKey": { - "type": "securestring", - "metadata": { - "description": "Key for Azure Service Principal used for accessing Data Lake" - } - }, - "azureSQLConnectionString": { - "type": "securestring", - "metadata": { - "description": "Connection string for Azure SQL Database" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "dataLakeStoreUri": { + "type": "string", + "metadata": { + "description": "URI of Azure Data Lake store" } }, - "variables": { - "dataFactoryName": "[concat('CopyFromSQLToADFToAzureSQL', uniqueString(resourceGroup().id))]", - "gatewayName": "[concat('Gateway', uniqueString(resourceGroup().id))]", - "dataLakeLinkedServiceName": "DataFactoryLinkedService", - "sqlLinkedServiceName": "SqlLinkedService", - "azureSqlLinkedServiceName": "AzureSqlLinkedService", - "dataLakeDatasetName": "DataLakeDataset", - "sqlDatasetName": "SqlDataset", - "azureSqlDatasetName": "AzureSqlDataset", - "pipelineName": "CopyFromSQLToADFToAzureSQLPipeline" + "dataLakeStoreServicePrincipalID": { + "type": "string", + "metadata": { + "description": "ID of Azure Service Principal used for accessing Data Lake" + } }, - "resources": [ - { - "name": "[variables('dataFactoryName')]", - "apiVersion": "2015-10-01", - "type": "Microsoft.DataFactory/datafactories", - "location": "[resourceGroup().location]", - "resources": [ - { - "dependsOn": [ "[concat('Microsoft.DataFactory/dataFactories/', variables('dataFactoryName'))]" ], - "type": "gateways", - "apiVersion": "2015-10-01", - "name": "[variables('gatewayName')]", - "properties": { - "description": "ADF on-premises Data Management Gateway" - } - }, - { - "type": "linkedservices", - "name": "[variables('dataLakeLinkedServiceName')]", - "apiVersion": "2015-10-01", - "dependsOn": [ - "[variables('dataFactoryName')]" - ], - "properties": { - "type": "AzureDataLakeStore", - "typeProperties": { - "dataLakeStoreUri": "[parameters('dataLakeStoreUri')]", - "servicePrincipalId": "[parameters('dataLakeStoreServicePrincipalID')]", - "servicePrincipalKey": "[parameters('dataLakeStoreServicePrincipalKey')]", - "tenant": "[subscription().tenantId]", - "subscriptionId": "[subscription().subscriptionId]", - "resourceGroupName": "[resourceGroup().name]" - } + "dataLakeStoreServicePrincipalKey": { + "type": "securestring", + "metadata": { + "description": "Key for Azure Service Principal used for accessing Data Lake" + } + }, + "azureSQLConnectionString": { + "type": "securestring", + "metadata": { + "description": "Connection string for Azure SQL Database" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "dataFactoryName": "[concat('CopyFromSQLToADFToAzureSQL', uniqueString(resourceGroup().id))]", + "gatewayName": "[concat('Gateway', uniqueString(resourceGroup().id))]", + "dataLakeLinkedServiceName": "DataFactoryLinkedService", + "sqlLinkedServiceName": "SqlLinkedService", + "azureSqlLinkedServiceName": "AzureSqlLinkedService", + "dataLakeDatasetName": "DataLakeDataset", + "sqlDatasetName": "SqlDataset", + "azureSqlDatasetName": "AzureSqlDataset", + "pipelineName": "CopyFromSQLToADFToAzureSQLPipeline" + }, + "resources": [ + { + "name": "[variables('dataFactoryName')]", + "apiVersion": "2015-10-01", + "type": "Microsoft.DataFactory/datafactories", + "location": "[parameters('location')]", + "resources": [ + { + "dependsOn": [ + "[concat('Microsoft.DataFactory/dataFactories/', variables('dataFactoryName'))]" + ], + "type": "gateways", + "apiVersion": "2015-10-01", + "name": "[variables('gatewayName')]", + "properties": { + "description": "ADF on-premises Data Management Gateway" + } + }, + { + "type": "linkedservices", + "name": "[variables('dataLakeLinkedServiceName')]", + "apiVersion": "2015-10-01", + "dependsOn": [ + "[variables('dataFactoryName')]" + ], + "properties": { + "type": "AzureDataLakeStore", + "typeProperties": { + "dataLakeStoreUri": "[parameters('dataLakeStoreUri')]", + "servicePrincipalId": "[parameters('dataLakeStoreServicePrincipalID')]", + "servicePrincipalKey": "[parameters('dataLakeStoreServicePrincipalKey')]", + "tenant": "[subscription().tenantId]", + "subscriptionId": "[subscription().subscriptionId]", + "resourceGroupName": "[resourceGroup().name]" } - }, - { - "type": "linkedservices", - "name": "[variables('sqlLinkedServiceName')]", - "apiVersion": "2015-10-01", - "dependsOn": [ - "[variables('dataFactoryName')]", - "[variables('gatewayName')]" - ], - "properties": { - "type": "OnPremisesSqlServer", - "typeProperties": { - "connectionString": "Placeholder-COnnectionString-Replace-Post-Deployment", - "gatewayName": "[variables('gatewayName')]", - "userName": "", - "password": "**********" - } + } + }, + { + "type": "linkedservices", + "name": "[variables('sqlLinkedServiceName')]", + "apiVersion": "2015-10-01", + "dependsOn": [ + "[variables('dataFactoryName')]", + "[variables('gatewayName')]" + ], + "properties": { + "type": "OnPremisesSqlServer", + "typeProperties": { + "connectionString": "Placeholder-COnnectionString-Replace-Post-Deployment", + "gatewayName": "[variables('gatewayName')]", + "userName": "", + "password": "**********" + } + } + }, + { + "type": "linkedservices", + "name": "[variables('azureSqlLinkedServiceName')]", + "apiVersion": "2015-10-01", + "dependsOn": [ + "[variables('dataFactoryName')]" + ], + "properties": { + "type": "AzureSqlDatabase", + "typeProperties": { + "connectionString": "[parameters('azureSQLConnectionString')]" } - }, - { - "type": "linkedservices", - "name": "[variables('azureSqlLinkedServiceName')]", - "apiVersion": "2015-10-01", - "dependsOn": [ - "[variables('dataFactoryName')]" + } + }, + { + "type": "datasets", + "name": "[variables('dataLakeDatasetName')]", + "dependsOn": [ + "[variables('dataFactoryName')]", + "[variables('dataLakeLinkedServiceName')]" + ], + "apiVersion": "2015-10-01", + "properties": { + "structure": [ + { + "name": "CurrencyCode", + "type": "String" + }, + { + "name": "Name", + "type": "String" + }, + { + "name": "ModifiedDate", + "type": "Datetime" + } ], - "properties": { - "type": "AzureSqlDatabase", - "typeProperties": { - "connectionString": "[parameters('azureSQLConnectionString')]" + "published": false, + "type": "AzureDataLakeStore", + "linkedServiceName": "[variables('dataLakeLinkedServiceName')]", + "typeProperties": { + "fileName": "data.orc", + "folderPath": "[concat(variables('dataFactoryName'), '/{year}/{month}/{day}/{hour}/{minute}/')]", + "format": { + "type": "OrcFormat" + }, + "partitionedBy": [ + { + "name": "year", + "value": { + "type": "DateTime", + "date": "SliceStart", + "format": "yy" + } + }, + { + "name": "month", + "value": { + "type": "DateTime", + "date": "SliceStart", + "format": "MM" + } + }, + { + "name": "day", + "value": { + "type": "DateTime", + "date": "SliceStart", + "format": "dd" + } + }, + { + "name": "hour", + "value": { + "type": "DateTime", + "date": "SliceStart", + "format": "HH" + } + }, + { + "name": "minute", + "value": { + "type": "DateTime", + "date": "SliceStart", + "format": "mm" + } + } + ] + }, + "availability": { + "frequency": "Day", + "interval": 1 + }, + "external": false, + "policy": {} + } + }, + { + "type": "datasets", + "name": "[variables('sqlDatasetName')]", + "dependsOn": [ + "[variables('dataFactoryName')]", + "[variables('sqlLinkedServiceName')]" + ], + "apiVersion": "2015-10-01", + "properties": { + "structure": [ + { + "name": "CurrencyCode", + "type": "String" + }, + { + "name": "Name", + "type": "String" + }, + { + "name": "ModifiedDate", + "type": "Datetime" } - } - }, - { - "type": "datasets", - "name": "[variables('dataLakeDatasetName')]", - "dependsOn": [ - "[variables('dataFactoryName')]", - "[variables('dataLakeLinkedServiceName')]" ], - "apiVersion": "2015-10-01", - "properties": { - "structure": [ - { - "name": "CurrencyCode", - "type": "String" - }, - { - "name": "Name", - "type": "String" - }, - { - "name": "ModifiedDate", - "type": "Datetime" - } - ], - "published": false, - "type": "AzureDataLakeStore", - "linkedServiceName": "[variables('dataLakeLinkedServiceName')]", - "typeProperties": { - "fileName": "data.orc", - "folderPath": "[concat(variables('dataFactoryName'), '/{year}/{month}/{day}/{hour}/{minute}/')]", - "format": { - "type": "OrcFormat" - }, - "partitionedBy": [ - { - "name": "year", - "value": { - "type": "DateTime", - "date": "SliceStart", - "format": "yy" - } - }, - { - "name": "month", - "value": { - "type": "DateTime", - "date": "SliceStart", - "format": "MM" - } - }, - { - "name": "day", - "value": { - "type": "DateTime", - "date": "SliceStart", - "format": "dd" - } - }, - { - "name": "hour", - "value": { - "type": "DateTime", - "date": "SliceStart", - "format": "HH" - } - }, - { - "name": "minute", - "value": { - "type": "DateTime", - "date": "SliceStart", - "format": "mm" - } - } - ] + "published": false, + "type": "SqlServerTable", + "linkedServiceName": "[variables('sqlLinkedServiceName')]", + "typeProperties": { + "tableName": "Sales.Currency" + }, + "availability": { + "frequency": "Day", + "interval": 1 + }, + "external": true, + "policy": {} + } + }, + { + "type": "datasets", + "name": "[variables('azureSqlDatasetName')]", + "dependsOn": [ + "[variables('dataFactoryName')]", + "[variables('azureSqlLinkedServiceName')]" + ], + "apiVersion": "2015-10-01", + "properties": { + "structure": [ + { + "name": "CurrencyCode", + "type": "String" }, - "availability": { - "frequency": "Day", - "interval": 1 + { + "name": "Name", + "type": "String" }, - "external": false, - "policy": {} - } - }, - { - "type": "datasets", - "name": "[variables('sqlDatasetName')]", - "dependsOn": [ - "[variables('dataFactoryName')]", - "[variables('sqlLinkedServiceName')]" + { + "name": "ModifiedDate", + "type": "Datetime" + } ], - "apiVersion": "2015-10-01", - "properties": { - "structure": [ - { - "name": "CurrencyCode", - "type": "String" - }, - { - "name": "Name", - "type": "String" - }, - { - "name": "ModifiedDate", - "type": "Datetime" - } + "published": false, + "type": "AzureSqlTable", + "linkedServiceName": "[variables('azureSqlLinkedServiceName')]", + "typeProperties": { + "tableName": "Sales.Currency" + }, + "availability": { + "frequency": "Day", + "interval": 1 + }, + "external": false, + "policy": {} + } + }, + { + "type": "dataPipelines", + "name": "[variables('pipelineName')]", + "dependsOn": [ + "[variables('dataFactoryName')]", + "[variables('dataLakeLinkedServiceName')]", + "[variables('sqlLinkedServiceName')]", + "[variables('azureSqlLinkedServiceName')]", + "[variables('dataLakeDatasetName')]" + ], + "apiVersion": "2015-10-01", + "properties": { + "activities": [ + { + "type": "Copy", + "typeProperties": { + "source": { + "type": "SqlSource", + "sqlReaderQuery": "$$Text.Format('select * from Sales.Currency where ModifiedDate >= \\'{0:yyyy-MM-dd HH:mm}\\' AND ModifiedDate < \\'{1:yyyy-MM-dd HH:mm}\\'', WindowStart, WindowEnd)" + }, + "sink": { + "type": "AzureDataLakeStoreSink", + "writeBatchSize": 0, + "writeBatchTimeout": "00:00:00" + } + }, + "inputs": [ + { + "name": "[variables('sqlDatasetName')]" + } ], - "published": false, - "type": "SqlServerTable", - "linkedServiceName": "[variables('sqlLinkedServiceName')]", - "typeProperties": { - "tableName": "Sales.Currency" - }, - "availability": { + "outputs": [ + { + "name": "[variables('dataLakeDatasetName')]" + } + ], + "policy": { + "timeout": "1.00:00:00", + "concurrency": 10, + "executionPriorityOrder": "NewestFirst", + "style": "StartOfInterval", + "retry": 3, + "longRetry": 0, + "longRetryInterval": "00:00:00" + }, + "scheduler": { "frequency": "Day", "interval": 1 + }, + "name": "Activity-OnPremSQL->ADL" }, - "external": true, - "policy": {} - } - }, - { - "type": "datasets", - "name": "[variables('azureSqlDatasetName')]", - "dependsOn": [ - "[variables('dataFactoryName')]", - "[variables('azureSqlLinkedServiceName')]" - ], - "apiVersion": "2015-10-01", - "properties": { - "structure": [ - { - "name": "CurrencyCode", - "type": "String" - }, - { - "name": "Name", - "type": "String" - }, - { - "name": "ModifiedDate", - "type": "Datetime" - } + { + "type": "Copy", + "typeProperties": { + "source": { + "type": "AzureDataLakeStoreSource", + "recursive": false + }, + "sink": { + "type": "SqlSink", + "sqlWriterCleanupScript": "$$Text.Format('delete [Sales].[Currency] where [ModifiedDate] >= \\'{0:yyyy-MM-dd HH:mm}\\' AND [ModifiedDate] <\\'{1:yyyy-MM-dd HH:mm}\\'', WindowStart, WindowEnd)", + "writeBatchSize": 0, + "writeBatchTimeout": "00:00:00" + }, + "translator": { + "type": "TabularTranslator", + "columnMappings": "CurrencyCode:CurrencyCode,ModifiedDate:ModifiedDate,Name:Name" + } + }, + "inputs": [ + { + "name": "[variables('dataLakeDatasetName')]" + } ], - "published": false, - "type": "AzureSqlTable", - "linkedServiceName": "[variables('azureSqlLinkedServiceName')]", - "typeProperties": { - "tableName": "Sales.Currency" - }, - "availability": { + "outputs": [ + { + "name": "[variables('azureSqlDatasetName')]" + } + ], + "policy": { + "timeout": "1.00:00:00", + "concurrency": 10, + "executionPriorityOrder": "NewestFirst", + "style": "StartOfInterval", + "retry": 3, + "longRetry": 0, + "longRetryInterval": "00:00:00" + }, + "scheduler": { "frequency": "Day", "interval": 1 - }, - "external": false, - "policy": {} - } - }, - { - "type": "dataPipelines", - "name": "[variables('pipelineName')]", - "dependsOn": [ - "[variables('dataFactoryName')]", - "[variables('dataLakeLinkedServiceName')]", - "[variables('sqlLinkedServiceName')]", - "[variables('azureSqlLinkedServiceName')]", - "[variables('dataLakeDatasetName')]" - ], - "apiVersion": "2015-10-01", - "properties": { - "activities": [ - { - "type": "Copy", - "typeProperties": { - "source": { - "type": "SqlSource", - "sqlReaderQuery": "$$Text.Format('select * from Sales.Currency where ModifiedDate >= \\'{0:yyyy-MM-dd HH:mm}\\' AND ModifiedDate < \\'{1:yyyy-MM-dd HH:mm}\\'', WindowStart, WindowEnd)" - }, - "sink": { - "type": "AzureDataLakeStoreSink", - "writeBatchSize": 0, - "writeBatchTimeout": "00:00:00" - } - }, - "inputs": [ - { - "name": "[variables('sqlDatasetName')]" - } - ], - "outputs": [ - { - "name": "[variables('dataLakeDatasetName')]" - } - ], - "policy": { - "timeout": "1.00:00:00", - "concurrency": 10, - "executionPriorityOrder": "NewestFirst", - "style": "StartOfInterval", - "retry": 3, - "longRetry": 0, - "longRetryInterval": "00:00:00" - }, - "scheduler": { - "frequency": "Day", - "interval": 1 - }, - "name": "Activity-OnPremSQL->ADL" }, - { - "type": "Copy", - "typeProperties": { - "source": { - "type": "AzureDataLakeStoreSource", - "recursive": false - }, - "sink": { - "type": "SqlSink", - "sqlWriterCleanupScript": "$$Text.Format('delete [Sales].[Currency] where [ModifiedDate] >= \\'{0:yyyy-MM-dd HH:mm}\\' AND [ModifiedDate] <\\'{1:yyyy-MM-dd HH:mm}\\'', WindowStart, WindowEnd)", - "writeBatchSize": 0, - "writeBatchTimeout": "00:00:00" - }, - "translator": { - "type": "TabularTranslator", - "columnMappings": "CurrencyCode:CurrencyCode,ModifiedDate:ModifiedDate,Name:Name" - } - }, - "inputs": [ - { - "name": "[variables('dataLakeDatasetName')]" - } - ], - "outputs": [ - { - "name": "[variables('azureSqlDatasetName')]" - } - ], - "policy": { - "timeout": "1.00:00:00", - "concurrency": 10, - "executionPriorityOrder": "NewestFirst", - "style": "StartOfInterval", - "retry": 3, - "longRetry": 0, - "longRetryInterval": "00:00:00" - }, - "scheduler": { - "frequency": "Day", - "interval": 1 - }, - "name": "Activity-ADL->AzureSQL" - } - ], - "start": "2017-08-16T00:00:00Z", - "end": "2099-08-16T00:00:00Z", - "isPaused": true, - "pipelineMode": "Scheduled" - } + "name": "Activity-ADL->AzureSQL" + } + ], + "start": "2017-08-16T00:00:00Z", + "end": "2099-08-16T00:00:00Z", + "isPaused": true, + "pipelineMode": "Scheduled" } - ] - } - ], - "outputs": {} - } \ No newline at end of file + } + ] + } + ], + "outputs": {} +} diff --git a/101-data-factory-hive-transformation/azuredeploy.json b/101-data-factory-hive-transformation/azuredeploy.json index 5f8ec40acb63..5c60b65f92ec 100644 --- a/101-data-factory-hive-transformation/azuredeploy.json +++ b/101-data-factory-hive-transformation/azuredeploy.json @@ -1,213 +1,220 @@ - { - "contentVersion": "1.0.0.0", - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "parameters": { - "storageAccountResourceGroupName": { - "type": "string", - "metadata": { - "description": "The resource group that contains your Azure storage account that contains the input/output data." - } - }, - "storageAccountName": { - "type": "string", - "metadata": { - "description": "Name of the Azure storage account that contains the input/output data." - } - }, - "storageAccountKey": { - "type": "securestring", - "metadata": { - "description": "Key for the Azure storage account." - } - }, - "blobContainer": { - "type": "string", - "metadata": { - "description": "Name of the blob container in the Azure Storage account." - } - }, - "inputBlobFolder": { - "type": "string", - "metadata": { - "description": "The folder in the blob container that has the input file." - } - }, - "inputBlobName": { - "type": "string", - "metadata": { - "description": "Name of the input file/blob." - } - }, - "outputBlobFolder": { - "type": "string", - "metadata": { - "description": "The folder in the blob container that will hold the transformed data." - } - }, - "hiveScriptFolder": { - "type": "string", - "metadata": { - "description": "The folder in the blob container that contains the Hive query file." - } - }, - "hiveScriptFile": { - "type": "string", - "metadata": { - "description": "Name of the hive query (HQL) file." - } +{ + "contentVersion": "1.0.0.0", + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "parameters": { + "storageAccountResourceGroupName": { + "type": "string", + "metadata": { + "description": "The resource group that contains your Azure storage account that contains the input/output data." } }, - "variables": { - "dataFactoryName": "[concat('HiveTransformDF', uniqueString(resourceGroup().id))]", - "azureStorageLinkedServiceName": "AzureStorageLinkedService", - "hdInsightOnDemandLinkedServiceName": "HDInsightOnDemandLinkedService", - "blobInputDatasetName": "AzureBlobInput", - "blobOutputDatasetName": "AzureBlobOutput", - "pipelineName": "HiveTransformPipeline" + "storageAccountName": { + "type": "string", + "metadata": { + "description": "Name of the Azure storage account that contains the input/output data." + } }, - "resources": [ - { - "name": "[variables('dataFactoryName')]", - "apiVersion": "2015-10-01", - "type": "Microsoft.DataFactory/datafactories", - "location": "West US", - "resources": [ - { - "type": "linkedservices", - "name": "[variables('azureStorageLinkedServiceName')]", - "dependsOn": [ - "[variables('dataFactoryName')]" - ], - "apiVersion": "2015-10-01", - "properties": { - "type": "AzureStorage", - "description": "Azure Storage linked service", - "typeProperties": { - "connectionString": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountName'),';AccountKey=',parameters('storageAccountKey'))]" - } - } - }, - { - "type": "linkedservices", - "name": "[variables('hdInsightOnDemandLinkedServiceName')]", - "dependsOn": [ - "[variables('dataFactoryName')]", - "[variables('azureStorageLinkedServiceName')]" - ], - "apiVersion": "2015-10-01", - "properties": { - "type": "HDInsightOnDemand", - "typeProperties": { - "clusterSize": 1, - "version": "3.2", - "timeToLive": "00:05:00", - "osType": "windows", - "linkedServiceName": "[variables('azureStorageLinkedServiceName')]" - } + "storageAccountKey": { + "type": "securestring", + "metadata": { + "description": "Key for the Azure storage account." + } + }, + "blobContainer": { + "type": "string", + "metadata": { + "description": "Name of the blob container in the Azure Storage account." + } + }, + "inputBlobFolder": { + "type": "string", + "metadata": { + "description": "The folder in the blob container that has the input file." + } + }, + "inputBlobName": { + "type": "string", + "metadata": { + "description": "Name of the input file/blob." + } + }, + "outputBlobFolder": { + "type": "string", + "metadata": { + "description": "The folder in the blob container that will hold the transformed data." + } + }, + "hiveScriptFolder": { + "type": "string", + "metadata": { + "description": "The folder in the blob container that contains the Hive query file." + } + }, + "hiveScriptFile": { + "type": "string", + "metadata": { + "description": "Name of the hive query (HQL) file." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "dataFactoryName": "[concat('HiveTransformDF', uniqueString(resourceGroup().id))]", + "azureStorageLinkedServiceName": "AzureStorageLinkedService", + "hdInsightOnDemandLinkedServiceName": "HDInsightOnDemandLinkedService", + "blobInputDatasetName": "AzureBlobInput", + "blobOutputDatasetName": "AzureBlobOutput", + "pipelineName": "HiveTransformPipeline" + }, + "resources": [ + { + "name": "[variables('dataFactoryName')]", + "apiVersion": "2015-10-01", + "type": "Microsoft.DataFactory/datafactories", + "location": "[parameters('location')]", + "resources": [ + { + "type": "linkedservices", + "name": "[variables('azureStorageLinkedServiceName')]", + "dependsOn": [ + "[variables('dataFactoryName')]" + ], + "apiVersion": "2015-10-01", + "properties": { + "type": "AzureStorage", + "description": "Azure Storage linked service", + "typeProperties": { + "connectionString": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountName'),';AccountKey=',parameters('storageAccountKey'))]" } - }, - { - "type": "datasets", - "name": "[variables('blobInputDatasetName')]", - "dependsOn": [ - "[variables('dataFactoryName')]", - "[variables('azureStorageLinkedServiceName')]" - ], - "apiVersion": "2015-10-01", - "properties": { - "type": "AzureBlob", - "linkedServiceName": "[variables('azureStorageLinkedServiceName')]", - "typeProperties": { - "fileName": "[parameters('inputBlobName')]", - "folderPath": "[concat(parameters('blobContainer'), '/', parameters('inputBlobFolder'))]", - "format": { - "type": "TextFormat", - "columnDelimiter": "," - } - }, - "availability": { - "frequency": "Month", - "interval": 1 - }, - "external": true + } + }, + { + "type": "linkedservices", + "name": "[variables('hdInsightOnDemandLinkedServiceName')]", + "dependsOn": [ + "[variables('dataFactoryName')]", + "[variables('azureStorageLinkedServiceName')]" + ], + "apiVersion": "2015-10-01", + "properties": { + "type": "HDInsightOnDemand", + "typeProperties": { + "clusterSize": 1, + "version": "3.2", + "timeToLive": "00:05:00", + "osType": "windows", + "linkedServiceName": "[variables('azureStorageLinkedServiceName')]" } - }, - { - "type": "datasets", - "name": "[variables('blobOutputDatasetName')]", - "dependsOn": [ - "[variables('dataFactoryName')]", - "[variables('azureStorageLinkedServiceName')]" - ], - "apiVersion": "2015-10-01", - "properties": { - "type": "AzureBlob", - "linkedServiceName": "[variables('azureStorageLinkedServiceName')]", - "typeProperties": { - "folderPath": "[concat(parameters('blobContainer'), '/', parameters('outputBlobFolder'))]", - "format": { - "type": "TextFormat", - "columnDelimiter": "," - } - }, - "availability": { - "frequency": "Month", - "interval": 1 + } + }, + { + "type": "datasets", + "name": "[variables('blobInputDatasetName')]", + "dependsOn": [ + "[variables('dataFactoryName')]", + "[variables('azureStorageLinkedServiceName')]" + ], + "apiVersion": "2015-10-01", + "properties": { + "type": "AzureBlob", + "linkedServiceName": "[variables('azureStorageLinkedServiceName')]", + "typeProperties": { + "fileName": "[parameters('inputBlobName')]", + "folderPath": "[concat(parameters('blobContainer'), '/', parameters('inputBlobFolder'))]", + "format": { + "type": "TextFormat", + "columnDelimiter": "," + } + }, + "availability": { + "frequency": "Month", + "interval": 1 + }, + "external": true + } + }, + { + "type": "datasets", + "name": "[variables('blobOutputDatasetName')]", + "dependsOn": [ + "[variables('dataFactoryName')]", + "[variables('azureStorageLinkedServiceName')]" + ], + "apiVersion": "2015-10-01", + "properties": { + "type": "AzureBlob", + "linkedServiceName": "[variables('azureStorageLinkedServiceName')]", + "typeProperties": { + "folderPath": "[concat(parameters('blobContainer'), '/', parameters('outputBlobFolder'))]", + "format": { + "type": "TextFormat", + "columnDelimiter": "," } + }, + "availability": { + "frequency": "Month", + "interval": 1 } - }, - { - "type": "datapipelines", - "name": "[variables('pipelineName')]", - "dependsOn": [ - "[variables('dataFactoryName')]", - "[variables('azureStorageLinkedServiceName')]", - "[variables('hdInsightOnDemandLinkedServiceName')]", - "[variables('blobInputDatasetName')]", - "[variables('blobOutputDatasetName')]" + } + }, + { + "type": "datapipelines", + "name": "[variables('pipelineName')]", + "dependsOn": [ + "[variables('dataFactoryName')]", + "[variables('azureStorageLinkedServiceName')]", + "[variables('hdInsightOnDemandLinkedServiceName')]", + "[variables('blobInputDatasetName')]", + "[variables('blobOutputDatasetName')]" + ], + "apiVersion": "2015-10-01", + "properties": { + "description": "Pipeline that transforms data using Hive script.", + "activities": [ + { + "type": "HDInsightHive", + "typeProperties": { + "scriptPath": "[concat(parameters('blobContainer'), '/', parameters('hiveScriptFolder'), '/', parameters('hiveScriptFile'))]", + "scriptLinkedService": "[variables('azureStorageLinkedServiceName')]", + "defines": { + "inputtable": "[concat(replace(reference(resourceId(parameters('storageAccountResourceGroupName'), 'Microsoft.Storage/storageAccounts/', parameters('storageAccountName')), '2016-01-01').primaryEndpoints.blob, 'https://', concat('wasb://', parameters('blobContainer'), '@')), parameters('inputBlobFolder'))]", + "partitionedtable": "[concat(replace(reference(resourceId(parameters('storageAccountResourceGroupName'), 'Microsoft.Storage/storageAccounts/', parameters('storageAccountName')), '2016-01-01').primaryEndpoints.blob, 'https://', concat('wasb://', parameters('blobContainer'), '@')), parameters('outputBlobFolder'))]" + } + }, + "inputs": [ + { + "name": "[variables('blobInputDatasetName')]" + } + ], + "outputs": [ + { + "name": "[variables('blobOutputDatasetName')]" + } + ], + "policy": { + "concurrency": 1, + "retry": 2 + }, + "scheduler": { + "frequency": "Month", + "interval": 1 + }, + "name": "RunSampleHiveActivity", + "linkedServiceName": "[variables('hdInsightOnDemandLinkedServiceName')]" + } ], - "apiVersion": "2015-10-01", - "properties": { - "description": "Pipeline that transforms data using Hive script.", - "activities": [ - { - "type": "HDInsightHive", - "typeProperties": { - "scriptPath": "[concat(parameters('blobContainer'), '/', parameters('hiveScriptFolder'), '/', parameters('hiveScriptFile'))]", - "scriptLinkedService": "[variables('azureStorageLinkedServiceName')]", - "defines": { - "inputtable": "[concat(replace(reference(resourceId(parameters('storageAccountResourceGroupName'), 'Microsoft.Storage/storageAccounts/', parameters('storageAccountName')), '2016-01-01').primaryEndpoints.blob, 'https://', concat('wasb://', parameters('blobContainer'), '@')), parameters('inputBlobFolder'))]", - "partitionedtable": "[concat(replace(reference(resourceId(parameters('storageAccountResourceGroupName'), 'Microsoft.Storage/storageAccounts/', parameters('storageAccountName')), '2016-01-01').primaryEndpoints.blob, 'https://', concat('wasb://', parameters('blobContainer'), '@')), parameters('outputBlobFolder'))]" - } - }, - "inputs": [ - { - "name": "[variables('blobInputDatasetName')]" - } - ], - "outputs": [ - { - "name": "[variables('blobOutputDatasetName')]" - } - ], - "policy": { - "concurrency": 1, - "retry": 2 - }, - "scheduler": { - "frequency": "Month", - "interval": 1 - }, - "name": "RunSampleHiveActivity", - "linkedServiceName": "[variables('hdInsightOnDemandLinkedServiceName')]" - } - ], - "start": "2016-09-01T00:00:00Z", - "end": "2016-09-02T00:00:00Z", - "isPaused": false - } + "start": "2016-09-01T00:00:00Z", + "end": "2016-09-02T00:00:00Z", + "isPaused": false } - ] - } - ] - } \ No newline at end of file + } + ] + } + ] +} diff --git a/101-data-factory-salesforce-to-blob-copy/azuredeploy.json b/101-data-factory-salesforce-to-blob-copy/azuredeploy.json index d7117fe4bdfe..3c21e7f05bc3 100644 --- a/101-data-factory-salesforce-to-blob-copy/azuredeploy.json +++ b/101-data-factory-salesforce-to-blob-copy/azuredeploy.json @@ -1,210 +1,216 @@ { - "contentVersion": "1.0.0.0", - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "parameters": { - "storageAccountName": { - "type": "string", - "metadata": { - "description": "Name of the Azure Storage" - } - }, - "storageAccountKey": { - "type": "securestring", - "metadata": { - "description": "Key associated with the corresponding Azure Storage" - } - }, - "SfUserName": { - "type": "string", - "metadata": { - "description": "User Name associated with Salesforce account" - } - }, - "SfPassword": { - "type": "securestring", - "metadata": { - "description": "Password associated with the corresponding Salesforce account" - } - }, - "SfSecurityToken": { - "type": "securestring", - "metadata": { - "description": "Password associated with the corresponding Salesforce account" - } - }, - "SfTable": { - "type": "string", - "metadata": { - "description": "Salesforce Object from where to copy the data from" - } - } - }, - "variables": { - "dataFactoryName": "[concat('SalesforceToAzureBlobDF', uniqueString(resourceGroup().id))]", - "apiVersion": "2015-10-01", - "SfLinkedServiceName": "SflLinkedService", - "storageLinkedServiceName": "StorageLinkedService", - "SfDataset": "SfDataset", - "StorageDataset": "StorageContainerDataset", - "PipelineName": "SftoBlobsCopyPipeline" - }, - "resources": [ - { - "name": "[variables('dataFactoryName')]", - "apiVersion": "2015-10-01", - "type": "Microsoft.DataFactory/datafactories", - "location": "west us", - "resources": [ - { - "dependsOn": [ - "[variables('dataFactoryName')]" - ], - "type": "linkedservices", - "name": "[variables('SfLinkedServiceName')]", - "apiVersion": "2015-10-01", - "properties": { - "type": "Salesforce", - "description": "SalesForce Linked Service", - "typeProperties": { - "username": "[parameters('SfUserName')]", - "password": "[parameters('SfPassword')]", - "securityToken": "[parameters('SfSecurityToken')]" - } - } - }, - { - "type": "linkedservices", - "name": "[variables('storageLinkedServiceName')]", - "dependsOn": [ - "[variables('dataFactoryName')]" - ], - "apiVersion": "2015-10-01", - "properties": { - "type": "AzureStorage", - "description": "Azure Blobs Storage Linked Service", - "typeProperties": { - "connectionString": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountName'),';AccountKey=',parameters('storageAccountKey'))]" - } - } - }, - { - "dependsOn": [ - "[variables('dataFactoryName')]", - "[variables('SfLinkedServiceName')]" - ], - "type": "datasets", - "name": "[variables('SfDataset')]", - "apiVersion": "2015-10-01", - "properties": { - "type": "RelationalTable", - "linkedServiceName": "[variables('SfLinkedServiceName')]", - "typeProperties": { - "tableName": "[parameters('SfTable')]" - }, - "availability": { - "frequency": "Day", - "interval": 1 - }, - "external": true - } - }, - { - "dependsOn": [ - "[variables('dataFactoryName')]", - "[variables('storageLinkedServiceName')]" - ], - "type": "datasets", - "name": "[variables('StorageDataset')]", - "apiVersion": "2015-10-01", - "properties": { - "type": "AzureBlob", - "linkedServiceName": "[variables('storageLinkedServiceName')]", - "typeProperties": { - "folderPath": "datafromsftable/{Year}/{Month}/{Day}/Data.csv", - "partitionedBy": [ - { - "name": "Year", - "value": { - "type": "DateTime", - "date": "SliceStart", - "format": "yyyy" - } - }, - { - "name": "Month", - "value": { - "type": "DateTime", - "date": "SliceStart", - "format": "%M" - } - }, - { - "name": "Day", - "value": { - "type": "DateTime", - "date": "SliceStart", - "format": "%d" - } - } - ], - "format": { - "type": "TextFormat" - } - }, - "availability": { - "frequency": "Day", - "interval": 1 - }, - "external": false - } - }, - { - "dependsOn": [ - "[variables('dataFactoryName')]", - "[variables('storageLinkedServiceName')]", - "[variables('SfLinkedServiceName')]", - "[variables('SfDataset')]", - "[variables('StorageDataset')]" - ], - "type": "datapipelines", - "name": "[variables('PipelineName')]", - "apiVersion": "2015-10-01", - "properties": { - "description": "Pipeline to copy data from SF Object to Azure Blobs", - "activities": [ - { - "name": "SftoBlobsCopyActivity", - "description": "Copies data from SF Table to Azure Blobs", - "type": "Copy", - "inputs": [ - { - "name": "[variables('SfDataset')]" - } - ], - "outputs": [ - { - "name": "[variables('StorageDataset')]" - } - ], - "typeProperties": { - "source": { - "type": "RelationalSource" - }, - "sink": { - "type": "BlobSink" - } - }, - "Policy": { - "retry": 3, - "timeout": "00:30:00" - } - } - ], - "start": "2016-10-01T00:00:00Z", - "end": "2016-10-01T00:00:00Z" - } - } - ] - } - ] -} \ No newline at end of file + "contentVersion": "1.0.0.0", + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "parameters": { + "storageAccountName": { + "type": "string", + "metadata": { + "description": "Name of the Azure Storage" + } + }, + "storageAccountKey": { + "type": "securestring", + "metadata": { + "description": "Key associated with the corresponding Azure Storage" + } + }, + "SfUserName": { + "type": "string", + "metadata": { + "description": "User Name associated with Salesforce account" + } + }, + "SfPassword": { + "type": "securestring", + "metadata": { + "description": "Password associated with the corresponding Salesforce account" + } + }, + "SfSecurityToken": { + "type": "securestring", + "metadata": { + "description": "Password associated with the corresponding Salesforce account" + } + }, + "SfTable": { + "type": "string", + "metadata": { + "description": "Salesforce Object from where to copy the data from" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "dataFactoryName": "[concat('SalesforceToAzureBlobDF', uniqueString(resourceGroup().id))]", + "SfLinkedServiceName": "SflLinkedService", + "storageLinkedServiceName": "StorageLinkedService", + "SfDataset": "SfDataset", + "StorageDataset": "StorageContainerDataset", + "PipelineName": "SftoBlobsCopyPipeline" + }, + "resources": [ + { + "name": "[variables('dataFactoryName')]", + "apiVersion": "2015-10-01", + "type": "Microsoft.DataFactory/datafactories", + "location": "[parameters('location')]", + "resources": [ + { + "dependsOn": [ + "[variables('dataFactoryName')]" + ], + "type": "linkedservices", + "name": "[variables('SfLinkedServiceName')]", + "apiVersion": "2015-10-01", + "properties": { + "type": "Salesforce", + "description": "SalesForce Linked Service", + "typeProperties": { + "username": "[parameters('SfUserName')]", + "password": "[parameters('SfPassword')]", + "securityToken": "[parameters('SfSecurityToken')]" + } + } + }, + { + "type": "linkedservices", + "name": "[variables('storageLinkedServiceName')]", + "dependsOn": [ + "[variables('dataFactoryName')]" + ], + "apiVersion": "2015-10-01", + "properties": { + "type": "AzureStorage", + "description": "Azure Blobs Storage Linked Service", + "typeProperties": { + "connectionString": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountName'),';AccountKey=',parameters('storageAccountKey'))]" + } + } + }, + { + "dependsOn": [ + "[variables('dataFactoryName')]", + "[variables('SfLinkedServiceName')]" + ], + "type": "datasets", + "name": "[variables('SfDataset')]", + "apiVersion": "2015-10-01", + "properties": { + "type": "RelationalTable", + "linkedServiceName": "[variables('SfLinkedServiceName')]", + "typeProperties": { + "tableName": "[parameters('SfTable')]" + }, + "availability": { + "frequency": "Day", + "interval": 1 + }, + "external": true + } + }, + { + "dependsOn": [ + "[variables('dataFactoryName')]", + "[variables('storageLinkedServiceName')]" + ], + "type": "datasets", + "name": "[variables('StorageDataset')]", + "apiVersion": "2015-10-01", + "properties": { + "type": "AzureBlob", + "linkedServiceName": "[variables('storageLinkedServiceName')]", + "typeProperties": { + "folderPath": "datafromsftable/{Year}/{Month}/{Day}/Data.csv", + "partitionedBy": [ + { + "name": "Year", + "value": { + "type": "DateTime", + "date": "SliceStart", + "format": "yyyy" + } + }, + { + "name": "Month", + "value": { + "type": "DateTime", + "date": "SliceStart", + "format": "%M" + } + }, + { + "name": "Day", + "value": { + "type": "DateTime", + "date": "SliceStart", + "format": "%d" + } + } + ], + "format": { + "type": "TextFormat" + } + }, + "availability": { + "frequency": "Day", + "interval": 1 + }, + "external": false + } + }, + { + "dependsOn": [ + "[variables('dataFactoryName')]", + "[variables('storageLinkedServiceName')]", + "[variables('SfLinkedServiceName')]", + "[variables('SfDataset')]", + "[variables('StorageDataset')]" + ], + "type": "datapipelines", + "name": "[variables('PipelineName')]", + "apiVersion": "2015-10-01", + "properties": { + "description": "Pipeline to copy data from SF Object to Azure Blobs", + "activities": [ + { + "name": "SftoBlobsCopyActivity", + "description": "Copies data from SF Table to Azure Blobs", + "type": "Copy", + "inputs": [ + { + "name": "[variables('SfDataset')]" + } + ], + "outputs": [ + { + "name": "[variables('StorageDataset')]" + } + ], + "typeProperties": { + "source": { + "type": "RelationalSource" + }, + "sink": { + "type": "BlobSink" + } + }, + "Policy": { + "retry": 3, + "timeout": "00:30:00" + } + } + ], + "start": "2016-10-01T00:00:00Z", + "end": "2016-10-01T00:00:00Z" + } + } + ] + } + ] +} diff --git a/101-data-factory-v2-blob-to-sql-copy/azuredeploy.json b/101-data-factory-v2-blob-to-sql-copy/azuredeploy.json index 9e9568a9d43a..b9ef59c2da99 100644 --- a/101-data-factory-v2-blob-to-sql-copy/azuredeploy.json +++ b/101-data-factory-v2-blob-to-sql-copy/azuredeploy.json @@ -1,210 +1,221 @@ { - "contentVersion": "1.0.0.0", - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "parameters": { - "dataFactoryName": { - "type": "string", - "metadata": { - "description": "Name of the data factory. Must be globally unique." - } - }, - "dataFactoryLocation": { - "type": "string", - "allowedValues": [ - "East US", - "East US 2", - "West Europe", - "Southeast Asia" - ], - "defaultValue": "East US", - "metadata": { - "description": "Location of the data factory." - } - }, - "AzureStorage_connectionString": { - "type": "securestring", - "metadata": { - "description": "Connection string for the Azure Storage account." - } - }, - "blobContainer": { - "type": "string", - "metadata": { - "description": "Name of the blob container in the Azure Storage account." - } - }, - "inputBlobFolder": { - "type": "string", - "metadata": { - "description": "The folder in the blob container that has the input file." - } - }, - "inputBlobName": { - "type": "string", - "metadata": { - "description": "Name of the input file/blob." - } - }, - "AzureSqlDatabase_connectionString": { - "type": "string", - "metadata": { - "description": "Connnection string for the Azure SQL database." - } - }, - "sqlTableName": { - "type": "string", - "metadata": { - "description": "Name of the target table in the Azure SQL database." - } - } - }, - "variables": { - "azureStorageLinkedServiceName": "Tutorial2-AzureStorageLinkedService", - "azureSqlDatabaseLinkedServiceName": "Tutorial2-AzureSqlDatabaseLinkedService", - "inputDatasetName": "Tutorial2-InputBlobDataset", - "outputDatasetName": "Tutorial2-OutputSqlDataset", - "pipelineName": "Tutorial2-CopyFromBlobToSqlPipeline" - }, - "resources": [{ - "name": "[parameters('dataFactoryName')]", - "apiVersion": "2017-09-01-preview", - "type": "Microsoft.DataFactory/factories", - "location": "[parameters('dataFactoryLocation')]", - "properties": {}, - "resources": [{ - "type": "linkedservices", - "name": "[variables('azureStorageLinkedServiceName')]", - "dependsOn": [ - "[parameters('dataFactoryName')]" - ], - "apiVersion": "2017-09-01-preview", - "properties": { - "type": "AzureStorage", - "description": "Azure Storage linked service", - "typeProperties": { - "connectionString": { - "value": "[parameters('AzureStorage_connectionString')]", - "type": "SecureString" - } - } - } - }, - { - "type": "linkedservices", - "name": "[variables('azureSqlDatabaseLinkedServiceName')]", - "dependsOn": [ - "[parameters('dataFactoryName')]" - ], - "apiVersion": "2017-09-01-preview", - "properties": { - "type": "AzureSqlDatabase", - "description": "Azure SQL Database linked service", - "typeProperties": { - "connectionString": { - "value": "[parameters('AzureSqlDatabase_connectionString')]", - "type": "SecureString" - } - } - } - }, - { - "type": "datasets", - "name": "[variables('inputDatasetName')]", - "dependsOn": [ - "[parameters('dataFactoryName')]", - "[variables('azureStorageLinkedServiceName')]" - ], - "apiVersion": "2017-09-01-preview", - "properties": { - "type": "AzureBlob", - "structure": [{ - "name": "Prop_0", - "type": "String" - }, - { - "name": "Prop_1", - "type": "String" - } - ], - "typeProperties": { - "format": { - "type": "TextFormat", - "columnDelimiter": ",", - "nullValue": "\\N", - "treatEmptyAsNull": false, - "firstRowAsHeader": false - }, - "folderPath": "[concat(parameters('blobContainer'), '/', parameters('inputBlobFolder'), '/')]", - "fileName": "[parameters('inputBlobName')]" - }, - "linkedServiceName": { - "referenceName": "[variables('azureStorageLinkedServiceName')]", - "type": "LinkedServiceReference" - } - } - }, - { - "type": "datasets", - "name": "[variables('outputDatasetName')]", - "dependsOn": [ - "[parameters('dataFactoryName')]", - "[variables('azureSqlDatabaseLinkedServiceName')]" - ], - "apiVersion": "2017-09-01-preview", - "properties": { - "type": "AzureSqlTable", - "structure": [{ - "name": "FirstName", - "type": "String" - }, - { - "name": "LastName", - "type": "String" - } - ], - "typeProperties": { - "tableName": "[parameters('sqlTableName')]" - }, - "linkedServiceName": { - "referenceName": "[variables('azureSqlDatabaseLinkedServiceName')]", - "type": "LinkedServiceReference" + "contentVersion": "1.0.0.0", + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "parameters": { + "dataFactoryName": { + "type": "string", + "metadata": { + "description": "Name of the data factory. Must be globally unique." + } + }, + "dataFactoryLocation": { + "type": "string", + "allowedValues": [ + "East US", + "East US 2", + "West Europe", + "Southeast Asia" + ], + "defaultValue": "East US", + "metadata": { + "description": "Location of the data factory." + } + }, + "AzureStorage_connectionString": { + "type": "securestring", + "metadata": { + "description": "Connection string for the Azure Storage account." + } + }, + "blobContainer": { + "type": "string", + "metadata": { + "description": "Name of the blob container in the Azure Storage account." + } + }, + "inputBlobFolder": { + "type": "string", + "metadata": { + "description": "The folder in the blob container that has the input file." + } + }, + "inputBlobName": { + "type": "string", + "metadata": { + "description": "Name of the input file/blob." + } + }, + "AzureSqlDatabase_connectionString": { + "type": "string", + "metadata": { + "description": "Connnection string for the Azure SQL database." + } + }, + "sqlTableName": { + "type": "string", + "metadata": { + "description": "Name of the target table in the Azure SQL database." + } + } + }, + "variables": { + "azureStorageLinkedServiceName": "Tutorial2-AzureStorageLinkedService", + "azureSqlDatabaseLinkedServiceName": "Tutorial2-AzureSqlDatabaseLinkedService", + "inputDatasetName": "Tutorial2-InputBlobDataset", + "outputDatasetName": "Tutorial2-OutputSqlDataset", + "pipelineName": "Tutorial2-CopyFromBlobToSqlPipeline" + }, + "resources": [ + { + "name": "[parameters('dataFactoryName')]", + "apiVersion": "2017-09-01-preview", + "type": "Microsoft.DataFactory/factories", + "location": "[parameters('dataFactoryLocation')]", + "properties": {}, + "resources": [ + { + "type": "linkedservices", + "name": "[variables('azureStorageLinkedServiceName')]", + "dependsOn": [ + "[parameters('dataFactoryName')]" + ], + "apiVersion": "2017-09-01-preview", + "properties": { + "type": "AzureStorage", + "description": "Azure Storage linked service", + "typeProperties": { + "connectionString": { + "value": "[parameters('AzureStorage_connectionString')]", + "type": "SecureString" + } + } } - } - }, - { - "type": "pipelines", - "name": "[variables('pipelineName')]", - "dependsOn": [ - "[parameters('dataFactoryName')]", - "[variables('inputDatasetName')]", - "[variables('outputDatasetName')]" - ], - "apiVersion": "2017-09-01-preview", - "properties": { - "activities": [{ - "type": "Copy", - "typeProperties": { - "source": { - "type": "BlobSource", - "recursive": true - }, - "sink": { - "type": "SqlSink", - "writeBatchSize": 10000 - } - }, - "name": "MyCopyActivity", - "inputs": [{ - "referenceName": "[variables('inputDatasetName')]", - "type": "DatasetReference" - }], - "outputs": [{ - "referenceName": "[variables('outputDatasetName')]", - "type": "DatasetReference" - }] - }] - } - } - ] - }] -} \ No newline at end of file + }, + { + "type": "linkedservices", + "name": "[variables('azureSqlDatabaseLinkedServiceName')]", + "dependsOn": [ + "[parameters('dataFactoryName')]" + ], + "apiVersion": "2017-09-01-preview", + "properties": { + "type": "AzureSqlDatabase", + "description": "Azure SQL Database linked service", + "typeProperties": { + "connectionString": { + "value": "[parameters('AzureSqlDatabase_connectionString')]", + "type": "SecureString" + } + } + } + }, + { + "type": "datasets", + "name": "[variables('inputDatasetName')]", + "dependsOn": [ + "[parameters('dataFactoryName')]", + "[variables('azureStorageLinkedServiceName')]" + ], + "apiVersion": "2017-09-01-preview", + "properties": { + "type": "AzureBlob", + "structure": [ + { + "name": "Prop_0", + "type": "String" + }, + { + "name": "Prop_1", + "type": "String" + } + ], + "typeProperties": { + "format": { + "type": "TextFormat", + "columnDelimiter": ",", + "nullValue": "\\N", + "treatEmptyAsNull": false, + "firstRowAsHeader": false + }, + "folderPath": "[concat(parameters('blobContainer'), '/', parameters('inputBlobFolder'), '/')]", + "fileName": "[parameters('inputBlobName')]" + }, + "linkedServiceName": { + "referenceName": "[variables('azureStorageLinkedServiceName')]", + "type": "LinkedServiceReference" + } + } + }, + { + "type": "datasets", + "name": "[variables('outputDatasetName')]", + "dependsOn": [ + "[parameters('dataFactoryName')]", + "[variables('azureSqlDatabaseLinkedServiceName')]" + ], + "apiVersion": "2017-09-01-preview", + "properties": { + "type": "AzureSqlTable", + "structure": [ + { + "name": "FirstName", + "type": "String" + }, + { + "name": "LastName", + "type": "String" + } + ], + "typeProperties": { + "tableName": "[parameters('sqlTableName')]" + }, + "linkedServiceName": { + "referenceName": "[variables('azureSqlDatabaseLinkedServiceName')]", + "type": "LinkedServiceReference" + } + } + }, + { + "type": "pipelines", + "name": "[variables('pipelineName')]", + "dependsOn": [ + "[parameters('dataFactoryName')]", + "[variables('inputDatasetName')]", + "[variables('outputDatasetName')]" + ], + "apiVersion": "2017-09-01-preview", + "properties": { + "activities": [ + { + "type": "Copy", + "typeProperties": { + "source": { + "type": "BlobSource", + "recursive": true + }, + "sink": { + "type": "SqlSink", + "writeBatchSize": 10000 + } + }, + "name": "MyCopyActivity", + "inputs": [ + { + "referenceName": "[variables('inputDatasetName')]", + "type": "DatasetReference" + } + ], + "outputs": [ + { + "referenceName": "[variables('outputDatasetName')]", + "type": "DatasetReference" + } + ] + } + ] + } + } + ] + } + ] +} diff --git a/101-data-factory-v2-blob-to-sql-copy/prereqs/prereq.azuredeploy.json b/101-data-factory-v2-blob-to-sql-copy/prereqs/prereq.azuredeploy.json index b33cde52f916..62447768014d 100644 --- a/101-data-factory-v2-blob-to-sql-copy/prereqs/prereq.azuredeploy.json +++ b/101-data-factory-v2-blob-to-sql-copy/prereqs/prereq.azuredeploy.json @@ -1,100 +1,107 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "databaseAdminUsername": { - "type": "string", - "metadata": { - "description": "Username for DB Admin" - } - }, - "databaseAdminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for DB Admin" - } - } - }, - "variables": { - "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]", - "serverName": "[concat('server', uniqueString(resourceGroup().id))]", - "databaseName": "DB", - "databaseCollation": "SQL_Latin1_General_CP1_CI_AS", - "databaseEdition": "Basic", - "databaseRequestedServiceObjectiveName": "Basic" - }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "East US", - "comments": "Storage account ", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": { - - } - }, - { - "name": "[variables('serverName')]", - "type": "Microsoft.Sql/servers", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01-preview", - "dependsOn": [], - "tags": { - "displayName": "server" - }, - "properties": { - "administratorLogin": "[parameters('databaseAdminUsername')]", - "administratorLoginPassword": "[parameters('databaseAdminPassword')]" - }, - "resources": [{ - "name": "AllowAllWindowsAzureIps", - "type": "firewallrules", - "location": "East US", - "apiVersion": "2014-04-01-preview", - "dependsOn": [ - "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" - ], - "properties": { - "startIpAddress": "0.0.0.0", - "endIpAddress": "0.0.0.0" - } - }, - { - "name": "[variables('databaseName')]", - "type": "databases", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01-preview", - "dependsOn": [ - "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" - ], - "tags": { - "displayName": "database" - }, - "properties": { - "collation": "[variables('databaseCollation')]", - "edition": "[variables('databaseEdition')]", - "maxSizeBytes": "1073741824", - "requestedServiceObjectiveName": "[variables('databaseRequestedServiceObjectiveName')]" - } - } - ] - } - ], - "outputs": { - "AzureStorage_connectionString": { - "type": "securestring", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value)]" - }, - "AzureSqlDatabase_connectionString": { - "type": "securestring", - "value": "[concat('Server=tcp:', variables('serverName'),'.database.windows.net,1433;Initial Catalog=',variables('databaseName'), ';Persist Security Info=False;User ID=', parameters('databaseAdminUsername'), ';Password=', parameters('databaseAdminPassword'), ';Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;'" - } - } -} \ No newline at end of file + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "databaseAdminUsername": { + "type": "string", + "metadata": { + "description": "Username for DB Admin" + } + }, + "databaseAdminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for DB Admin" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]", + "serverName": "[concat('server', uniqueString(resourceGroup().id))]", + "databaseName": "DB", + "databaseCollation": "SQL_Latin1_General_CP1_CI_AS", + "databaseEdition": "Basic", + "databaseRequestedServiceObjectiveName": "Basic" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account ", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "name": "[variables('serverName')]", + "type": "Microsoft.Sql/servers", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01-preview", + "dependsOn": [], + "tags": { + "displayName": "server" + }, + "properties": { + "administratorLogin": "[parameters('databaseAdminUsername')]", + "administratorLoginPassword": "[parameters('databaseAdminPassword')]" + }, + "resources": [ + { + "name": "AllowAllWindowsAzureIps", + "type": "firewallrules", + "location": "East US", + "apiVersion": "2014-04-01-preview", + "dependsOn": [ + "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" + ], + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "0.0.0.0" + } + }, + { + "name": "[variables('databaseName')]", + "type": "databases", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01-preview", + "dependsOn": [ + "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" + ], + "tags": { + "displayName": "database" + }, + "properties": { + "collation": "[variables('databaseCollation')]", + "edition": "[variables('databaseEdition')]", + "maxSizeBytes": "1073741824", + "requestedServiceObjectiveName": "[variables('databaseRequestedServiceObjectiveName')]" + } + } + ] + } + ], + "outputs": { + "AzureStorage_connectionString": { + "type": "securestring", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value)]" + }, + "AzureSqlDatabase_connectionString": { + "type": "securestring", + "value": "[concat('Server=tcp:', variables('serverName'),'.database.windows.net,1433;Initial Catalog=',variables('databaseName'), ';Persist Security Info=False;User ID=', parameters('databaseAdminUsername'), ';Password=', parameters('databaseAdminPassword'), ';Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;'" + } + } +} diff --git a/101-data-factory-v2-onprem-sql-to-blob-copy/prereqs/prereq.azuredeploy.json b/101-data-factory-v2-onprem-sql-to-blob-copy/prereqs/prereq.azuredeploy.json index 0ca70e6e441b..669106faeb27 100644 --- a/101-data-factory-v2-onprem-sql-to-blob-copy/prereqs/prereq.azuredeploy.json +++ b/101-data-factory-v2-onprem-sql-to-blob-copy/prereqs/prereq.azuredeploy.json @@ -1,34 +1,39 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - }, - "variables": { - "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "East US", - "comments": "Storage account ", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": { - - } - } - ], - "outputs": { - "AzureStorage_connectionString": { - "type": "securestring", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value)]" - } - } -} \ No newline at end of file + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account ", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + } + ], + "outputs": { + "AzureStorage_connectionString": { + "type": "securestring", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value)]" + } + } +} diff --git a/101-data-factory-v2-provision-ssis-runtime/azuredeploy.json b/101-data-factory-v2-provision-ssis-runtime/azuredeploy.json index 339384fb9c3f..573a82c6dada 100644 --- a/101-data-factory-v2-provision-ssis-runtime/azuredeploy.json +++ b/101-data-factory-v2-provision-ssis-runtime/azuredeploy.json @@ -1,137 +1,137 @@ { - "contentVersion": "1.0.0.0", - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "parameters": { - "dataFactoryName": { - "type": "string", - "metadata": { - "description": "Name of the data factory. Must be globally unique." - } - }, - "dataFactoryLocation": { - "type": "string", - "allowedValues": [ - "East US", - "East US 2", - "West Europe" - ], - "metadata": { - "description": "Location of the data factory." - } - }, - "azureSsisIrName": { - "type": "string", - "metadata": { - "description": "Name of the Azure SSIS integration runtime" - } - }, - "virtualNetworkName": { - "type": "string", - "metadata": { - "description": "Name of your Azure virtual network." - } - }, - "subNetName": { - "type": "string", - "metadata": { - "description": "Name of the subnet in the virtual network." - } - }, - "nodeSize": { - "type": "string", - "allowedValues": [ - "Standard_A4_v2", - "Standard_A8_v2", - "Standard_D1_v2", - "Standard_D2_v2", - "Standard_D3_v2", - "Standard_D4_v2" - ], - "metadata": { - "description": "Location of the data factory." - } - }, - "nodeNumber": { - "type": "int", - "metadata": { - "description": "Number of nodes in the cluster." - } - }, - "maximumParallelExecutionsPerNode": { - "type": "int", - "metadata": { - "description": "Maximim number of parallel executions per node in the cluster." - } - }, - "azureSqlServerName": { - "type": "string", - "metadata": { - "description": "Name of the Azure SQL server that hosts the SSISDB database (SSIS Catalog). Example: servername.database.windows.net" - } - }, - "databaseAdminUsername": { - "type": "string", - "metadata": { - "description": "Name of the Azure SQL database user." - } - }, - "databaseAdminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the database user." - } - }, - "catalogPricingTier": { - "type": "string", - "metadata": { - "description": "Pricing tier of the SSIS Catalog (SSISDB datbase)" - } - } - }, - "variables": {}, - "resources": [ - { - "name": "[parameters('dataFactoryName')]", - "apiVersion": "2017-09-01-preview", - "type": "Microsoft.DataFactory/factories", - "location": "[parameters('dataFactoryLocation')]", - "properties": {}, - "resources": [ - { - "name": "[concat(parameters('dataFactoryName'), '/SPAzureSsisIR')]", - "type": "Microsoft.DataFactory/factories/integrationRuntimes", - "dependsOn": [ - "[parameters('dataFactoryName')]" - ], - "apiVersion": "2017-09-01-preview", - "properties": { - "type": "Managed", - "typeProperties": { - "computeProperties": { - "location": "[parameters('dataFactoryLocation')]", - "nodeSize": "[parameters('nodeSize')]", - "numberOfNodes": "[parameters('nodeNumber')]", - "maxParallelExecutionsPerNode": "[parameters('maximumParallelExecutionsPerNode')]", - "vNetProperties": { - "vNetId": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", - "subnet": "[parameters('subNetName')]" - } - }, - "ssisProperties": { - "catalogInfo": { - "catalogServerEndpoint": "[parameters('azureSqlServerName')]", - "catalogAdminUserName": "[parameters('databaseAdminUserName')]", - "catalogAdminPassword": { - "type": "SecureString", - "value": "[parameters('databaseAdminPassword')]" - }, - "catalogPricingTier": "[parameters('catalogPricingTier')]" - } - } - } - } - } - ] - } - ] -} \ No newline at end of file + "contentVersion": "1.0.0.0", + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "parameters": { + "dataFactoryName": { + "type": "string", + "metadata": { + "description": "Name of the data factory. Must be globally unique." + } + }, + "dataFactoryLocation": { + "type": "string", + "allowedValues": [ + "East US", + "East US 2", + "West Europe" + ], + "metadata": { + "description": "Location of the data factory." + } + }, + "azureSsisIrName": { + "type": "string", + "metadata": { + "description": "Name of the Azure SSIS integration runtime" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "Name of your Azure virtual network." + } + }, + "subNetName": { + "type": "string", + "metadata": { + "description": "Name of the subnet in the virtual network." + } + }, + "nodeSize": { + "type": "string", + "allowedValues": [ + "Standard_A4_v2", + "Standard_A8_v2", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2" + ], + "metadata": { + "description": "Location of the data factory." + } + }, + "nodeNumber": { + "type": "int", + "metadata": { + "description": "Number of nodes in the cluster." + } + }, + "maximumParallelExecutionsPerNode": { + "type": "int", + "metadata": { + "description": "Maximim number of parallel executions per node in the cluster." + } + }, + "azureSqlServerName": { + "type": "string", + "metadata": { + "description": "Name of the Azure SQL server that hosts the SSISDB database (SSIS Catalog). Example: servername.database.windows.net" + } + }, + "databaseAdminUsername": { + "type": "string", + "metadata": { + "description": "Name of the Azure SQL database user." + } + }, + "databaseAdminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the database user." + } + }, + "catalogPricingTier": { + "type": "string", + "metadata": { + "description": "Pricing tier of the SSIS Catalog (SSISDB datbase)" + } + } + }, + "variables": {}, + "resources": [ + { + "name": "[parameters('dataFactoryName')]", + "apiVersion": "2017-09-01-preview", + "type": "Microsoft.DataFactory/factories", + "location": "[parameters('dataFactoryLocation')]", + "properties": {}, + "resources": [ + { + "name": "[concat(parameters('dataFactoryName'), '/SPAzureSsisIR')]", + "type": "Microsoft.DataFactory/factories/integrationRuntimes", + "dependsOn": [ + "[parameters('dataFactoryName')]" + ], + "apiVersion": "2017-09-01-preview", + "properties": { + "type": "Managed", + "typeProperties": { + "computeProperties": { + "location": "[parameters('dataFactoryLocation')]", + "nodeSize": "[parameters('nodeSize')]", + "numberOfNodes": "[parameters('nodeNumber')]", + "maxParallelExecutionsPerNode": "[parameters('maximumParallelExecutionsPerNode')]", + "vNetProperties": { + "vNetId": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "subnet": "[parameters('subNetName')]" + } + }, + "ssisProperties": { + "catalogInfo": { + "catalogServerEndpoint": "[parameters('azureSqlServerName')]", + "catalogAdminUserName": "[parameters('databaseAdminUserName')]", + "catalogAdminPassword": { + "type": "SecureString", + "value": "[parameters('databaseAdminPassword')]" + }, + "catalogPricingTier": "[parameters('catalogPricingTier')]" + } + } + } + } + } + ] + } + ] +} diff --git a/101-data-factory-v2-provision-ssis-runtime/prereqs/prereq.azuredeploy.json b/101-data-factory-v2-provision-ssis-runtime/prereqs/prereq.azuredeploy.json index 0bed18fc3cb2..3f95bc87f6f3 100644 --- a/101-data-factory-v2-provision-ssis-runtime/prereqs/prereq.azuredeploy.json +++ b/101-data-factory-v2-provision-ssis-runtime/prereqs/prereq.azuredeploy.json @@ -1,107 +1,114 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "databaseAdminUsername": { - "type": "string", - "metadata": { - "description": "Admin user name for the Azure SQL server." - } - }, - "databaseAdminPassword": { - "type": "securestring", - "metadata": { - "description": "Admin password for the Azure SQL user." - } - } - }, - "variables": { - "virtualNetworkName": "[concat('VNet', uniqueString(resourceGroup().id))]", - "serverName": "[concat('server', uniqueString(resourceGroup().id))]", - "databaseName": "DB", - "databaseCollation": "SQL_Latin1_General_CP1_CI_AS", - "databaseEdition": "Basic", - "databaseRequestedServiceObjectiveName": "Basic" - }, - "resources": [ - { - "apiVersion": "2018-01-01", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [] - } - }, - { - "name": "[variables('serverName')]", - "type": "Microsoft.Sql/servers", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01-preview", - "dependsOn": [], - "tags": { - "displayName": "server" - }, - "properties": { - "administratorLogin": "[parameters('databaseAdminUsername')]", - "administratorLoginPassword": "[parameters('databaseAdminPassword')]" - }, - "resources": [ - { - "name": "AllowAllWindowsAzureIps", - "type": "firewallrules", - "location": "East US", - "apiVersion": "2014-04-01-preview", - "dependsOn": [ - "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" - ], - "properties": { - "startIpAddress": "0.0.0.0", - "endIpAddress": "0.0.0.0" - } - }, - { - "name": "[variables('databaseName')]", - "type": "databases", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01-preview", - "dependsOn": [ - "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" - ], - "tags": { - "displayName": "database" - }, - "properties": { - "collation": "[variables('databaseCollation')]", - "edition": "[variables('databaseEdition')]", - "maxSizeBytes": "1073741824", - "requestedServiceObjectiveName": "[variables('databaseRequestedServiceObjectiveName')]" - } - } - ] - } - ], - "outputs": { - "azure-sql-server-name": { - "type": "string", - "value": "[variables('serverName')]" - }, - "sql-admin-user": { - "type": "string", - "value": "[parameters('databaseAdminUsername')]" - }, - "sql-admin-password": { - "type": "string", - "value": "[parameters('databaseAdminPassword')]" - }, - "virtual-network-name": { - "type": "string", - "value": "[variables('virtualNetworkName')]" - } - } -} \ No newline at end of file + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "databaseAdminUsername": { + "type": "string", + "metadata": { + "description": "Admin user name for the Azure SQL server." + } + }, + "databaseAdminPassword": { + "type": "securestring", + "metadata": { + "description": "Admin password for the Azure SQL user." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "virtualNetworkName": "[concat('VNet', uniqueString(resourceGroup().id))]", + "serverName": "[concat('server', uniqueString(resourceGroup().id))]", + "databaseName": "DB", + "databaseCollation": "SQL_Latin1_General_CP1_CI_AS", + "databaseEdition": "Basic", + "databaseRequestedServiceObjectiveName": "Basic" + }, + "resources": [ + { + "apiVersion": "2018-01-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "subnets": [] + } + }, + { + "name": "[variables('serverName')]", + "type": "Microsoft.Sql/servers", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01-preview", + "dependsOn": [], + "tags": { + "displayName": "server" + }, + "properties": { + "administratorLogin": "[parameters('databaseAdminUsername')]", + "administratorLoginPassword": "[parameters('databaseAdminPassword')]" + }, + "resources": [ + { + "name": "AllowAllWindowsAzureIps", + "type": "firewallrules", + "location": "East US", + "apiVersion": "2014-04-01-preview", + "dependsOn": [ + "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" + ], + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "0.0.0.0" + } + }, + { + "name": "[variables('databaseName')]", + "type": "databases", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01-preview", + "dependsOn": [ + "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" + ], + "tags": { + "displayName": "database" + }, + "properties": { + "collation": "[variables('databaseCollation')]", + "edition": "[variables('databaseEdition')]", + "maxSizeBytes": "1073741824", + "requestedServiceObjectiveName": "[variables('databaseRequestedServiceObjectiveName')]" + } + } + ] + } + ], + "outputs": { + "azure-sql-server-name": { + "type": "string", + "value": "[variables('serverName')]" + }, + "sql-admin-user": { + "type": "string", + "value": "[parameters('databaseAdminUsername')]" + }, + "sql-admin-password": { + "type": "string", + "value": "[parameters('databaseAdminPassword')]" + }, + "virtual-network-name": { + "type": "string", + "value": "[variables('virtualNetworkName')]" + } + } +} diff --git a/101-data-factory-v2-transform-using-spark/prereqs/prereq.azuredeploy.json b/101-data-factory-v2-transform-using-spark/prereqs/prereq.azuredeploy.json index f00db75c2669..669106faeb27 100644 --- a/101-data-factory-v2-transform-using-spark/prereqs/prereq.azuredeploy.json +++ b/101-data-factory-v2-transform-using-spark/prereqs/prereq.azuredeploy.json @@ -1,34 +1,39 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - }, + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, "variables": { "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" }, "resources": [ { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "East US", - "comments": "Storage account ", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": { - - } - } + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account ", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + } ], "outputs": { - "AzureStorage_connectionString": { - "type": "securestring", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value)]" - } + "AzureStorage_connectionString": { + "type": "securestring", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value)]" + } } } diff --git a/101-databricks-workspace-with-custom-vnet-address/azuredeploy.json b/101-databricks-workspace-with-custom-vnet-address/azuredeploy.json index 31e14611235e..17450d0bdc0d 100644 --- a/101-databricks-workspace-with-custom-vnet-address/azuredeploy.json +++ b/101-databricks-workspace-with-custom-vnet-address/azuredeploy.json @@ -11,7 +11,10 @@ "pricingTier": { "type": "string", "defaultValue": "premium", - "allowedValues": ["standard", "premium"], + "allowedValues": [ + "standard", + "premium" + ], "metadata": { "description": "The pricing tier of workspace." } @@ -22,6 +25,13 @@ "metadata": { "description": "The first 2 octets of the virtual network /16 address range (e.g., '10.139' for the address range 10.139.0.0/16)." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -31,7 +41,7 @@ { "type": "Microsoft.Databricks/workspaces", "name": "[parameters('workspaceName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2018-04-01", "sku": { "name": "[parameters('pricingTier')]" diff --git a/101-databricks-workspace/azuredeploy.json b/101-databricks-workspace/azuredeploy.json index 10255de900a1..93e4e10a5455 100644 --- a/101-databricks-workspace/azuredeploy.json +++ b/101-databricks-workspace/azuredeploy.json @@ -11,10 +11,20 @@ "pricingTier": { "type": "string", "defaultValue": "premium", - "allowedValues": ["standard", "premium"], + "allowedValues": [ + "standard", + "premium" + ], "metadata": { "description": "The pricing tier of workspace." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -24,7 +34,7 @@ { "type": "Microsoft.Databricks/workspaces", "name": "[parameters('workspaceName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2018-04-01", "sku": { "name": "[parameters('pricingTier')]" diff --git a/101-documentdb-account-consistencypolicy-create/azuredeploy.json b/101-documentdb-account-consistencypolicy-create/azuredeploy.json index a524a7cad4da..d69b690dd25d 100644 --- a/101-documentdb-account-consistencypolicy-create/azuredeploy.json +++ b/101-documentdb-account-consistencypolicy-create/azuredeploy.json @@ -38,6 +38,13 @@ "metadata": { "description": "When consistencyLevel is set to BoundedStaleness, then this value is required, else it can be ignored." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -48,7 +55,7 @@ "apiVersion": "2015-04-08", "type": "Microsoft.DocumentDB/databaseAccounts", "name": "[parameters('databaseAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "name": "[parameters('databaseAccountName')]", "databaseAccountOfferType": "[variables('offerType')]", @@ -59,7 +66,7 @@ }, "locations": [ { - "locationName": "[resourceGroup().location]", + "locationName": "[parameters('location')]", "failoverPriority": 0 } ] diff --git a/101-documentdb-account-create/azuredeploy.json b/101-documentdb-account-create/azuredeploy.json index 46f3e6b7beef..78d6f8ba2df0 100644 --- a/101-documentdb-account-create/azuredeploy.json +++ b/101-documentdb-account-create/azuredeploy.json @@ -7,6 +7,13 @@ "metadata": { "description": "The Azure Cosmos DB database account name." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -17,17 +24,17 @@ "apiVersion": "2015-04-08", "type": "Microsoft.DocumentDB/databaseAccounts", "name": "[parameters('databaseAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "name": "[parameters('databaseAccountName')]", "databaseAccountOfferType": "[variables('offerType')]", "locations": [ { - "locationName": "[resourceGroup().location]", + "locationName": "[parameters('location')]", "failoverPriority": 0 } ] } } ] -} \ No newline at end of file +} diff --git a/101-dtl-create-lab/azuredeploy.json b/101-dtl-create-lab/azuredeploy.json index 7993ed8cbb63..8cf9a0545542 100644 --- a/101-dtl-create-lab/azuredeploy.json +++ b/101-dtl-create-lab/azuredeploy.json @@ -7,6 +7,13 @@ "metadata": { "description": "The name of the new lab instance to be created" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -14,7 +21,7 @@ "apiVersion": "2015-05-21-preview", "type": "Microsoft.DevTestLab/labs", "name": "[parameters('newLabName')]", - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" } ], "outputs": { diff --git a/101-expressroute-circuit-create/azuredeploy.json b/101-expressroute-circuit-create/azuredeploy.json index b7432f730e30..e1c9f4964b05 100644 --- a/101-expressroute-circuit-create/azuredeploy.json +++ b/101-expressroute-circuit-create/azuredeploy.json @@ -1,76 +1,83 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "circuitName": { - "type": "string", - "metadata": { - "description": "This is the name of the ExpressRoute circuit" - } - }, - "serviceProviderName": { - "type": "string", - "metadata": { - "description": "This is the name of the ExpressRoute Service Provider. It must exactly match one of the Service Providers from List ExpressRoute Service Providers API call." - } - }, - "peeringLocation": { - "type": "string", - "metadata": { - "description": "This is the name of the peering location and not the ARM resource location. It must exactly match one of the available peering locations from List ExpressRoute Service Providers API call." - } - }, - "bandwidthInMbps": { - "type": "int", - "metadata": { - "description": "This is the bandwidth in Mbps of the circuit being created. It must exactly match one of the available bandwidth offers List ExpressRoute Service Providers API call." - } - }, - "sku_tier": { - "type": "string", - "defaultValue": "Standard", - "allowedValues": [ - "Standard", - "Premium" - ], - "metadata": { - "description": "Chosen SKU Tier of ExpressRoute circuit. Choose from Premium or Standard SKU tiers." - } - }, - "sku_family": { - "type": "string", - "defaultValue": "MeteredData", - "allowedValues": [ - "MeteredData", - "UnlimitedData" - ], - "metadata": { - "description": "Chosen SKU family of ExpressRoute circuit. Choose from MeteredData or UnlimitedData SKU families." - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "circuitName": { + "type": "string", + "metadata": { + "description": "This is the name of the ExpressRoute circuit" + } + }, + "serviceProviderName": { + "type": "string", + "metadata": { + "description": "This is the name of the ExpressRoute Service Provider. It must exactly match one of the Service Providers from List ExpressRoute Service Providers API call." + } }, - "resources": [ - { - "apiVersion": "2017-06-01", - "type": "Microsoft.Network/expressRouteCircuits", - "name": "[parameters('circuitName')]", - "location": "[resourceGroup().location]", - "tags": { - "key1": "value1", - "key2": "value2" - }, - "sku": { - "name": "[concat(parameters('sku_tier'),'_', parameters('sku_family'))]", - "tier": "[parameters('sku_tier')]", - "family": "[parameters('sku_family')]" - }, - "properties": { - "serviceProviderProperties": { - "serviceProviderName": "[parameters('serviceProviderName')]", - "peeringLocation": "[parameters('peeringLocation')]", - "bandwidthInMbps": "[parameters('bandwidthInMbps')]" - } + "peeringLocation": { + "type": "string", + "metadata": { + "description": "This is the name of the peering location and not the ARM resource location. It must exactly match one of the available peering locations from List ExpressRoute Service Providers API call." + } + }, + "bandwidthInMbps": { + "type": "int", + "metadata": { + "description": "This is the bandwidth in Mbps of the circuit being created. It must exactly match one of the available bandwidth offers List ExpressRoute Service Providers API call." + } + }, + "sku_tier": { + "type": "string", + "defaultValue": "Standard", + "allowedValues": [ + "Standard", + "Premium" + ], + "metadata": { + "description": "Chosen SKU Tier of ExpressRoute circuit. Choose from Premium or Standard SKU tiers." + } + }, + "sku_family": { + "type": "string", + "defaultValue": "MeteredData", + "allowedValues": [ + "MeteredData", + "UnlimitedData" + ], + "metadata": { + "description": "Chosen SKU family of ExpressRoute circuit. Choose from MeteredData or UnlimitedData SKU families." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2017-06-01", + "type": "Microsoft.Network/expressRouteCircuits", + "name": "[parameters('circuitName')]", + "location": "[parameters('location')]", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "sku": { + "name": "[concat(parameters('sku_tier'),'_', parameters('sku_family'))]", + "tier": "[parameters('sku_tier')]", + "family": "[parameters('sku_family')]" + }, + "properties": { + "serviceProviderProperties": { + "serviceProviderName": "[parameters('serviceProviderName')]", + "peeringLocation": "[parameters('peeringLocation')]", + "bandwidthInMbps": "[parameters('bandwidthInMbps')]" } } - ] -} \ No newline at end of file + } + ] +} diff --git a/101-function-app-create-dedicated/azuredeploy.json b/101-function-app-create-dedicated/azuredeploy.json index dba2bc2f8b0e..a189058717eb 100644 --- a/101-function-app-create-dedicated/azuredeploy.json +++ b/101-function-app-create-dedicated/azuredeploy.json @@ -1,115 +1,122 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "appName": { - "type": "string", - "metadata": { - "description": "The name of the function app that you wish to create." - } - }, - "sku": { - "type": "string", - "allowedValues": [ - "Free", - "Shared", - "Basic", - "Standard" - ], - "defaultValue": "Standard", - "metadata": { - "description": "The pricing tier for the hosting plan." - } - }, - "workerSize": { - "type": "string", - "allowedValues": [ - "0", - "1", - "2" - ], - "defaultValue": "0", - "metadata": { - "description": "The instance size of the hosting plan (small, medium, or large)." - } - }, - "storageAccountType": { - "type": "string", - "defaultValue": "Standard_LRS", - "allowedValues": [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS" - ], - "metadata": { - "description": "Storage Account type" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "appName": { + "type": "string", + "metadata": { + "description": "The name of the function app that you wish to create." + } }, - "variables": { - "functionAppName": "[parameters('appName')]", - "hostingPlanName": "[parameters('appName')]", - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'functions')]" + "sku": { + "type": "string", + "allowedValues": [ + "Free", + "Shared", + "Basic", + "Standard" + ], + "defaultValue": "Standard", + "metadata": { + "description": "The pricing tier for the hosting plan." + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-12-01", - "location": "[resourceGroup().location]", - "kind": "Storage", - "sku": { - "name": "[parameters('storageAccountType')]" - } - }, - { - "type": "Microsoft.Web/serverfarms", - "apiVersion": "2015-04-01", - "name": "[variables('hostingPlanName')]", - "location": "[resourceGroup().location]", - "properties": { - "name": "[variables('hostingPlanName')]", - "sku": "[parameters('sku')]", - "workerSize": "[parameters('workerSize')]", - "hostingEnvironment": "", - "numberOfWorkers": 1 - } - }, + "workerSize": { + "type": "string", + "allowedValues": [ + "0", + "1", + "2" + ], + "defaultValue": "0", + "metadata": { + "description": "The instance size of the hosting plan (small, medium, or large)." + } + }, + "storageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS" + ], + "metadata": { + "description": "Storage Account type" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "functionAppName": "[parameters('appName')]", + "hostingPlanName": "[parameters('appName')]", + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'functions')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-12-01", + "location": "[parameters('location')]", + "kind": "Storage", + "sku": { + "name": "[parameters('storageAccountType')]" + } + }, + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2015-04-01", + "name": "[variables('hostingPlanName')]", + "location": "[parameters('location')]", + "properties": { + "name": "[variables('hostingPlanName')]", + "sku": "[parameters('sku')]", + "workerSize": "[parameters('workerSize')]", + "hostingEnvironment": "", + "numberOfWorkers": 1 + } + }, + { + "apiVersion": "2015-04-01", + "type": "Microsoft.Web/sites", + "name": "[variables('functionAppName')]", + "location": "[parameters('location')]", + "kind": "functionapp", + "properties": { + "name": "[variables('functionAppName')]", + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", + "hostingEnvironment": "", + "clientAffinityEnabled": false, + "siteConfig": { + "alwaysOn": true + } + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" + ], + "resources": [ { - "apiVersion": "2015-04-01", - "type": "Microsoft.Web/sites", - "name": "[variables('functionAppName')]", - "location": "[resourceGroup().location]", - "kind": "functionapp", - "properties": { - "name": "[variables('functionAppName')]", - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", - "hostingEnvironment": "", - "clientAffinityEnabled": false, - "siteConfig": { - "alwaysOn": true - } - }, - "dependsOn": [ - "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", - "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" - ], - "resources": [ - { - "apiVersion": "2016-03-01", - "name": "appsettings", - "type": "config", - "dependsOn": [ - "[resourceId('Microsoft.Web/sites', variables('functionAppName'))]", - "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" - ], - "properties": { - "AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listkeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2015-05-01-preview').key1,';')]", - "AzureWebJobsDashboard": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listkeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2015-05-01-preview').key1,';')]", - "FUNCTIONS_EXTENSION_VERSION": "~1" - } - } - ] + "apiVersion": "2016-03-01", + "name": "appsettings", + "type": "config", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('functionAppName'))]", + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" + ], + "properties": { + "AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listkeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2015-05-01-preview').key1,';')]", + "AzureWebJobsDashboard": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listkeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2015-05-01-preview').key1,';')]", + "FUNCTIONS_EXTENSION_VERSION": "~1" + } } - ] + ] + } + ] } diff --git a/101-function-app-create-dynamic/azuredeploy.json b/101-function-app-create-dynamic/azuredeploy.json index bb2e38bf5fc6..d35655d7484d 100644 --- a/101-function-app-create-dynamic/azuredeploy.json +++ b/101-function-app-create-dynamic/azuredeploy.json @@ -1,95 +1,102 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "appName": { - "type": "string", - "metadata": { - "description": "The name of the function app that you wish to create." - } - }, - "storageAccountType": { - "type": "string", - "defaultValue": "Standard_LRS", - "allowedValues": [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS" - ], - "metadata": { - "description": "Storage Account type" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "appName": { + "type": "string", + "metadata": { + "description": "The name of the function app that you wish to create." + } }, - "variables": { - "functionAppName": "[parameters('appName')]", - "hostingPlanName": "[parameters('appName')]", - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'azfunctions')]", - "storageAccountid": "[concat(resourceGroup().id,'/providers/','Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" + "storageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS" + ], + "metadata": { + "description": "Storage Account type" + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-12-01", - "location": "[resourceGroup().location]", - "kind": "Storage", - "sku": { - "name": "[parameters('storageAccountType')]" - } - }, - { - "type": "Microsoft.Web/serverfarms", - "apiVersion": "2015-04-01", - "name": "[variables('hostingPlanName')]", - "location": "[resourceGroup().location]", - "properties": { - "name": "[variables('hostingPlanName')]", - "computeMode": "Dynamic", - "sku": "Dynamic" + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "functionAppName": "[parameters('appName')]", + "hostingPlanName": "[parameters('appName')]", + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'azfunctions')]", + "storageAccountid": "[concat(resourceGroup().id,'/providers/','Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-12-01", + "location": "[parameters('location')]", + "kind": "Storage", + "sku": { + "name": "[parameters('storageAccountType')]" + } + }, + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2015-04-01", + "name": "[variables('hostingPlanName')]", + "location": "[parameters('location')]", + "properties": { + "name": "[variables('hostingPlanName')]", + "computeMode": "Dynamic", + "sku": "Dynamic" + } + }, + { + "apiVersion": "2015-08-01", + "type": "Microsoft.Web/sites", + "name": "[variables('functionAppName')]", + "location": "[parameters('location')]", + "kind": "functionapp", + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" + ], + "properties": { + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", + "siteConfig": { + "appSettings": [ + { + "name": "AzureWebJobsDashboard", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]" + }, + { + "name": "AzureWebJobsStorage", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]" + }, + { + "name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]" + }, + { + "name": "WEBSITE_CONTENTSHARE", + "value": "[toLower(variables('functionAppName'))]" + }, + { + "name": "FUNCTIONS_EXTENSION_VERSION", + "value": "~1" + }, + { + "name": "WEBSITE_NODE_DEFAULT_VERSION", + "value": "6.5.0" } - }, - { - "apiVersion": "2015-08-01", - "type": "Microsoft.Web/sites", - "name": "[variables('functionAppName')]", - "location": "[resourceGroup().location]", - "kind": "functionapp", - "dependsOn": [ - "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", - "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" - ], - "properties": { - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", - "siteConfig": { - "appSettings": [ - { - "name": "AzureWebJobsDashboard", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]" - }, - { - "name": "AzureWebJobsStorage", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]" - }, - { - "name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]" - }, - { - "name": "WEBSITE_CONTENTSHARE", - "value": "[toLower(variables('functionAppName'))]" - }, - { - "name": "FUNCTIONS_EXTENSION_VERSION", - "value": "~1" - }, - { - "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "6.5.0" - } - ] - } - } + ] } - ] + } + } + ] } diff --git a/101-hdinsight-hbase-linux-vnet/azuredeploy.json b/101-hdinsight-hbase-linux-vnet/azuredeploy.json index d4094b36b83d..2c905c50b449 100644 --- a/101-hdinsight-hbase-linux-vnet/azuredeploy.json +++ b/101-hdinsight-hbase-linux-vnet/azuredeploy.json @@ -33,14 +33,21 @@ "metadata": { "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "defaultStorageAccount":{ + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id)]", "type": "Standard_LRS" }, - "vNet":{ + "vNet": { "name": "[concat(parameters('clusterName'),'-vnet')]", "addressSpacePrefix": "10.0.0.0/16", "subnetName": "subnet1", @@ -54,7 +61,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vNet').name]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -74,24 +81,24 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('defaultStorageAccount').name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('defaultStorageAccount').type]" + "name": "[variables('defaultStorageAccount').type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} }, { "name": "[parameters('clusterName')]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]", "[concat('Microsoft.Network/virtualNetworks/',variables('vNet').name)]" ], - "tags": { }, + "tags": {}, "properties": { "clusterVersion": "3.6", "osType": "Linux", @@ -108,7 +115,7 @@ "storageProfile": { "storageaccounts": [ { - "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", + "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", "isDefault": true, "container": "[parameters('clusterName')]", "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').keys[0].value]" @@ -183,4 +190,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } } -} \ No newline at end of file +} diff --git a/101-hdinsight-hbase-linux/azuredeploy.json b/101-hdinsight-hbase-linux/azuredeploy.json index eb38e45aff9c..fa3373fcb9c7 100644 --- a/101-hdinsight-hbase-linux/azuredeploy.json +++ b/101-hdinsight-hbase-linux/azuredeploy.json @@ -31,10 +31,17 @@ "metadata": { "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "defaultStorageAccount":{ + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id)]", "type": "Standard_LRS" } @@ -43,23 +50,23 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('defaultStorageAccount').name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('defaultStorageAccount').type]" + "name": "[variables('defaultStorageAccount').type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} }, { "name": "[parameters('clusterName')]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]" ], - "tags": { }, + "tags": {}, "properties": { "clusterVersion": "3.6", "osType": "Linux", @@ -76,7 +83,7 @@ "storageProfile": { "storageaccounts": [ { - "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", + "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", "isDefault": true, "container": "[parameters('clusterName')]", "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').keys[0].value]" @@ -135,4 +142,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } } -} \ No newline at end of file +} diff --git a/101-hdinsight-hbase-replication-geo/azuredeploy.json b/101-hdinsight-hbase-replication-geo/azuredeploy.json index ac3b8a2a89bd..30e001cb6bd3 100644 --- a/101-hdinsight-hbase-replication-geo/azuredeploy.json +++ b/101-hdinsight-hbase-replication-geo/azuredeploy.json @@ -4,7 +4,7 @@ "parameters": { "clusterNamePrefix": { "type": "string", - "maxLength": 5, + "maxLength": 5, "metadata": { "description": "The prefix of the HDInsight cluster name." } @@ -32,26 +32,33 @@ "metadata": { "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "clusterNode1":{ + "clusterNode1": { "name": "[concat(parameters('clusterNamePrefix'),'1')]", - "location": "West US", - "defaultStorageAccount":{ + "location": "[parameters('location')]", + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id)]", "type": "Standard_LRS" } }, - "clusterNode2":{ + "clusterNode2": { "name": "[concat(parameters('clusterNamePrefix'),'2')]", "location": "East US", - "defaultStorageAccount":{ + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id, deployment().name)]", "type": "Standard_LRS" } }, - "vNet1":{ + "vNet1": { "name": "[concat(parameters('clusterNamePrefix'),'-vnet1')]", "addressSpacePrefix": "10.1.0.0/16", "subnetName": "subnet1", @@ -61,7 +68,7 @@ "vpnGatewayName": "vnet1gw", "vpnGatewayIP": "vnet1gwip" }, - "vNet2":{ + "vNet2": { "name": "[concat(parameters('clusterNamePrefix'),'-vnet2')]", "addressSpacePrefix": "10.2.0.0/16", "subnetName": "subnet1", @@ -71,7 +78,7 @@ "vpnGatewayName": "vnet2gw", "vpnGatewayIP": "vnet2gwip" }, - "vpnConnections":{ + "vpnConnections": { "name1": "vnet1tovnet2", "name2": "vnet2tovnet1", "sharedKey": "A1b2C3D4" @@ -111,7 +118,7 @@ "location": "[variables('clusterNode1').location]", "apiVersion": "2017-08-01", "properties": { - "publicIPAllocationMethod": "Dynamic" + "publicIPAllocationMethod": "Dynamic" } }, { @@ -119,31 +126,31 @@ "name": "[variables('vNet1').vpnGatewayName]", "location": "[variables('clusterNode1').location]", "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('vNet1').vpnGatewayIP)]", - "[concat('Microsoft.Network/virtualNetworks/', variables('vNet1').name)]" + "[concat('Microsoft.Network/publicIPAddresses/', variables('vNet1').vpnGatewayIP)]", + "[concat('Microsoft.Network/virtualNetworks/', variables('vNet1').name)]" ], "apiVersion": "2017-06-01", "properties": { - "gatewayType": "Vpn", - "vpnType": "RouteBased", - "sku": { - "name": "Basic", - "tier": "Basic" - }, - "ipConfigurations": [ - { - "name": "default", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet1').name, variables('vNet1').gatewaySubnetName)]" - }, - "publicIpAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vNet1').vpnGatewayIP)]" - } - } + "gatewayType": "Vpn", + "vpnType": "RouteBased", + "sku": { + "name": "Basic", + "tier": "Basic" + }, + "ipConfigurations": [ + { + "name": "default", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet1').name, variables('vNet1').gatewaySubnetName)]" + }, + "publicIpAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vNet1').vpnGatewayIP)]" } - ] + } + } + ] } }, { @@ -172,14 +179,14 @@ } ] } - }, + }, { "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('vNet2').vpnGatewayIP]", "location": "[variables('clusterNode2').location]", "apiVersion": "2017-08-01", "properties": { - "publicIPAllocationMethod": "Dynamic" + "publicIPAllocationMethod": "Dynamic" } }, { @@ -187,31 +194,31 @@ "name": "[variables('vNet2').vpnGatewayName]", "location": "[variables('clusterNode2').location]", "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('vNet2').vpnGatewayIP)]", - "[concat('Microsoft.Network/virtualNetworks/', variables('vNet2').name)]" + "[concat('Microsoft.Network/publicIPAddresses/', variables('vNet2').vpnGatewayIP)]", + "[concat('Microsoft.Network/virtualNetworks/', variables('vNet2').name)]" ], "apiVersion": "2017-06-01", "properties": { - "gatewayType": "Vpn", - "vpnType": "RouteBased", - "sku": { - "name": "Basic", - "tier": "Basic" - }, - "ipConfigurations": [ - { - "name": "default", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet2').name, variables('vNet2').gatewaySubnetName)]" - }, - "publicIpAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vNet2').vpnGatewayIP)]" - } - } + "gatewayType": "Vpn", + "vpnType": "RouteBased", + "sku": { + "name": "Basic", + "tier": "Basic" + }, + "ipConfigurations": [ + { + "name": "default", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet2').name, variables('vNet2').gatewaySubnetName)]" + }, + "publicIpAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vNet2').vpnGatewayIP)]" } - ] + } + } + ] } }, { @@ -235,10 +242,9 @@ "routingWeight": 0, "enableBgp": false, "usePolicyBasedTrafficSelectors": false, - "ipsecPolicies": [] + "ipsecPolicies": [] } }, - { "apiVersion": "2015-06-15", "name": "[variables('vpnConnections').name2]", @@ -249,7 +255,7 @@ "[concat('Microsoft.Network/virtualNetworkGateways/', variables('vNet1').vpnGatewayName)]" ], "properties": { - "connectionType": "Vnet2Vnet", + "connectionType": "Vnet2Vnet", "virtualNetworkGateway1": { "id": "[resourceId('Microsoft.Network/virtualNetworkGateways', variables('vNet2').vpnGatewayName)]" }, @@ -260,7 +266,7 @@ "routingWeight": 0, "enableBgp": false, "usePolicyBasedTrafficSelectors": false, - "ipsecPolicies": [] + "ipsecPolicies": [] } }, { @@ -269,11 +275,11 @@ "location": "[variables('clusterNode1').location]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('clusterNode1').defaultStorageAccount.type]" + "name": "[variables('clusterNode1').defaultStorageAccount.type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} - }, + }, { "name": "[variables('clusterNode1').name]", "type": "Microsoft.HDInsight/clusters", @@ -283,7 +289,7 @@ "[concat('Microsoft.Storage/storageAccounts/',variables('clusterNode1').defaultStorageAccount.name)]", "[concat('Microsoft.Network/virtualNetworks/',variables('vNet1').name)]" ], - "tags": { }, + "tags": {}, "properties": { "clusterVersion": "3.5", "osType": "Linux", @@ -300,7 +306,7 @@ "storageProfile": { "storageaccounts": [ { - "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode1').defaultStorageAccount.name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", + "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode1').defaultStorageAccount.name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", "isDefault": true, "container": "[variables('clusterNode1').name]", "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode1').defaultStorageAccount.name), '2016-01-01').keys[0].value]" @@ -340,7 +346,7 @@ }, "virtualNetworkProfile": { "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNet1').name)]", - "subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet1').name, variables('vNet1').subnetName)]" + "subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet1').name, variables('vNet1').subnetName)]" } }, { @@ -357,7 +363,7 @@ }, "virtualNetworkProfile": { "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNet1').name)]", - "subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet1').name, variables('vNet1').subnetName)]" + "subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet1').name, variables('vNet1').subnetName)]" } } ] @@ -370,11 +376,11 @@ "location": "[variables('clusterNode2').location]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('clusterNode2').defaultStorageAccount.type]" + "name": "[variables('clusterNode2').defaultStorageAccount.type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} - }, + }, { "name": "[variables('clusterNode2').name]", "type": "Microsoft.HDInsight/clusters", @@ -384,7 +390,7 @@ "[concat('Microsoft.Storage/storageAccounts/',variables('clusterNode2').defaultStorageAccount.name)]", "[concat('Microsoft.Network/virtualNetworks/',variables('vNet2').name)]" ], - "tags": { }, + "tags": {}, "properties": { "clusterVersion": "3.6", "osType": "Linux", @@ -401,7 +407,7 @@ "storageProfile": { "storageaccounts": [ { - "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode2').defaultStorageAccount.name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", + "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode2').defaultStorageAccount.name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", "isDefault": true, "container": "[variables('clusterNode2').name]", "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode2').defaultStorageAccount.name), '2016-01-01').keys[0].value]" diff --git a/101-hdinsight-hbase-replication-one-vnet/azuredeploy.json b/101-hdinsight-hbase-replication-one-vnet/azuredeploy.json index eeaeaecbd552..dbbb55131dbd 100644 --- a/101-hdinsight-hbase-replication-one-vnet/azuredeploy.json +++ b/101-hdinsight-hbase-replication-one-vnet/azuredeploy.json @@ -4,7 +4,7 @@ "parameters": { "clusterNamePrefix": { "type": "string", - "maxLength": 5, + "maxLength": 5, "metadata": { "description": "The prefix of the HDInsight cluster name." } @@ -32,24 +32,31 @@ "metadata": { "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "clusterNode1":{ + "clusterNode1": { "name": "[concat(parameters('clusterNamePrefix'),'1')]", - "defaultStorageAccount":{ + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id)]", "type": "Standard_LRS" } }, - "clusterNode2":{ + "clusterNode2": { "name": "[concat(parameters('clusterNamePrefix'),'2')]", - "defaultStorageAccount":{ + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id, deployment().name)]", "type": "Standard_LRS" } }, - "vNet":{ + "vNet": { "name": "[concat(parameters('clusterNamePrefix'),'-vnet')]", "addressSpacePrefix": "10.0.0.0/16", "subnetName": "subnet1", @@ -61,7 +68,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vNet').name]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -81,24 +88,24 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('clusterNode1').defaultStorageAccount.name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('clusterNode1').defaultStorageAccount.type]" + "name": "[variables('clusterNode1').defaultStorageAccount.type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} - }, + }, { "name": "[variables('clusterNode1').name]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('clusterNode1').defaultStorageAccount.name)]", "[concat('Microsoft.Network/virtualNetworks/',variables('vNet').name)]" ], - "tags": { }, + "tags": {}, "properties": { "clusterVersion": "3.5", "osType": "Linux", @@ -115,7 +122,7 @@ "storageProfile": { "storageaccounts": [ { - "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode1').defaultStorageAccount.name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", + "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode1').defaultStorageAccount.name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", "isDefault": true, "container": "[variables('clusterNode1').name]", "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode1').defaultStorageAccount.name), '2016-01-01').keys[0].value]" @@ -155,7 +162,7 @@ }, "virtualNetworkProfile": { "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNet').name)]", - "subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet').name, variables('vNet').subnetName)]" + "subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet').name, variables('vNet').subnetName)]" } }, { @@ -172,7 +179,7 @@ }, "virtualNetworkProfile": { "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNet').name)]", - "subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet').name, variables('vNet').subnetName)]" + "subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet').name, variables('vNet').subnetName)]" } } ] @@ -182,24 +189,24 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('clusterNode2').defaultStorageAccount.name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('clusterNode2').defaultStorageAccount.type]" + "name": "[variables('clusterNode2').defaultStorageAccount.type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} - }, + }, { "name": "[variables('clusterNode2').name]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('clusterNode2').defaultStorageAccount.name)]", "[concat('Microsoft.Network/virtualNetworks/',variables('vNet').name)]" ], - "tags": { }, + "tags": {}, "properties": { "clusterVersion": "3.6", "osType": "Linux", @@ -216,7 +223,7 @@ "storageProfile": { "storageaccounts": [ { - "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode2').defaultStorageAccount.name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", + "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode2').defaultStorageAccount.name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", "isDefault": true, "container": "[variables('clusterNode2').name]", "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode2').defaultStorageAccount.name), '2016-01-01').keys[0].value]" @@ -295,4 +302,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters',variables('clusterNode2').name))]" } } -} \ No newline at end of file +} diff --git a/101-hdinsight-hbase-replication-two-vnets-same-region/azuredeploy.json b/101-hdinsight-hbase-replication-two-vnets-same-region/azuredeploy.json index 8c5bdd1d508b..7c667c03881e 100644 --- a/101-hdinsight-hbase-replication-two-vnets-same-region/azuredeploy.json +++ b/101-hdinsight-hbase-replication-two-vnets-same-region/azuredeploy.json @@ -4,7 +4,7 @@ "parameters": { "clusterNamePrefix": { "type": "string", - "maxLength": 5, + "maxLength": 5, "metadata": { "description": "The prefix of the HDInsight cluster name." } @@ -32,31 +32,38 @@ "metadata": { "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "clusterNode1":{ + "clusterNode1": { "name": "[concat(parameters('clusterNamePrefix'),'1')]", - "defaultStorageAccount":{ + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id)]", "type": "Standard_LRS" } }, - "clusterNode2":{ + "clusterNode2": { "name": "[concat(parameters('clusterNamePrefix'),'2')]", - "defaultStorageAccount":{ + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id, deployment().name)]", "type": "Standard_LRS" } }, - "vNet1":{ + "vNet1": { "name": "[concat(parameters('clusterNamePrefix'),'-vnet1')]", "addressSpacePrefix": "10.1.0.0/16", "subnetName": "subnet1", "subnetPrefix": "10.1.0.0/24", "peeringName": "[concat(parameters('clusterNamePrefix'),'-vnet1/PeeringToVNet2')]" }, - "vNet2":{ + "vNet2": { "name": "[concat(parameters('clusterNamePrefix'),'-vnet2')]", "addressSpacePrefix": "10.2.0.0/16", "subnetName": "subnet1", @@ -69,7 +76,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vNet1').name]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -90,7 +97,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vNet2').name]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -110,7 +117,7 @@ { "type": "Microsoft.Network/virtualNetworks/virtualNetworkPeerings", "name": "[variables('vNet1').peeringName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-06-01", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/',variables('vNet1').name)]", @@ -122,14 +129,14 @@ "allowGatewayTransit": false, "useRemoteGateways": false, "remoteVirtualNetwork": { - "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNet2').name)]" + "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNet2').name)]" } } }, { "type": "Microsoft.Network/virtualNetworks/virtualNetworkPeerings", "name": "[variables('vNet2').peeringName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-06-01", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/',variables('vNet1').name)]", @@ -141,31 +148,31 @@ "allowGatewayTransit": false, "useRemoteGateways": false, "remoteVirtualNetwork": { - "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNet1').name)]" + "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNet1').name)]" } } - }, + }, { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('clusterNode1').defaultStorageAccount.name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('clusterNode1').defaultStorageAccount.type]" + "name": "[variables('clusterNode1').defaultStorageAccount.type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} - }, + }, { "name": "[variables('clusterNode1').name]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('clusterNode1').defaultStorageAccount.name)]", "[concat('Microsoft.Network/virtualNetworks/',variables('vNet1').name)]" ], - "tags": { }, + "tags": {}, "properties": { "clusterVersion": "3.6", "osType": "Linux", @@ -182,7 +189,7 @@ "storageProfile": { "storageaccounts": [ { - "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode1').defaultStorageAccount.name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", + "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode1').defaultStorageAccount.name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", "isDefault": true, "container": "[variables('clusterNode1').name]", "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode1').defaultStorageAccount.name), '2016-01-01').keys[0].value]" @@ -222,7 +229,7 @@ }, "virtualNetworkProfile": { "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNet1').name)]", - "subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet1').name, variables('vNet1').subnetName)]" + "subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet1').name, variables('vNet1').subnetName)]" } }, { @@ -239,7 +246,7 @@ }, "virtualNetworkProfile": { "id": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNet1').name)]", - "subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet1').name, variables('vNet1').subnetName)]" + "subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNet1').name, variables('vNet1').subnetName)]" } } ] @@ -249,24 +256,24 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('clusterNode2').defaultStorageAccount.name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('clusterNode2').defaultStorageAccount.type]" + "name": "[variables('clusterNode2').defaultStorageAccount.type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} - }, + }, { "name": "[variables('clusterNode2').name]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('clusterNode2').defaultStorageAccount.name)]", "[concat('Microsoft.Network/virtualNetworks/',variables('vNet2').name)]" ], - "tags": { }, + "tags": {}, "properties": { "clusterVersion": "3.5", "osType": "Linux", @@ -283,7 +290,7 @@ "storageProfile": { "storageaccounts": [ { - "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode2').defaultStorageAccount.name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", + "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode2').defaultStorageAccount.name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", "isDefault": true, "container": "[variables('clusterNode2').name]", "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('clusterNode2').defaultStorageAccount.name), '2016-01-01').keys[0].value]" @@ -356,7 +363,7 @@ "vnet2": { "type": "object", "value": "[reference(resourceId('Microsoft.Network/virtualNetworks',variables('vNet2').name))]" - }, + }, "cluster1": { "type": "object", "value": "[reference(resourceId('Microsoft.HDInsight/clusters',variables('clusterNode1').name))]" @@ -366,4 +373,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters',variables('clusterNode2').name))]" } } -} \ No newline at end of file +} diff --git a/101-hdinsight-interactive-hive/azuredeploy.json b/101-hdinsight-interactive-hive/azuredeploy.json index 93bb90642d67..8254dbc7745d 100644 --- a/101-hdinsight-interactive-hive/azuredeploy.json +++ b/101-hdinsight-interactive-hive/azuredeploy.json @@ -1,40 +1,47 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "clusterName": { - "type": "string", - "metadata": { - "description": "The name of the HDInsight cluster to create." - } - }, - "clusterLoginUserName": { - "type": "string", - "metadata": { - "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." - } - }, - "clusterLoginPassword": { - "type": "securestring", - "metadata": { - "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - }, - "sshUserName": { - "type": "string", - "metadata": { - "description": "These credentials can be used to remotely access the cluster." - } - }, - "sshPassword": { - "type": "securestring", - "metadata": { - "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - } - }, + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "type": "string", + "metadata": { + "description": "The name of the HDInsight cluster to create." + } + }, + "clusterLoginUserName": { + "type": "string", + "metadata": { + "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." + } + }, + "clusterLoginPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "sshUserName": { + "type": "string", + "metadata": { + "description": "These credentials can be used to remotely access the cluster." + } + }, + "sshPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, "variables": { - "defaultStorageAccount":{ + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id)]", "type": "Standard_LRS" } @@ -43,21 +50,22 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('defaultStorageAccount').name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('defaultStorageAccount').type]" + "name": "[variables('defaultStorageAccount').type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} }, { "type": "Microsoft.HDInsight/clusters", "name": "[parameters('clusterName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]" ], + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]" + ], "properties": { "clusterVersion": "3.6", "osType": "Linux", @@ -115,14 +123,14 @@ } } ], - "outputs": { - "storage":{ + "outputs": { + "storage": { "type": "object", "value": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name))]" }, - "cluster": { - "type": "object", - "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" - } - } + "cluster": { + "type": "object", + "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" + } + } } diff --git a/101-hdinsight-kafka/azuredeploy.json b/101-hdinsight-kafka/azuredeploy.json index 94cae7216322..7168dc1985ea 100644 --- a/101-hdinsight-kafka/azuredeploy.json +++ b/101-hdinsight-kafka/azuredeploy.json @@ -31,6 +31,13 @@ "metadata": { "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -43,29 +50,28 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('defaultStorageAccount').name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-10-01", "sku": { - "name": "[variables('defaultStorageAccount').type]" + "name": "[variables('defaultStorageAccount').type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} }, { "name": "[parameters('clusterName')]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]" ], - "tags": { }, + "tags": {}, "properties": { "clusterVersion": "3.6", "osType": "Linux", "clusterDefinition": { "kind": "kafka", - "configurations": { "gateway": { "restAuthCredential.isEnabled": true, @@ -141,4 +147,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } } -} \ No newline at end of file +} diff --git a/101-hdinsight-linux-add-edge-node/azuredeploy.json b/101-hdinsight-linux-add-edge-node/azuredeploy.json index d26eb911a29b..860016590fb0 100644 --- a/101-hdinsight-linux-add-edge-node/azuredeploy.json +++ b/101-hdinsight-linux-add-edge-node/azuredeploy.json @@ -9,27 +9,27 @@ } }, "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-hdinsight-linux-add-edge-node" + "type": "string", + "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." }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-hdinsight-linux-add-edge-node" + }, "_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": "" + "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." }, - "installScriptActionFolder":{ + "defaultValue": "" + }, + "installScriptActionFolder": { "type": "string", "metadata": { "description": "A script action you can run on the empty node to install or configure additiona software." }, "defaultValue": "scripts" }, - "installScriptAction":{ + "installScriptAction": { "type": "string", "metadata": { "description": "A script action you can run on the empty node to install or configure additiona software." @@ -42,30 +42,36 @@ }, "resources": [ { - "name": "[concat(parameters('clusterName'),'/', variables('applicationName'))]", - "type": "Microsoft.HDInsight/clusters/applications", - "apiVersion": "2015-03-01-preview", - "dependsOn": [], - "properties": { - "marketPlaceIdentifier": "EmptyNode", - "computeProfile": { - "roles": [{ - "name": "edgenode", - "targetInstanceCount": 1, - "hardwareProfile": { - "vmSize": "Standard_D3_v2" - } - }] - }, - "installScriptActions": [{ - "name": "[concat('emptynode','-' ,uniquestring(variables('applicationName')))]", - "uri": "[concat(parameters('_artifactsLocation'), '/', parameters('installScriptActionFolder'), '/', parameters('installScriptAction'), parameters('_artifactsLocationSasToken'))]", - "roles": ["edgenode"] - }], - "uninstallScriptActions": [], - "httpsEndpoints": [], - "applicationType": "CustomApplication" - } + "name": "[concat(parameters('clusterName'),'/', variables('applicationName'))]", + "type": "Microsoft.HDInsight/clusters/applications", + "apiVersion": "2015-03-01-preview", + "dependsOn": [], + "properties": { + "marketPlaceIdentifier": "EmptyNode", + "computeProfile": { + "roles": [ + { + "name": "edgenode", + "targetInstanceCount": 1, + "hardwareProfile": { + "vmSize": "Standard_D3_v2" + } + } + ] + }, + "installScriptActions": [ + { + "name": "[concat('emptynode','-' ,uniquestring(variables('applicationName')))]", + "uri": "[concat(parameters('_artifactsLocation'), '/', parameters('installScriptActionFolder'), '/', parameters('installScriptAction'), parameters('_artifactsLocationSasToken'))]", + "roles": [ + "edgenode" + ] + } + ], + "uninstallScriptActions": [], + "httpsEndpoints": [], + "applicationType": "CustomApplication" + } } ], "outputs": { @@ -74,4 +80,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters/applications/',parameters('clusterName'), variables('applicationName')))]" } } -} +} \ No newline at end of file diff --git a/101-hdinsight-linux-add-edge-node/prereqs/prereq.azuredeploy.json b/101-hdinsight-linux-add-edge-node/prereqs/prereq.azuredeploy.json index d9d6668daf7b..c4ae036de091 100644 --- a/101-hdinsight-linux-add-edge-node/prereqs/prereq.azuredeploy.json +++ b/101-hdinsight-linux-add-edge-node/prereqs/prereq.azuredeploy.json @@ -1,141 +1,152 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "clusterName": { - "type": "string", - "metadata": { - "description": "The name of the HDInsight cluster to create." - } - }, - "clusterLoginUserName": { - "type": "string", - "defaultValue": "admin", - "metadata": { - "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." - } - }, - "clusterLoginPassword": { - "type": "securestring", - "metadata": { - "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - }, - "sshUserName": { - "type": "string", - "defaultValue": "sshuser", - "metadata": { - "description": "These credentials can be used to remotely access the cluster." - } - }, - "sshPassword": { - "type": "securestring", - "metadata": { - "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - }, - "clusterType": { - "type": "string", - "defaultValue": "hadoop", - "allowedValues": [ - "hadoop", - "hbase", - "storm", - "spark" - ], - "metadata": { - "description": "The type of the HDInsight cluster to create." - } - }, - "clusterWorkerNodeCount": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The number of nodes in the HDInsight cluster." - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "type": "string", + "metadata": { + "description": "The name of the HDInsight cluster to create." + } + }, + "clusterLoginUserName": { + "type": "string", + "defaultValue": "admin", + "metadata": { + "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." + } + }, + "clusterLoginPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "sshUserName": { + "type": "string", + "defaultValue": "sshuser", + "metadata": { + "description": "These credentials can be used to remotely access the cluster." + } }, - "variables": { - "clusterStorageAccountName": "[concat('clustrstg',uniqueString(resourceGroup().id))]" + "sshPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } }, - "resources": [{ - "name": "[variables('clusterStorageAccountName')]", - "type": "Microsoft.Storage/storageAccounts", - "location": "[ResourceGroup().location]", - "apiVersion": "2015-05-01-preview", - "dependsOn": [], - "tags": {}, - "properties": { - "accountType": "Standard_LRS" + "clusterType": { + "type": "string", + "defaultValue": "hadoop", + "allowedValues": [ + "hadoop", + "hbase", + "storm", + "spark" + ], + "metadata": { + "description": "The type of the HDInsight cluster to create." + } + }, + "clusterWorkerNodeCount": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The number of nodes in the HDInsight cluster." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "clusterStorageAccountName": "[concat('clustrstg',uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "name": "[variables('clusterStorageAccountName')]", + "type": "Microsoft.Storage/storageAccounts", + "location": "[ResourceGroup().location]", + "apiVersion": "2015-05-01-preview", + "dependsOn": [], + "tags": {}, + "properties": { + "accountType": "Standard_LRS" + } + }, + { + "name": "[parameters('clusterName')]", + "type": "Microsoft.HDInsight/clusters", + "location": "[parameters('location')]", + "apiVersion": "2015-03-01-preview", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/',variables('clusterStorageAccountName'))]" + ], + "tags": {}, + "properties": { + "clusterVersion": "3.4", + "osType": "Linux", + "tier": "standard", + "clusterDefinition": { + "kind": "[parameters('clusterType')]", + "configurations": { + "gateway": { + "restAuthCredential.isEnabled": true, + "restAuthCredential.username": "[parameters('clusterLoginUserName')]", + "restAuthCredential.password": "[parameters('clusterLoginPassword')]" + } + } + }, + "storageProfile": { + "storageaccounts": [ + { + "name": "[concat(variables('clusterStorageAccountName'),'.blob.core.windows.net')]", + "isDefault": true, + "container": "[parameters('clusterName')]", + "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('clusterStorageAccountName')),'2015-05-01-preview').key1]" } + ] }, - { - "name": "[parameters('clusterName')]", - "type": "Microsoft.HDInsight/clusters", - "location": "[ResourceGroup().location]", - "apiVersion": "2015-03-01-preview", - "dependsOn": ["[concat('Microsoft.Storage/storageAccounts/',variables('clusterStorageAccountName'))]"], - "tags": { - + "computeProfile": { + "roles": [ + { + "name": "headnode", + "targetInstanceCount": "2", + "hardwareProfile": { + "vmSize": "Standard_D3" + }, + "osProfile": { + "linuxOperatingSystemProfile": { + "username": "[parameters('sshUserName')]", + "password": "[parameters('sshPassword')]" + } + } }, - "properties": { - "clusterVersion": "3.4", - "osType": "Linux", - "tier": "standard", - "clusterDefinition": { - "kind": "[parameters('clusterType')]", - "configurations": { - "gateway": { - "restAuthCredential.isEnabled": true, - "restAuthCredential.username": "[parameters('clusterLoginUserName')]", - "restAuthCredential.password": "[parameters('clusterLoginPassword')]" - } - } - }, - "storageProfile": { - "storageaccounts": [{ - "name": "[concat(variables('clusterStorageAccountName'),'.blob.core.windows.net')]", - "isDefault": true, - "container": "[parameters('clusterName')]", - "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('clusterStorageAccountName')),'2015-05-01-preview').key1]" - }] - }, - "computeProfile": { - "roles": [{ - "name": "headnode", - "targetInstanceCount": "2", - "hardwareProfile": { - "vmSize": "Standard_D3" - }, - "osProfile": { - "linuxOperatingSystemProfile": { - "username": "[parameters('sshUserName')]", - "password": "[parameters('sshPassword')]" - } - } - }, - { - "name": "workernode", - "targetInstanceCount": "[parameters('clusterWorkerNodeCount')]", - "hardwareProfile": { - "vmSize": "Standard_D3" - }, - "osProfile": { - "linuxOperatingSystemProfile": { - "username": "[parameters('sshUserName')]", - "password": "[parameters('sshPassword')]" - } - } - } - ] + { + "name": "workernode", + "targetInstanceCount": "[parameters('clusterWorkerNodeCount')]", + "hardwareProfile": { + "vmSize": "Standard_D3" + }, + "osProfile": { + "linuxOperatingSystemProfile": { + "username": "[parameters('sshUserName')]", + "password": "[parameters('sshPassword')]" } + } } + ] } - ], - "outputs": { - "clusterName": { - "type": "string", - "value": "[parameters('clusterName')]" - } + } + } + ], + "outputs": { + "clusterName": { + "type": "string", + "value": "[parameters('clusterName')]" } + } } diff --git a/101-hdinsight-linux-ssh-password/azuredeploy.json b/101-hdinsight-linux-ssh-password/azuredeploy.json index 51bd48dcda6a..06189a36461d 100644 --- a/101-hdinsight-linux-ssh-password/azuredeploy.json +++ b/101-hdinsight-linux-ssh-password/azuredeploy.json @@ -1,53 +1,60 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "clusterName": { - "type": "string", - "metadata": { - "description": "The name of the HDInsight cluster to create." - } - }, - "clusterType": { - "type": "string", - "allowedValues": [ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "type": "string", + "metadata": { + "description": "The name of the HDInsight cluster to create." + } + }, + "clusterType": { + "type": "string", + "allowedValues": [ "hadoop", - "intractivehive", - "hbase", - "storm", - "spark" - ], - "metadata": { - "description": "The type of the HDInsight cluster to create." - } - }, - "clusterLoginUserName": { - "type": "string", - "metadata": { - "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." - } - }, - "clusterLoginPassword": { - "type": "securestring", - "metadata": { - "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - }, - "sshUserName": { - "type": "string", - "metadata": { - "description": "These credentials can be used to remotely access the cluster." - } - }, - "sshPassword": { - "type": "securestring", - "metadata": { - "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - } - }, + "intractivehive", + "hbase", + "storm", + "spark" + ], + "metadata": { + "description": "The type of the HDInsight cluster to create." + } + }, + "clusterLoginUserName": { + "type": "string", + "metadata": { + "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." + } + }, + "clusterLoginPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "sshUserName": { + "type": "string", + "metadata": { + "description": "These credentials can be used to remotely access the cluster." + } + }, + "sshPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, "variables": { - "defaultStorageAccount":{ + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id)]", "type": "Standard_LRS" } @@ -56,21 +63,22 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('defaultStorageAccount').name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('defaultStorageAccount').type]" + "name": "[variables('defaultStorageAccount').type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} }, { "type": "Microsoft.HDInsight/clusters", "name": "[parameters('clusterName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]" ], + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]" + ], "properties": { "clusterVersion": "3.6", "osType": "Linux", @@ -127,14 +135,14 @@ } } ], - "outputs": { - "storage":{ + "outputs": { + "storage": { "type": "object", "value": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name))]" }, - "cluster": { - "type": "object", - "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" - } - } + "cluster": { + "type": "object", + "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" + } + } } diff --git a/101-hdinsight-linux-ssh-publickey-metastore-vnet/azuredeploy.json b/101-hdinsight-linux-ssh-publickey-metastore-vnet/azuredeploy.json index 580500aa7a13..58bccc2c97aa 100644 --- a/101-hdinsight-linux-ssh-publickey-metastore-vnet/azuredeploy.json +++ b/101-hdinsight-linux-ssh-publickey-metastore-vnet/azuredeploy.json @@ -120,17 +120,23 @@ "metadata": { "description": "The existing virtual network subnet name." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "defaultApiVersion": "2015-06-15", - "clusterApiVersion": "2015-03-01-preview" + "defaultApiVersion": "2015-06-15" }, "resources": [ { "name": "[parameters('clusterName')]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "properties": { "clusterVersion": "[parameters('clusterVersion')]", @@ -216,4 +222,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } } -} \ No newline at end of file +} diff --git a/101-hdinsight-linux-ssh-publickey-metastore-vnet/prereqs/prereq.azuredeploy.json b/101-hdinsight-linux-ssh-publickey-metastore-vnet/prereqs/prereq.azuredeploy.json index fac788ac211b..02e7a1f2b0c1 100644 --- a/101-hdinsight-linux-ssh-publickey-metastore-vnet/prereqs/prereq.azuredeploy.json +++ b/101-hdinsight-linux-ssh-publickey-metastore-vnet/prereqs/prereq.azuredeploy.json @@ -1,155 +1,164 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "databaseAdminUsername": { - "type": "string", - "metadata": { - "description": "Username for DB Admin" - } - }, - "databaseAdminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for DB Admin" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "databaseAdminUsername": { + "type": "string", + "metadata": { + "description": "Username for DB Admin" + } }, - "variables": { - "storageAccountName": "[concat('storage', uniqueString(resourceGroup().id))]", - "storageAccountType": "Standard_LRS", - "vNetName": "vNet", - "vNetPrefix": "10.0.0.0/16", - "SubnetName": "Subnet-1", - "SubnetPrefix": "10.0.0.0/24", - "serverName": "[concat('server', uniqueString(resourceGroup().id))]", - "dataBaseName": "DB", - "dataBaseCollation": "SQL_Latin1_General_CP1_CI_AS", - "dataBaseEdition": "Basic", - "dataBaseRequestedServiceObjectiveName": "Basic" - + "databaseAdminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for DB Admin" + } }, - "resources": [{ - "name": "[variables('storageAccountName')]", - "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", - "apiVersion": "2016-01-01", - "sku": { - "name": "[variables('storageAccountType')]" - }, - "dependsOn": [], - "tags": { - "displayName": "storageAccount" - }, - "kind": "Storage" + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountName": "[concat('storage', uniqueString(resourceGroup().id))]", + "storageAccountType": "Standard_LRS", + "vNetName": "vNet", + "vNetPrefix": "10.0.0.0/16", + "SubnetName": "Subnet-1", + "SubnetPrefix": "10.0.0.0/24", + "serverName": "[concat('server', uniqueString(resourceGroup().id))]", + "dataBaseName": "DB", + "dataBaseCollation": "SQL_Latin1_General_CP1_CI_AS", + "dataBaseEdition": "Basic", + "dataBaseRequestedServiceObjectiveName": "Basic" + }, + "resources": [ + { + "name": "[variables('storageAccountName')]", + "type": "Microsoft.Storage/storageAccounts", + "location": "[parameters('location')]", + "apiVersion": "2016-01-01", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "dependsOn": [], + "tags": { + "displayName": "storageAccount" + }, + "kind": "Storage" + }, + { + "name": "[variables('vNetName')]", + "type": "Microsoft.Network/virtualNetworks", + "location": "[parameters('location')]", + "apiVersion": "2016-03-30", + "dependsOn": [], + "tags": { + "displayName": "vNet" + }, + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vNetPrefix')]" + ] }, - { - "name": "[variables('vNetName')]", - "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", - "apiVersion": "2016-03-30", - "dependsOn": [], - "tags": { - "displayName": "vNet" - }, + "subnets": [ + { + "name": "[variables('SubnetName')]", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('vNetPrefix')]" - ] - }, - "subnets": [{ - "name": "[variables('SubnetName')]", - "properties": { - "addressPrefix": "[variables('SubnetPrefix')]" - } - }] + "addressPrefix": "[variables('SubnetPrefix')]" } - }, + } + ] + } + }, + { + "name": "[variables('serverName')]", + "type": "Microsoft.Sql/servers", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01-preview", + "dependsOn": [], + "tags": { + "displayName": "server" + }, + "properties": { + "administratorLogin": "[parameters('databaseAdminUsername')]", + "administratorLoginPassword": "[parameters('databaseAdminPassword')]" + }, + "resources": [ { - "name": "[variables('serverName')]", - "type": "Microsoft.Sql/servers", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01-preview", - "dependsOn": [], - "tags": { - "displayName": "server" - }, - "properties": { - "administratorLogin": "[parameters('databaseAdminUsername')]", - "administratorLoginPassword": "[parameters('databaseAdminPassword')]" - }, - "resources": [{ - "name": "AllowAllWindowsAzureIps", - "type": "firewallrules", - "location": "East US", - "apiVersion": "2014-04-01-preview", - "dependsOn": [ - "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" - ], - "properties": { - "startIpAddress": "0.0.0.0", - "endIpAddress": "0.0.0.0" - } - }, - { - "name": "[variables('dataBaseName')]", - "type": "databases", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01-preview", - "dependsOn": [ - "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" - ], - "tags": { - "displayName": "dataBase" - }, - "properties": { - "collation": "[variables('dataBaseCollation')]", - "edition": "[variables('dataBaseEdition')]", - "maxSizeBytes": "1073741824", - "requestedServiceObjectiveName": "[variables('dataBaseRequestedServiceObjectiveName')]" - } - } - ] - } - - ], - "outputs": { - "existingClusterStorageResourceGroup": { - "type": "string", - "value": "[resourceGroup().name]" - }, - "existingClusterStorageAccountName": { - "type": "string", - "value": "[variables('storageAccountName')]" - }, - "existingVirtualNetworkName": { - "type": "string", - "value": "[variables('vNetName')]" - }, - "existingHiveMetastoreServerName": { - "type": "string", - "value": "[concat(variables('serverName'),'.database.windows.net')]" + "name": "AllowAllWindowsAzureIps", + "type": "firewallrules", + "location": "East US", + "apiVersion": "2014-04-01-preview", + "dependsOn": [ + "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" + ], + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "0.0.0.0" + } }, - "existingHiveMetastoreDatabaseName": { - "type": "string", - "value": "[variables('dataBaseName')]" - }, - "existingHiveMetastoreUsername": { - "type": "string", - "value": "[parameters('databaseAdminUsername')]" - }, - "existingHiveMetastorePassword": { - "type": "string", - "value": "[parameters('databaseAdminPassword')]" - }, - "existingVirtualNetworkResourceGroup": { - "type": "string", - "value": "[resourceGroup().name]" - }, - "existingVirtualNetworkSubnetName": { - "type": "string", - "value": "[variables('SubnetName')]" + { + "name": "[variables('dataBaseName')]", + "type": "databases", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01-preview", + "dependsOn": [ + "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" + ], + "tags": { + "displayName": "dataBase" + }, + "properties": { + "collation": "[variables('dataBaseCollation')]", + "edition": "[variables('dataBaseEdition')]", + "maxSizeBytes": "1073741824", + "requestedServiceObjectiveName": "[variables('dataBaseRequestedServiceObjectiveName')]" + } } + ] + } + ], + "outputs": { + "existingClusterStorageResourceGroup": { + "type": "string", + "value": "[resourceGroup().name]" + }, + "existingClusterStorageAccountName": { + "type": "string", + "value": "[variables('storageAccountName')]" + }, + "existingVirtualNetworkName": { + "type": "string", + "value": "[variables('vNetName')]" + }, + "existingHiveMetastoreServerName": { + "type": "string", + "value": "[concat(variables('serverName'),'.database.windows.net')]" + }, + "existingHiveMetastoreDatabaseName": { + "type": "string", + "value": "[variables('dataBaseName')]" + }, + "existingHiveMetastoreUsername": { + "type": "string", + "value": "[parameters('databaseAdminUsername')]" + }, + "existingHiveMetastorePassword": { + "type": "string", + "value": "[parameters('databaseAdminPassword')]" + }, + "existingVirtualNetworkResourceGroup": { + "type": "string", + "value": "[resourceGroup().name]" + }, + "existingVirtualNetworkSubnetName": { + "type": "string", + "value": "[variables('SubnetName')]" } + } } diff --git a/101-hdinsight-linux-ssh-publickey/azuredeploy.json b/101-hdinsight-linux-ssh-publickey/azuredeploy.json index 152370dde8bc..9b6914d950f8 100644 --- a/101-hdinsight-linux-ssh-publickey/azuredeploy.json +++ b/101-hdinsight-linux-ssh-publickey/azuredeploy.json @@ -50,18 +50,24 @@ "metadata": { "description": "The number of nodes in the HDInsight cluster." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "storageAccountName": "[concat(uniquestring(resourceGroup().id),'storage')]", - "defaultApiVersion": "2015-05-01-preview", - "clusterApiVersion": "2015-03-01-preview" + "defaultApiVersion": "2015-05-01-preview" }, "resources": [ { "name": "[variables('storageAccountName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [], "tags": {}, @@ -72,7 +78,7 @@ { "name": "[parameters('clusterName')]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('storageAccountName'))]" @@ -152,4 +158,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } } -} \ No newline at end of file +} diff --git a/101-hdinsight-linux-with-edge-node/azuredeploy.json b/101-hdinsight-linux-with-edge-node/azuredeploy.json index 676e4a81a7a5..bcd24992ad85 100644 --- a/101-hdinsight-linux-with-edge-node/azuredeploy.json +++ b/101-hdinsight-linux-with-edge-node/azuredeploy.json @@ -35,32 +35,39 @@ } }, "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-hdinsight-linux-with-edge-node" + "type": "string", + "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." }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-hdinsight-linux-with-edge-node" + }, "_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": "" + "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." }, - "installScriptActionFolder":{ + "defaultValue": "" + }, + "installScriptActionFolder": { "type": "string", "metadata": { "description": "A script action you can run on the empty node to install or configure additiona software." }, "defaultValue": "scripts" }, - "installScriptAction":{ + "installScriptAction": { "type": "string", "metadata": { "description": "A script action you can run on the empty node to install or configure additiona software." }, "defaultValue": "EmptyNodeSetup.sh" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -73,22 +80,22 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('clusterStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { - "name": "[variables('storageAccountType')]" + "name": "[variables('storageAccountType')]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} }, { "name": "[parameters('clusterName')]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", - "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('clusterStorageAccountName'))]" ], - "tags": { - - }, + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/',variables('clusterStorageAccountName'))]" + ], + "tags": {}, "properties": { "clusterVersion": "3.6", "osType": "Linux", @@ -145,30 +152,38 @@ } }, { - "name": "[concat(parameters('clusterName'),'/', variables('applicationName'))]", - "type": "Microsoft.HDInsight/clusters/applications", - "apiVersion": "2015-03-01-preview", - "dependsOn": [ "[concat('Microsoft.HDInsight/clusters/',parameters('clusterName'))]" ], - "properties": { - "marketPlaceIdentifier": "EmptyNode", - "computeProfile": { - "roles": [{ - "name": "edgenode", - "targetInstanceCount": 1, - "hardwareProfile": { - "vmSize": "Standard_D3_v2" - } - }] - }, - "installScriptActions": [{ - "name": "[concat('emptynode','-' ,uniquestring(variables('applicationName')))]", - "uri": "[concat(parameters('_artifactsLocation'), '/', parameters('installScriptActionFolder'), '/', parameters('installScriptAction'), parameters('_artifactsLocationSasToken'))]", - "roles": ["edgenode"] - }], - "uninstallScriptActions": [], - "httpsEndpoints": [], - "applicationType": "CustomApplication" - } + "name": "[concat(parameters('clusterName'),'/', variables('applicationName'))]", + "type": "Microsoft.HDInsight/clusters/applications", + "apiVersion": "2015-03-01-preview", + "dependsOn": [ + "[concat('Microsoft.HDInsight/clusters/',parameters('clusterName'))]" + ], + "properties": { + "marketPlaceIdentifier": "EmptyNode", + "computeProfile": { + "roles": [ + { + "name": "edgenode", + "targetInstanceCount": 1, + "hardwareProfile": { + "vmSize": "Standard_D3_v2" + } + } + ] + }, + "installScriptActions": [ + { + "name": "[concat('emptynode','-' ,uniquestring(variables('applicationName')))]", + "uri": "[concat(parameters('_artifactsLocation'), '/', parameters('installScriptActionFolder'), '/', parameters('installScriptAction'), parameters('_artifactsLocationSasToken'))]", + "roles": [ + "edgenode" + ] + } + ], + "uninstallScriptActions": [], + "httpsEndpoints": [], + "applicationType": "CustomApplication" + } } ], "outputs": { diff --git a/101-hdinsight-linux-with-existing-default-storage-account/azuredeploy.json b/101-hdinsight-linux-with-existing-default-storage-account/azuredeploy.json index a5c526f1b91b..f83274ec1506 100644 --- a/101-hdinsight-linux-with-existing-default-storage-account/azuredeploy.json +++ b/101-hdinsight-linux-with-existing-default-storage-account/azuredeploy.json @@ -1,88 +1,95 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "clusterName": { - "type": "string", - "metadata": { - "description": "The name of the HDInsight cluster to create." - } - }, - "clusterType": { - "type": "string", + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "type": "string", + "metadata": { + "description": "The name of the HDInsight cluster to create." + } + }, + "clusterType": { + "type": "string", "defaultValue": "hadoop", - "allowedValues": [ + "allowedValues": [ "hadoop", - "intractivehive", - "hbase", - "storm", - "spark" - ], - "metadata": { - "description": "The type of the HDInsight cluster to create." - } - }, + "intractivehive", + "hbase", + "storm", + "spark" + ], + "metadata": { + "description": "The type of the HDInsight cluster to create." + } + }, "clusterVersion": { - "type": "string", - "defaultValue": "3.6", - "allowedValues": [ - "3.4", - "3.5", - "3.6" - ], - "metadata": { - "description": "The type of the HDInsight cluster to create." - } - }, - "clusterLoginUserName": { - "type": "string", - "metadata": { - "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." - } - }, - "clusterLoginPassword": { - "type": "securestring", - "metadata": { - "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - }, - "sshUserName": { - "type": "string", - "metadata": { - "description": "These credentials can be used to remotely access the cluster." - } - }, - "sshPassword": { - "type": "securestring", - "metadata": { - "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - }, + "type": "string", + "defaultValue": "3.6", + "allowedValues": [ + "3.4", + "3.5", + "3.6" + ], + "metadata": { + "description": "The type of the HDInsight cluster to create." + } + }, + "clusterLoginUserName": { + "type": "string", + "metadata": { + "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." + } + }, + "clusterLoginPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "sshUserName": { + "type": "string", + "metadata": { + "description": "These credentials can be used to remotely access the cluster." + } + }, + "sshPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, "defaultStorageAccountName": { - "type": "string", - "metadata": { - "description": "The short name of the default Azure storage account name. This account needs to be secure transfer enabled." - } + "type": "string", + "metadata": { + "description": "The short name of the default Azure storage account name. This account needs to be secure transfer enabled." + } }, "defaultStorageAccountKey": { - "type": "string", - "metadata": { - "description": "The key of the default storage account." - } + "type": "string", + "metadata": { + "description": "The key of the default storage account." + } }, "defaultContainerName": { - "type": "string", - "metadata": { - "description": "The name of the existing Azure blob storage container." - } + "type": "string", + "metadata": { + "description": "The name of the existing Azure blob storage container." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } - }, + }, "variables": {}, "resources": [ { "type": "Microsoft.HDInsight/clusters", "name": "[parameters('clusterName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [], "properties": { @@ -100,14 +107,14 @@ } }, "storageProfile": { - "storageaccounts": [ - { - "name": "[concat(parameters('defaultStorageAccountName'),'.blob.core.windows.net')]", - "isDefault": true, - "container": "[parameters('defaultContainerName')]", - "key": "[parameters('defaultStorageAccountKey')]" - } - ] + "storageaccounts": [ + { + "name": "[concat(parameters('defaultStorageAccountName'),'.blob.core.windows.net')]", + "isDefault": true, + "container": "[parameters('defaultContainerName')]", + "key": "[parameters('defaultStorageAccountKey')]" + } + ] }, "computeProfile": { "roles": [ @@ -142,10 +149,10 @@ } } ], - "outputs": { - "cluster": { - "type": "object", - "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" - } - } + "outputs": { + "cluster": { + "type": "object", + "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" + } + } } diff --git a/101-hdinsight-linux-with-existing-linked-storage-account/azuredeploy.json b/101-hdinsight-linux-with-existing-linked-storage-account/azuredeploy.json index e86de8d9eddb..9de8470337b5 100644 --- a/101-hdinsight-linux-with-existing-linked-storage-account/azuredeploy.json +++ b/101-hdinsight-linux-with-existing-linked-storage-account/azuredeploy.json @@ -1,98 +1,105 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "clusterName": { - "type": "string", - "metadata": { - "description": "The name of the HDInsight cluster to create." - } - }, - "clusterType": { - "type": "string", + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "type": "string", + "metadata": { + "description": "The name of the HDInsight cluster to create." + } + }, + "clusterType": { + "type": "string", "defaultValue": "hadoop", - "allowedValues": [ + "allowedValues": [ "hadoop", - "intractivehive", - "hbase", - "storm", - "spark" - ], - "metadata": { - "description": "The type of the HDInsight cluster to create." - } - }, + "intractivehive", + "hbase", + "storm", + "spark" + ], + "metadata": { + "description": "The type of the HDInsight cluster to create." + } + }, "clusterVersion": { - "type": "string", - "defaultValue": "3.6", - "allowedValues": [ - "3.4", - "3.5", - "3.6" - ], - "metadata": { - "description": "The type of the HDInsight cluster to create." - } - }, - "clusterLoginUserName": { - "type": "string", - "metadata": { - "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." - } - }, - "clusterLoginPassword": { - "type": "securestring", - "metadata": { - "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - }, - "sshUserName": { - "type": "string", - "metadata": { - "description": "These credentials can be used to remotely access the cluster." - } - }, - "sshPassword": { - "type": "securestring", - "metadata": { - "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - }, + "type": "string", + "defaultValue": "3.6", + "allowedValues": [ + "3.4", + "3.5", + "3.6" + ], + "metadata": { + "description": "The type of the HDInsight cluster to create." + } + }, + "clusterLoginUserName": { + "type": "string", + "metadata": { + "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." + } + }, + "clusterLoginPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "sshUserName": { + "type": "string", + "metadata": { + "description": "These credentials can be used to remotely access the cluster." + } + }, + "sshPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, "linkedStorageAccountName": { - "type": "string", - "metadata": { - "description": "The short name of the default Azure storage account name. This account needs to be secure transfer enabled." - } + "type": "string", + "metadata": { + "description": "The short name of the default Azure storage account name. This account needs to be secure transfer enabled." + } }, "linkedStorageAccountKey": { - "type": "string", - "metadata": { - "description": "The key of the default storage account." - } + "type": "string", + "metadata": { + "description": "The key of the default storage account." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } - }, + }, "variables": { - "defaultStorageAccount": { - "name": "[uniqueString(resourceGroup().id)]", - "type": "Standard_LRS" - } + "defaultStorageAccount": { + "name": "[uniqueString(resourceGroup().id)]", + "type": "Standard_LRS" + } }, "resources": [ { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('defaultStorageAccount').name]", - "location": "[resourceGroup().location]", - "apiVersion": "2016-01-01", - "sku": { - "name": "[variables('defaultStorageAccount').type]" - }, - "kind": "Storage", - "properties": {} + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('defaultStorageAccount').name]", + "location": "[parameters('location')]", + "apiVersion": "2016-01-01", + "sku": { + "name": "[variables('defaultStorageAccount').type]" + }, + "kind": "Storage", + "properties": {} }, { "type": "Microsoft.HDInsight/clusters", "name": "[parameters('clusterName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [], "properties": { @@ -110,20 +117,20 @@ } }, "storageProfile": { - "storageaccounts": [ - { - "name": "[replace(replace(concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob),'https:',''),'/','')]", - "isDefault": true, - "container": "[parameters('clusterName')]", - "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').keys[0].value]" - }, - { - "name": "[concat(parameters('linkedStorageAccountName'),'.blob.core.windows.net')]", - "isDefault": false, - "container": "blank", - "key": "[parameters('linkedStorageAccountKey')]" - } - ] + "storageaccounts": [ + { + "name": "[replace(replace(concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob),'https:',''),'/','')]", + "isDefault": true, + "container": "[parameters('clusterName')]", + "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').keys[0].value]" + }, + { + "name": "[concat(parameters('linkedStorageAccountName'),'.blob.core.windows.net')]", + "isDefault": false, + "container": "blank", + "key": "[parameters('linkedStorageAccountKey')]" + } + ] }, "computeProfile": { "roles": [ @@ -158,14 +165,14 @@ } } ], - "outputs": { + "outputs": { "storage": { - "type": "object", - "value": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name))]" + "type": "object", + "value": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name))]" }, - "cluster": { - "type": "object", - "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" - } - } + "cluster": { + "type": "object", + "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" + } + } } diff --git a/101-hdinsight-linux-with-sql-database/azuredeploy.json b/101-hdinsight-linux-with-sql-database/azuredeploy.json index e15dcd936d9b..ce74571e1a60 100644 --- a/101-hdinsight-linux-with-sql-database/azuredeploy.json +++ b/101-hdinsight-linux-with-sql-database/azuredeploy.json @@ -48,33 +48,40 @@ } }, "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://hditutorialdata.blob.core.windows.net/usesqoop/" + "type": "string", + "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." + }, + "defaultValue": "https://hditutorialdata.blob.core.windows.net/usesqoop/" }, "_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": "" + "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": "" }, - "bacpacFileName":{ - "type":"string", + "bacpacFileName": { + "type": "string", "defaultValue": "SqoopTutorial-2016-2-23-11-2.bacpac", "metadata": { "description": "The backpac for configure the database and tables for the Use Sqoop in HDInsight tutorial." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "defaultStorageAccount":{ + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id)]", "type": "Standard_LRS" }, - "sqlDatabase":{ + "sqlDatabase": { "serverName": "[concat(parameters('clusterName'),'dbserver')]", "databaseName": "[concat(parameters('clusterName'),'db')]" } @@ -83,23 +90,23 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('defaultStorageAccount').name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('defaultStorageAccount').type]" + "name": "[variables('defaultStorageAccount').type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} }, { "name": "[parameters('clusterName')]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", - "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]" ], - "tags": { - - }, + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]" + ], + "tags": {}, "properties": { "clusterVersion": "3.6", "osType": "Linux", @@ -158,10 +165,10 @@ { "type": "Microsoft.Sql/servers", "name": "[variables('sqlDatabase').serverName]", - "dependsOn": [ ], - "location": "[resourceGroup().location]", + "dependsOn": [], + "location": "[parameters('location')]", "tags": { - "displayName": "SqlServer" + "displayName": "SqlServer" }, "apiVersion": "2015-05-01-preview", "properties": { @@ -173,7 +180,7 @@ { "type": "databases", "name": "[variables('sqlDatabase').databaseName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "Database" }, @@ -209,7 +216,7 @@ { "type": "firewallrules", "name": "AllowAllAzureIps", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01", "dependsOn": [ "[concat('Microsoft.Sql/servers/', variables('sqlDatabase').serverName)]" @@ -230,7 +237,7 @@ "cluster": { "type": "object", "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" - }, + }, "sqlSvrFqdn": { "type": "string", "value": "[reference(concat('Microsoft.Sql/servers/', variables('sqlDatabase').serverName)).fullyQualifiedDomainName]" diff --git a/101-hdinsight-rserver/azuredeploy.json b/101-hdinsight-rserver/azuredeploy.json index 3faa9f3fda98..366ead36c8a3 100644 --- a/101-hdinsight-rserver/azuredeploy.json +++ b/101-hdinsight-rserver/azuredeploy.json @@ -1,62 +1,71 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "clusterName": { - "type": "string", - "metadata": { - "description": "The name of the HDInsight cluster to create." - } - }, - "clusterLoginUserName": { - "type": "string", - "metadata": { - "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." - } - }, - "clusterLoginPassword": { - "type": "securestring", - "metadata": { - "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - }, - "sshUserName": { - "type": "string", - "metadata": { - "description": "These credentials can be used to remotely access the cluster." - } - }, - "sshPassword": { - "type": "securestring", - "metadata": { - "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - } - }, + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "type": "string", + "metadata": { + "description": "The name of the HDInsight cluster to create." + } + }, + "clusterLoginUserName": { + "type": "string", + "metadata": { + "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." + } + }, + "clusterLoginPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "sshUserName": { + "type": "string", + "metadata": { + "description": "These credentials can be used to remotely access the cluster." + } + }, + "sshPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, "variables": { - "defaultStorageAccount":{ + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id)]", "type": "Standard_LRS" } }, - "resources": [ + "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('defaultStorageAccount').name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('defaultStorageAccount').type]" + "name": "[variables('defaultStorageAccount').type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} }, { "type": "Microsoft.HDInsight/clusters", "name": "[parameters('clusterName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", - "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]" ], + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]" + ], "properties": { "clusterVersion": "3.6", "osType": "Linux", @@ -69,7 +78,7 @@ "restAuthCredential.username": "[parameters('clusterLoginUserName')]", "restAuthCredential.password": "[parameters('clusterLoginPassword')]" }, - "rserver":{ + "rserver": { "rstudio": true } } @@ -117,13 +126,13 @@ "minInstanceCount": 1, "targetInstanceCount": 3, "hardwareProfile": { - "vmSize": "Medium" + "vmSize": "Medium" }, "osProfile": { - "linuxOperatingSystemProfile": { - "username": "[parameters('sshUserName')]", - "password": "[parameters('sshPassword')]" - } + "linuxOperatingSystemProfile": { + "username": "[parameters('sshUserName')]", + "password": "[parameters('sshPassword')]" + } }, "virtualNetworkProfile": null, "scriptActions": [] @@ -133,13 +142,13 @@ "minInstanceCount": 1, "targetInstanceCount": 1, "hardwareProfile": { - "vmSize": "Standard_D4_V2" + "vmSize": "Standard_D4_V2" }, "osProfile": { - "linuxOperatingSystemProfile": { - "username": "[parameters('sshUserName')]", - "password": "[parameters('sshPassword')]" - } + "linuxOperatingSystemProfile": { + "username": "[parameters('sshUserName')]", + "password": "[parameters('sshPassword')]" + } }, "virtualNetworkProfile": null, "scriptActions": [] @@ -149,14 +158,14 @@ } } ], - "outputs": { - "storage":{ + "outputs": { + "storage": { "type": "object", "value": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name))]" }, - "cluster": { - "type": "object", - "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" - } - } -} \ No newline at end of file + "cluster": { + "type": "object", + "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" + } + } +} diff --git a/101-hdinsight-secure-vnet/azuredeploy.json b/101-hdinsight-secure-vnet/azuredeploy.json index 4cea91762837..e90955c4dd50 100644 --- a/101-hdinsight-secure-vnet/azuredeploy.json +++ b/101-hdinsight-secure-vnet/azuredeploy.json @@ -1,225 +1,230 @@ { - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "clusterName":{ - "type":"string", - "metadata":{ - "description":"The name of the HDInsight cluster to create." - } - }, - "clusterLoginUserName":{ - "type":"string", - "defaultValue":"admin", - "metadata":{ - "description":"These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." - } - }, - "clusterLoginPassword":{ - "type":"securestring", - "metadata":{ - "description":"The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - }, - "sshUserName":{ - "type":"string", - "defaultValue":"sshuser", - "metadata":{ - "description":"These credentials can be used to remotely access the cluster." - } - }, - "sshPassword":{ - "type":"securestring", - "metadata":{ - "description":"The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "type": "string", + "metadata": { + "description": "The name of the HDInsight cluster to create." } - }, - "variables":{ - "vNet":{ - "name":"[concat(parameters('clusterName'),'-vnet')]", - "addressSpacePrefix":"10.0.0.0/16", - "subnetName":"subnet1", - "subnetPrefix":"10.0.0.0/24" - }, - "networkSecurityGroup":{ - "name":"[concat(parameters('clusterName'),'-nsg')]" - }, - "defaultStorageAccount":{ - "name":"[uniqueString(resourceGroup().id)]", - "type":"Standard_LRS" + }, + "clusterLoginUserName": { + "type": "string", + "defaultValue": "admin", + "metadata": { + "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." } - }, - "resources":[ - { - "type":"Microsoft.Network/networkSecurityGroups", - "name":"[variables('networkSecurityGroup').name]", - "location":"[resourceGroup().location]", - "apiVersion":"2016-03-30", - "properties":{ - "securityRules":[ - { - "name":"hdirule1", - "properties":{ - "description":null, - "protocol":"*", - "sourcePortRange":"*", - "destinationPortRange":"443", - "sourceAddressPrefix":"168.61.49.99", - "destinationAddressPrefix":"VirtualNetwork", - "access":"Allow", - "priority":300, - "direction":"Inbound" - } - }, - { - "name":"hdirule2", - "properties":{ - "description":null, - "protocol":"*", - "sourcePortRange":"*", - "destinationPortRange":"443", - "sourceAddressPrefix":"23.99.5.239", - "destinationAddressPrefix":"VirtualNetwork", - "access":"Allow", - "priority":301, - "direction":"Inbound" - } - }, - { - "name":"hdirule3", - "properties":{ - "description":null, - "protocol":"*", - "sourcePortRange":"*", - "destinationPortRange":"443", - "sourceAddressPrefix":"168.61.48.131", - "destinationAddressPrefix":"VirtualNetwork", - "access":"Allow", - "priority":302, - "direction":"Inbound" - } - }, - { - "name":"hdirule4", - "properties":{ - "description":null, - "protocol":"*", - "sourcePortRange":"*", - "destinationPortRange":"443", - "sourceAddressPrefix":"138.91.141.162", - "destinationAddressPrefix":"VirtualNetwork", - "access":"Allow", - "priority":303, - "direction":"Inbound" - } - } - ] - } - }, - { - "type":"Microsoft.Network/virtualNetworks", - "name":"[variables('vNet').name]", - "location":"[resourceGroup().location]", - "apiVersion":"2016-03-30", - "dependsOn":[ - "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroup').name)]" - ], - "properties":{ - "addressSpace":{ - "addressPrefixes":[ - "[variables('vnet').addressSpacePrefix]" - ] - }, - "subnets":[ - { - "name":"[variables('vnet').subnetName]", - "properties":{ - "addressPrefix":"[variables('vnet').subnetPrefix]", - "networkSecurityGroup":{ - "id":"[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroup').name)]" - } - } - } - ] - } - }, - { - "type":"Microsoft.Storage/storageAccounts", - "name":"[variables('defaultStorageAccount').name]", - "location":"[resourceGroup().location]", - "apiVersion":"2016-01-01", - "sku":{ - "name":"[variables('defaultStorageAccount').type]" - }, - "kind":"Storage", - "properties":{ - - } + }, + "clusterLoginPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "sshUserName": { + "type": "string", + "defaultValue": "sshuser", + "metadata": { + "description": "These credentials can be used to remotely access the cluster." + } + }, + "sshPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "vNet": { + "name": "[concat(parameters('clusterName'),'-vnet')]", + "addressSpacePrefix": "10.0.0.0/16", + "subnetName": "subnet1", + "subnetPrefix": "10.0.0.0/24" + }, + "networkSecurityGroup": { + "name": "[concat(parameters('clusterName'),'-nsg')]" + }, + "defaultStorageAccount": { + "name": "[uniqueString(resourceGroup().id)]", + "type": "Standard_LRS" + } + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('networkSecurityGroup').name]", + "location": "[parameters('location')]", + "apiVersion": "2016-03-30", + "properties": { + "securityRules": [ + { + "name": "hdirule1", + "properties": { + "description": null, + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "168.61.49.99", + "destinationAddressPrefix": "VirtualNetwork", + "access": "Allow", + "priority": 300, + "direction": "Inbound" + } + }, + { + "name": "hdirule2", + "properties": { + "description": null, + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "23.99.5.239", + "destinationAddressPrefix": "VirtualNetwork", + "access": "Allow", + "priority": 301, + "direction": "Inbound" + } + }, + { + "name": "hdirule3", + "properties": { + "description": null, + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "168.61.48.131", + "destinationAddressPrefix": "VirtualNetwork", + "access": "Allow", + "priority": 302, + "direction": "Inbound" + } + }, + { + "name": "hdirule4", + "properties": { + "description": null, + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "138.91.141.162", + "destinationAddressPrefix": "VirtualNetwork", + "access": "Allow", + "priority": 303, + "direction": "Inbound" + } + } + ] + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('vNet').name]", + "location": "[parameters('location')]", + "apiVersion": "2016-03-30", + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroup').name)]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vnet').addressSpacePrefix]" + ] + }, + "subnets": [ + { + "name": "[variables('vnet').subnetName]", + "properties": { + "addressPrefix": "[variables('vnet').subnetPrefix]", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroup').name)]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('defaultStorageAccount').name]", + "location": "[parameters('location')]", + "apiVersion": "2016-01-01", + "sku": { + "name": "[variables('defaultStorageAccount').type]" }, - { - "type":"Microsoft.HDInsight/clusters", - "name":"[parameters('clusterName')]", - "location":"[resourceGroup().location]", - "apiVersion":"2015-03-01-preview", - "dependsOn":[ - "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]", - "[concat('Microsoft.Network/virtualNetworks/',variables('vNet').name)]" - ], - "properties":{ - "clusterVersion":"3.6", - "osType":"Linux", - "clusterDefinition":{ - "kind":"hadoop", - "configurations":{ - "gateway":{ - "restAuthCredential.isEnabled":true, - "restAuthCredential.username":"[parameters('clusterLoginUserName')]", - "restAuthCredential.password":"[parameters('clusterLoginPassword')]" - } - } - }, - "storageProfile":{ - "storageaccounts":[ - { - "name":"[replace(replace(concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob),'https:',''),'/','')]", - "isDefault":true, - "container":"[parameters('clusterName')]", - "key":"[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').keys[0].value]" - } - ] + "kind": "Storage", + "properties": {} + }, + { + "type": "Microsoft.HDInsight/clusters", + "name": "[parameters('clusterName')]", + "location": "[parameters('location')]", + "apiVersion": "2015-03-01-preview", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]", + "[concat('Microsoft.Network/virtualNetworks/',variables('vNet').name)]" + ], + "properties": { + "clusterVersion": "3.6", + "osType": "Linux", + "clusterDefinition": { + "kind": "hadoop", + "configurations": { + "gateway": { + "restAuthCredential.isEnabled": true, + "restAuthCredential.username": "[parameters('clusterLoginUserName')]", + "restAuthCredential.password": "[parameters('clusterLoginPassword')]" + } + } + }, + "storageProfile": { + "storageaccounts": [ + { + "name": "[replace(replace(concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob),'https:',''),'/','')]", + "isDefault": true, + "container": "[parameters('clusterName')]", + "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').keys[0].value]" + } + ] + }, + "computeProfile": { + "roles": [ + { + "name": "headnode", + "targetInstanceCount": 2, + "hardwareProfile": { + "vmSize": "Standard_D3_v2" + }, + "osProfile": { + "linuxOperatingSystemProfile": { + "username": "[parameters('sshUserName')]", + "password": "[parameters('sshPassword')]" + } + } }, - "computeProfile":{ - "roles":[ - { - "name":"headnode", - "targetInstanceCount":2, - "hardwareProfile":{ - "vmSize":"Standard_D3_v2" - }, - "osProfile":{ - "linuxOperatingSystemProfile":{ - "username":"[parameters('sshUserName')]", - "password":"[parameters('sshPassword')]" - } - } - }, - { - "name":"workernode", - "targetInstanceCount":2, - "hardwareProfile":{ - "vmSize":"Standard_D3_v2" - }, - "osProfile":{ - "linuxOperatingSystemProfile":{ - "username":"[parameters('sshUserName')]", - "password":"[parameters('sshPassword')]" - } - } - } - ] + { + "name": "workernode", + "targetInstanceCount": 2, + "hardwareProfile": { + "vmSize": "Standard_D3_v2" + }, + "osProfile": { + "linuxOperatingSystemProfile": { + "username": "[parameters('sshUserName')]", + "password": "[parameters('sshPassword')]" + } + } } - } + ] + } } - ] + } + ] } diff --git a/101-hdinsight-spark-linux-vnet/azuredeploy.json b/101-hdinsight-spark-linux-vnet/azuredeploy.json index 52a23a65d9c8..b7f00678aefb 100644 --- a/101-hdinsight-spark-linux-vnet/azuredeploy.json +++ b/101-hdinsight-spark-linux-vnet/azuredeploy.json @@ -33,14 +33,21 @@ "metadata": { "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "defaultStorageAccount":{ + "defaultStorageAccount": { "name": "[uniqueString(resourceGroup().id)]", "type": "Standard_LRS" }, - "vNet":{ + "vNet": { "name": "[concat(parameters('clusterName'),'-vnet')]", "addressSpacePrefix": "10.0.0.0/16", "subnetName": "subnet1", @@ -54,7 +61,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vNet').name]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -74,88 +81,87 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('defaultStorageAccount').name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-01-01", "sku": { - "name": "[variables('defaultStorageAccount').type]" + "name": "[variables('defaultStorageAccount').type]" }, - "kind": "Storage", + "kind": "Storage", "properties": {} }, { - "type": "Microsoft.HDInsight/clusters", - "name": "[parameters('clusterName')]", - "location": "[resourceGroup().location]", - "apiVersion": "2015-03-01-preview", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]", - "[concat('Microsoft.Network/virtualNetworks/',variables('vNet').name)]" - - ], - "tags": {}, - "properties": { - "clusterVersion": "3.6", - "osType": "Linux", - "tier": "Standard", - "clusterDefinition": { - "kind": "spark", - "configurations": { - "gateway": { - "restAuthCredential.isEnabled": true, - "restAuthCredential.username": "[parameters('clusterLoginUserName')]", - "restAuthCredential.password": "[parameters('clusterLoginPassword')]" - } + "type": "Microsoft.HDInsight/clusters", + "name": "[parameters('clusterName')]", + "location": "[parameters('location')]", + "apiVersion": "2015-03-01-preview", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]", + "[concat('Microsoft.Network/virtualNetworks/',variables('vNet').name)]" + ], + "tags": {}, + "properties": { + "clusterVersion": "3.6", + "osType": "Linux", + "tier": "Standard", + "clusterDefinition": { + "kind": "spark", + "configurations": { + "gateway": { + "restAuthCredential.isEnabled": true, + "restAuthCredential.username": "[parameters('clusterLoginUserName')]", + "restAuthCredential.password": "[parameters('clusterLoginPassword')]" + } + } + }, + "storageProfile": { + "storageaccounts": [ + { + "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", + "isDefault": true, + "container": "[parameters('clusterName')]", + "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').keys[0].value]" + } + ] + }, + "computeProfile": { + "roles": [ + { + "name": "headnode", + "targetInstanceCount": "2", + "hardwareProfile": { + "vmSize": "Standard_D12_v2" + }, + "osProfile": { + "linuxOperatingSystemProfile": { + "username": "[parameters('sshUserName')]", + "password": "[parameters('sshPassword')]" } + }, + "virtualNetworkProfile": { + "id": "[variables('vNet').id]", + "subnet": "[variables('vNet').subnet]" + } }, - "storageProfile": { - "storageaccounts": [ - { - "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", - "isDefault": true, - "container": "[parameters('clusterName')]", - "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').keys[0].value]" - } - ] - }, - "computeProfile": { - "roles": [ - { - "name": "headnode", - "targetInstanceCount": "2", - "hardwareProfile": { - "vmSize": "Standard_D12_v2" - }, - "osProfile": { - "linuxOperatingSystemProfile": { - "username": "[parameters('sshUserName')]", - "password": "[parameters('sshPassword')]" - } - }, - "virtualNetworkProfile": { - "id": "[variables('vNet').id]", - "subnet": "[variables('vNet').subnet]" - } - }, - { - "name": "workernode", - "targetInstanceCount": "2", - "hardwareProfile": { - "vmSize": "Standard_D13_v2" - }, - "osProfile": { - "linuxOperatingSystemProfile": { - "username": "[parameters('sshUserName')]", - "password": "[parameters('sshPassword')]" - } - }, - "virtualNetworkProfile": { - "id": "[variables('vNet').id]", - "subnet": "[variables('vNet').subnet]" - } - } - ] + { + "name": "workernode", + "targetInstanceCount": "2", + "hardwareProfile": { + "vmSize": "Standard_D13_v2" + }, + "osProfile": { + "linuxOperatingSystemProfile": { + "username": "[parameters('sshUserName')]", + "password": "[parameters('sshPassword')]" + } + }, + "virtualNetworkProfile": { + "id": "[variables('vNet').id]", + "subnet": "[variables('vNet').subnet]" + } } + ] } + } } ], "outputs": { @@ -168,4 +174,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } } -} \ No newline at end of file +} diff --git a/101-hdinsight-spark-linux/azuredeploy.json b/101-hdinsight-spark-linux/azuredeploy.json index 6f20db3565b2..04ad3c07d08a 100644 --- a/101-hdinsight-spark-linux/azuredeploy.json +++ b/101-hdinsight-spark-linux/azuredeploy.json @@ -1,136 +1,143 @@ { - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "clusterName":{ - "type":"string", - "metadata":{ - "description":"The name of the HDInsight cluster to create." - } - }, - "clusterLoginUserName":{ - "type":"string", - "defaultValue":"admin", - "metadata":{ - "description":"These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." - } - }, - "clusterLoginPassword":{ - "type":"securestring", - "metadata":{ - "description":"The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "type": "string", + "metadata": { + "description": "The name of the HDInsight cluster to create." + } + }, + "clusterLoginUserName": { + "type": "string", + "defaultValue": "admin", + "metadata": { + "description": "These credentials can be used to submit jobs to the cluster and to log into cluster dashboards." + } + }, + "clusterLoginPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "sshUserName": { + "type": "string", + "defaultValue": "sshuser", + "metadata": { + "description": "These credentials can be used to remotely access the cluster." + } + }, + "sshPassword": { + "type": "securestring", + "metadata": { + "description": "The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "defaultStorageAccount": { + "name": "[uniqueString(resourceGroup().id)]", + "type": "Standard_LRS" + } + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('defaultStorageAccount').name]", + "location": "[parameters('location')]", + "apiVersion": "2016-01-01", + "sku": { + "name": "[variables('defaultStorageAccount').type]" + }, + "kind": "Storage", + "properties": {} + }, + { + "type": "Microsoft.HDInsight/clusters", + "name": "[parameters('clusterName')]", + "location": "[parameters('location')]", + "apiVersion": "2015-03-01-preview", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]" + ], + "tags": {}, + "properties": { + "clusterVersion": "3.6", + "osType": "Linux", + "tier": "Standard", + "clusterDefinition": { + "kind": "spark", + "configurations": { + "gateway": { + "restAuthCredential.isEnabled": true, + "restAuthCredential.username": "[parameters('clusterLoginUserName')]", + "restAuthCredential.password": "[parameters('clusterLoginPassword')]" } + } }, - "sshUserName":{ - "type":"string", - "defaultValue":"sshuser", - "metadata":{ - "description":"These credentials can be used to remotely access the cluster." + "storageProfile": { + "storageaccounts": [ + { + "name": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", + "isDefault": true, + "container": "[parameters('clusterName')]", + "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').keys[0].value]" } + ] }, - "sshPassword":{ - "type":"securestring", - "metadata":{ - "description":"The password must be at least 10 characters in length and must contain at least one digit, one non-alphanumeric character, and one upper or lower case letter." - } - } - }, - "variables":{ - "defaultStorageAccount":{ - "name":"[uniqueString(resourceGroup().id)]", - "type":"Standard_LRS" - } - }, - "resources":[ - { - "type":"Microsoft.Storage/storageAccounts", - "name":"[variables('defaultStorageAccount').name]", - "location":"[resourceGroup().location]", - "apiVersion":"2016-01-01", - "sku":{ - "name":"[variables('defaultStorageAccount').type]" + "computeProfile": { + "roles": [ + { + "name": "headnode", + "targetInstanceCount": "2", + "hardwareProfile": { + "vmSize": "Standard_D12_v2" + }, + "osProfile": { + "linuxOperatingSystemProfile": { + "username": "[parameters('sshUserName')]", + "password": "[parameters('sshPassword')]" + } + }, + "virtualNetworkProfile": null, + "scriptActions": [] }, - "kind":"Storage", - "properties":{} - }, - { - "type":"Microsoft.HDInsight/clusters", - "name":"[parameters('clusterName')]", - "location":"[resourceGroup().location]", - "apiVersion":"2015-03-01-preview", - "dependsOn":[ - "[concat('Microsoft.Storage/storageAccounts/',variables('defaultStorageAccount').name)]" - ], - "tags":{}, - "properties":{ - "clusterVersion":"3.6", - "osType":"Linux", - "tier":"Standard", - "clusterDefinition":{ - "kind":"spark", - "configurations":{ - "gateway":{ - "restAuthCredential.isEnabled":true, - "restAuthCredential.username":"[parameters('clusterLoginUserName')]", - "restAuthCredential.password":"[parameters('clusterLoginPassword')]" - } - } - }, - "storageProfile":{ - "storageaccounts":[ - { - "name":"[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').primaryEndpoints.blob,'https://',''),'/','')]", - "isDefault":true, - "container":"[parameters('clusterName')]", - "key":"[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name), '2016-01-01').keys[0].value]" - } - ] - }, - "computeProfile":{ - "roles":[ - { - "name": "headnode", - "targetInstanceCount": "2", - "hardwareProfile": { - "vmSize": "Standard_D12_v2" - }, - "osProfile":{ - "linuxOperatingSystemProfile":{ - "username":"[parameters('sshUserName')]", - "password":"[parameters('sshPassword')]" - } - }, - "virtualNetworkProfile": null, - "scriptActions": [] - }, - { - "name": "workernode", - "targetInstanceCount": "2", - "hardwareProfile": { - "vmSize": "Standard_D13_v2" - }, - "osProfile":{ - "linuxOperatingSystemProfile":{ - "username":"[parameters('sshUserName')]", - "password":"[parameters('sshPassword')]" - } - }, - "virtualNetworkProfile": null, - "scriptActions": [] - } - ] + { + "name": "workernode", + "targetInstanceCount": "2", + "hardwareProfile": { + "vmSize": "Standard_D13_v2" + }, + "osProfile": { + "linuxOperatingSystemProfile": { + "username": "[parameters('sshUserName')]", + "password": "[parameters('sshPassword')]" } + }, + "virtualNetworkProfile": null, + "scriptActions": [] } + ] } - ], - "outputs":{ - "storage":{ - "type": "object", - "value": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name))]" - }, - "cluster":{ - "type":"object", - "value":"[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" - } + } + } + ], + "outputs": { + "storage": { + "type": "object", + "value": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccount').name))]" + }, + "cluster": { + "type": "object", + "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } -} \ No newline at end of file + } +} diff --git a/101-integrationpatterns-messagerouter-logicapp/azuredeploy.json b/101-integrationpatterns-messagerouter-logicapp/azuredeploy.json index 2e5c12a8df0a..fc575df2988b 100644 --- a/101-integrationpatterns-messagerouter-logicapp/azuredeploy.json +++ b/101-integrationpatterns-messagerouter-logicapp/azuredeploy.json @@ -1,229 +1,236 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "logicAppName": { - "type": "string", - "defaultValue": "MessageRouter", - "metadata": { - "description": "The name for the logic app." - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "logicAppName": { + "type": "string", + "defaultValue": "MessageRouter", + "metadata": { + "description": "The name for the logic app." + } }, - "variables": {}, - "resources": [ - { - "type": "Microsoft.Logic/workflows", - "name": "[parameters('logicAppName')]", - "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", - "properties": { - "state": "Enabled", - "definition": { - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "triggers": { - "manual": { - "type": "Request", - "kind": "Http", - "inputs": { - "schema": { - "properties": { - "Address": { - "type": "string" - }, - "City": { - "type": "string" - }, - "Name": { - "type": "string" - } - }, - "type": "object" - } - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Logic/workflows", + "name": "[parameters('logicAppName')]", + "apiVersion": "2016-06-01", + "location": "[parameters('location')]", + "properties": { + "state": "Enabled", + "definition": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "triggers": { + "manual": { + "type": "Request", + "kind": "Http", + "inputs": { + "schema": { + "properties": { + "Address": { + "type": "string" }, - "actions": { - "Initialize_variable": { - "runAfter": {}, - "type": "InitializeVariable", - "inputs": { - "variables": [ - { - "name": "ResultURL", - "type": "String" - } - ] + "City": { + "type": "string" + }, + "Name": { + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "actions": { + "Initialize_variable": { + "runAfter": {}, + "type": "InitializeVariable", + "inputs": { + "variables": [ + { + "name": "ResultURL", + "type": "String" + } + ] + } + }, + "Response": { + "runAfter": { + "Switch": [ + "Succeeded" + ] + }, + "type": "Response", + "inputs": { + "body": { + "Response": "Message can be seen at @{variables('ResultURL')}" + }, + "statusCode": 200 + } + }, + "Switch": { + "runAfter": { + "Initialize_variable": [ + "Succeeded" + ] + }, + "cases": { + "Amsterdam": { + "case": "Amsterdam", + "actions": { + "Send_To_Amsterdam": { + "runAfter": {}, + "type": "Http", + "inputs": { + "body": { + "description": "Uploaded from Logic Apps", + "files": { + "Amsterdam.txt": { + "content": "Name: @{triggerBody()?['Name']}\nAddress: @{triggerBody()?['Address']}\nCity: @{triggerBody()?['City']}" } + }, + "public": true }, - "Response": { - "runAfter": { - "Switch": [ - "Succeeded" - ] - }, - "type": "Response", - "inputs": { - "body": { - "Response": "Message can be seen at @{variables('ResultURL')}" - }, - "statusCode": 200 + "method": "POST", + "uri": "https://api.github.com/gists" + } + }, + "Set_Amsterdam_Result": { + "runAfter": { + "Send_To_Amsterdam": [ + "Succeeded" + ] + }, + "type": "SetVariable", + "inputs": { + "name": "ResultURL", + "value": "@{body('Send_To_Amsterdam')?['html_url']}" + } + } + } + }, + "New_York": { + "case": "New York", + "actions": { + "Send_To_New_York": { + "runAfter": {}, + "type": "Http", + "inputs": { + "body": { + "description": "Uploaded from Logic Apps", + "files": { + "New York.txt": { + "content": "Name: @{triggerBody()?['Name']}\nAddress: @{triggerBody()?['Address']}\nCity: @{triggerBody()?['City']}" } + }, + "public": true }, - "Switch": { - "runAfter": { - "Initialize_variable": [ - "Succeeded" - ] - }, - "cases": { - "Amsterdam": { - "case": "Amsterdam", - "actions": { - "Send_To_Amsterdam": { - "runAfter": {}, - "type": "Http", - "inputs": { - "body": { - "description": "Uploaded from Logic Apps", - "files": { - "Amsterdam.txt": { - "content": "Name: @{triggerBody()?['Name']}\nAddress: @{triggerBody()?['Address']}\nCity: @{triggerBody()?['City']}" - } - }, - "public": true - }, - "method": "POST", - "uri": "https://api.github.com/gists" - } - }, - "Set_Amsterdam_Result": { - "runAfter": { - "Send_To_Amsterdam": [ - "Succeeded" - ] - }, - "type": "SetVariable", - "inputs": { - "name": "ResultURL", - "value": "@{body('Send_To_Amsterdam')?['html_url']}" - } - } - } - }, - "New_York": { - "case": "New York", - "actions": { - "Send_To_New_York": { - "runAfter": {}, - "type": "Http", - "inputs": { - "body": { - "description": "Uploaded from Logic Apps", - "files": { - "New York.txt": { - "content": "Name: @{triggerBody()?['Name']}\nAddress: @{triggerBody()?['Address']}\nCity: @{triggerBody()?['City']}" - } - }, - "public": true - }, - "method": "POST", - "uri": "https://api.github.com/gists" - } - }, - "Set_New_York_Result": { - "runAfter": { - "Send_To_New_York": [ - "Succeeded" - ] - }, - "type": "SetVariable", - "inputs": { - "name": "ResultURL", - "value": "@{body('Send_To_New_York')?['html_url']}" - } - } - } - }, - "Paris": { - "case": "Paris", - "actions": { - "Send_To_Paris": { - "runAfter": {}, - "type": "Http", - "inputs": { - "body": { - "description": "Uploaded from Logic Apps", - "files": { - "Paris.txt": { - "content": "Name: @{triggerBody()?['Name']}\nAddress: @{triggerBody()?['Address']}\nCity: @{triggerBody()?['City']}" - } - }, - "public": true - }, - "method": "POST", - "uri": "https://api.github.com/gists" - } - }, - "Set_Paris_Result": { - "runAfter": { - "Send_To_Paris": [ - "Succeeded" - ] - }, - "type": "SetVariable", - "inputs": { - "name": "ResultURL", - "value": "@{body('Send_To_Paris')?['html_url']}" - } - } - } - } - }, - "default": { - "actions": { - "Send_To_Other_Cities": { - "runAfter": {}, - "type": "Http", - "inputs": { - "body": { - "description": "Uploaded from Logic Apps", - "files": { - "Other Cities.txt": { - "content": "Name: @{triggerBody()?['Name']}\nAddress: @{triggerBody()?['Address']}\nCity: @{triggerBody()?['City']}" - } - }, - "public": true - }, - "method": "POST", - "uri": "https://api.github.com/gists" - } - }, - "Set_Other_Cities_Result": { - "runAfter": { - "Send_To_Other_Cities": [ - "Succeeded" - ] - }, - "type": "SetVariable", - "inputs": { - "name": "ResultURL", - "value": "@{body('Send_To_Other_Cities')?['html_url']}" - } - } - } - }, - "expression": "@triggerBody()?['City']", - "type": "Switch" - } + "method": "POST", + "uri": "https://api.github.com/gists" + } }, - "outputs": {} + "Set_New_York_Result": { + "runAfter": { + "Send_To_New_York": [ + "Succeeded" + ] + }, + "type": "SetVariable", + "inputs": { + "name": "ResultURL", + "value": "@{body('Send_To_New_York')?['html_url']}" + } + } + } }, - "parameters": {} - }, - "dependsOn": [] - } - ] + "Paris": { + "case": "Paris", + "actions": { + "Send_To_Paris": { + "runAfter": {}, + "type": "Http", + "inputs": { + "body": { + "description": "Uploaded from Logic Apps", + "files": { + "Paris.txt": { + "content": "Name: @{triggerBody()?['Name']}\nAddress: @{triggerBody()?['Address']}\nCity: @{triggerBody()?['City']}" + } + }, + "public": true + }, + "method": "POST", + "uri": "https://api.github.com/gists" + } + }, + "Set_Paris_Result": { + "runAfter": { + "Send_To_Paris": [ + "Succeeded" + ] + }, + "type": "SetVariable", + "inputs": { + "name": "ResultURL", + "value": "@{body('Send_To_Paris')?['html_url']}" + } + } + } + } + }, + "default": { + "actions": { + "Send_To_Other_Cities": { + "runAfter": {}, + "type": "Http", + "inputs": { + "body": { + "description": "Uploaded from Logic Apps", + "files": { + "Other Cities.txt": { + "content": "Name: @{triggerBody()?['Name']}\nAddress: @{triggerBody()?['Address']}\nCity: @{triggerBody()?['City']}" + } + }, + "public": true + }, + "method": "POST", + "uri": "https://api.github.com/gists" + } + }, + "Set_Other_Cities_Result": { + "runAfter": { + "Send_To_Other_Cities": [ + "Succeeded" + ] + }, + "type": "SetVariable", + "inputs": { + "name": "ResultURL", + "value": "@{body('Send_To_Other_Cities')?['html_url']}" + } + } + } + }, + "expression": "@triggerBody()?['City']", + "type": "Switch" + } + }, + "outputs": {} + }, + "parameters": {} + }, + "dependsOn": [] + } + ] } diff --git a/101-integrationpatterns-messagerouter-servicebus/azuredeploy.json b/101-integrationpatterns-messagerouter-servicebus/azuredeploy.json index 7d6c8c433426..63c94cb48c30 100644 --- a/101-integrationpatterns-messagerouter-servicebus/azuredeploy.json +++ b/101-integrationpatterns-messagerouter-servicebus/azuredeploy.json @@ -1,197 +1,204 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "IncomingDeliveryRequestsTopicname": { - "type": "string", - "defaultValue": "incomingdeliveryrequests", - "metadata": { - "description": "The name for the Service Bus Topic." - } - }, - "MessageRouterServiceBusnamespacePrefix": { - "type": "string", - "defaultValue": "MessageRouterServiceBus", - "metadata": { - "description": "The prefix of the name for the Service Bus namespace, will be appended with a unique string." - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "IncomingDeliveryRequestsTopicname": { + "type": "string", + "defaultValue": "incomingdeliveryrequests", + "metadata": { + "description": "The name for the Service Bus Topic." + } + }, + "MessageRouterServiceBusnamespacePrefix": { + "type": "string", + "defaultValue": "MessageRouterServiceBus", + "metadata": { + "description": "The prefix of the name for the Service Bus namespace, will be appended with a unique string." + } }, - "variables": { - "serviceBusnamespacename": "[concat(parameters('MessageRouterServiceBusnamespacePrefix'), '-', uniquestring(resourceGroup().id))]" + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "serviceBusnamespacename": "[concat(parameters('MessageRouterServiceBusnamespacePrefix'), '-', uniquestring(resourceGroup().id))]" + }, + "resources": [ + { + "type": "Microsoft.ServiceBus/namespaces", + "apiVersion": "2015-08-01", + "name": "[variables('serviceBusnamespacename')]", + "location": "[parameters('location')]", + "dependsOn": [], + "kind": "Messaging", + "sku": { + "name": "Standard", + "capacity": 1, + "tier": "Standard" + } }, - "resources": [ + { + "type": "Microsoft.ServiceBus/namespaces/topics", + "apiVersion": "2015-08-01", + "name": "[concat(variables('serviceBusnamespacename'), '/', parameters('IncomingDeliveryRequestsTopicname'))]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusnamespacename'))]" + ], + "properties": { + "defaultMessageTimeToLive": "14.00:00:00", + "enableBatchedOperations": false, + "enableExpress": false, + "enablePartitioning": true, + "enableSubscriptionPartitioning": false, + "filteringMessagesBeforePublishing": false, + "isAnonymousAccessible": false, + "isExpress": false, + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "sizeInBytes": 0, + "supportOrdering": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", + "apiVersion": "2015-08-01", + "name": "[concat(variables('serviceBusnamespacename'), '/', parameters('IncomingDeliveryRequestsTopicname'), '/HighPriority')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusnamespacename'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'))]" + ], + "properties": { + "deadLetteringOnFilterEvaluationExceptions": false, + "deadLetteringOnMessageExpiration": true, + "defaultMessageTimeToLive": "14.00:00:00", + "enableBatchedOperations": false, + "lockDuration": "00:00:30", + "maxDeliveryCount": 10, + "requiresSession": false + }, + "resources": [ { - "type": "Microsoft.ServiceBus/namespaces", - "apiVersion": "2015-08-01", - "name": "[variables('serviceBusnamespacename')]", - "location": "[resourceGroup().location]", - "dependsOn": [], - "kind": "Messaging", - "sku": { - "name": "Standard", - "capacity": 1, - "tier": "Standard" + "type": "Rules", + "apiVersion": "2015-08-01", + "name": "HighPriority", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'), 'HighPriority')]" + ], + "properties": { + "filter": { + "sqlExpression": "Priority='High'" } - }, + } + } + ] + }, + { + "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", + "apiVersion": "2015-08-01", + "name": "[concat(variables('serviceBusnamespacename'), '/', parameters('IncomingDeliveryRequestsTopicname'), '/Log')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusnamespacename'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'))]" + ], + "properties": { + "deadLetteringOnFilterEvaluationExceptions": false, + "deadLetteringOnMessageExpiration": true, + "defaultMessageTimeToLive": "14.00:00:00", + "enableBatchedOperations": false, + "lockDuration": "00:00:30", + "maxDeliveryCount": 10, + "requiresSession": false + }, + "resources": [ { - "type": "Microsoft.ServiceBus/namespaces/topics", - "apiVersion": "2015-08-01", - "name": "[concat(variables('serviceBusnamespacename'), '/', parameters('IncomingDeliveryRequestsTopicname'))]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusnamespacename'))]" - ], - "properties": { - "defaultMessageTimeToLive": "14.00:00:00", - "enableBatchedOperations": false, - "enableExpress": false, - "enablePartitioning": true, - "enableSubscriptionPartitioning": false, - "filteringMessagesBeforePublishing": false, - "isAnonymousAccessible": false, - "isExpress": false, - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "sizeInBytes": 0, - "supportOrdering": false + "type": "Rules", + "apiVersion": "2015-08-01", + "name": "LogAll", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'), 'Log')]" + ], + "properties": { + "filter": { + "sqlExpression": "1=1" } - }, - { - "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", - "apiVersion": "2015-08-01", - "name": "[concat(variables('serviceBusnamespacename'), '/', parameters('IncomingDeliveryRequestsTopicname'), '/HighPriority')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusnamespacename'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'))]" - ], - "properties": { - "deadLetteringOnFilterEvaluationExceptions": false, - "deadLetteringOnMessageExpiration": true, - "defaultMessageTimeToLive": "14.00:00:00", - "enableBatchedOperations": false, - "lockDuration": "00:00:30", - "maxDeliveryCount": 10, - "requiresSession": false - }, - "resources": [ - { - "type": "Rules", - "apiVersion": "2015-08-01", - "name": "HighPriority", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'), 'HighPriority')]" - ], - "properties": { - "filter": { - "sqlExpression": "Priority='High'" - } - } - } - ] - }, - { - "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", - "apiVersion": "2015-08-01", - "name": "[concat(variables('serviceBusnamespacename'), '/', parameters('IncomingDeliveryRequestsTopicname'), '/Log')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusnamespacename'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'))]" - ], - "properties": { - "deadLetteringOnFilterEvaluationExceptions": false, - "deadLetteringOnMessageExpiration": true, - "defaultMessageTimeToLive": "14.00:00:00", - "enableBatchedOperations": false, - "lockDuration": "00:00:30", - "maxDeliveryCount": 10, - "requiresSession": false - }, - "resources": [ - { - "type": "Rules", - "apiVersion": "2015-08-01", - "name": "LogAll", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'), 'Log')]" - ], - "properties": { - "filter": { - "sqlExpression": "1=1" - } - } - } - ] - }, + } + } + ] + }, + { + "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", + "apiVersion": "2015-08-01", + "name": "[concat(variables('serviceBusnamespacename'), '/', parameters('IncomingDeliveryRequestsTopicname'), '/LowPriority')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusnamespacename'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'))]" + ], + "properties": { + "deadLetteringOnFilterEvaluationExceptions": false, + "deadLetteringOnMessageExpiration": true, + "defaultMessageTimeToLive": "14.00:00:00", + "enableBatchedOperations": false, + "lockDuration": "00:00:30", + "maxDeliveryCount": 10, + "requiresSession": false + }, + "resources": [ { - "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", - "apiVersion": "2015-08-01", - "name": "[concat(variables('serviceBusnamespacename'), '/', parameters('IncomingDeliveryRequestsTopicname'), '/LowPriority')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusnamespacename'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'))]" - ], - "properties": { - "deadLetteringOnFilterEvaluationExceptions": false, - "deadLetteringOnMessageExpiration": true, - "defaultMessageTimeToLive": "14.00:00:00", - "enableBatchedOperations": false, - "lockDuration": "00:00:30", - "maxDeliveryCount": 10, - "requiresSession": false - }, - "resources": [ - { - "type": "Rules", - "apiVersion": "2015-08-01", - "name": "LowPriority", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'), 'LowPriority')]" - ], - "properties": { - "filter": { - "sqlExpression": "Priority='Low'" - } - } - } - ] - }, + "type": "Rules", + "apiVersion": "2015-08-01", + "name": "LowPriority", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'), 'LowPriority')]" + ], + "properties": { + "filter": { + "sqlExpression": "Priority='Low'" + } + } + } + ] + }, + { + "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", + "apiVersion": "2015-08-01", + "name": "[concat(variables('serviceBusnamespacename'), '/', parameters('IncomingDeliveryRequestsTopicname'), '/NormalPriority')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusnamespacename'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'))]" + ], + "properties": { + "deadLetteringOnFilterEvaluationExceptions": false, + "deadLetteringOnMessageExpiration": true, + "defaultMessageTimeToLive": "14.00:00:00", + "enableBatchedOperations": false, + "lockDuration": "00:00:30", + "maxDeliveryCount": 10, + "requiresSession": false + }, + "resources": [ { - "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", - "apiVersion": "2015-08-01", - "name": "[concat(variables('serviceBusnamespacename'), '/', parameters('IncomingDeliveryRequestsTopicname'), '/NormalPriority')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusnamespacename'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'))]" - ], - "properties": { - "deadLetteringOnFilterEvaluationExceptions": false, - "deadLetteringOnMessageExpiration": true, - "defaultMessageTimeToLive": "14.00:00:00", - "enableBatchedOperations": false, - "lockDuration": "00:00:30", - "maxDeliveryCount": 10, - "requiresSession": false - }, - "resources": [ - { - "type": "Rules", - "apiVersion": "2015-08-01", - "name": "NormalPriority", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'), 'NormalPriority')]" - ], - "properties": { - "filter": { - "sqlExpression": "Priority='Normal'" - } - } - } - ] + "type": "Rules", + "apiVersion": "2015-08-01", + "name": "NormalPriority", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', variables('serviceBusnamespacename'), parameters('IncomingDeliveryRequestsTopicname'), 'NormalPriority')]" + ], + "properties": { + "filter": { + "sqlExpression": "Priority='Normal'" + } + } } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/101-internal-loadbalancer-create/azuredeploy.json b/101-internal-loadbalancer-create/azuredeploy.json index f729838c3c53..cd2cf86efec0 100644 --- a/101-internal-loadbalancer-create/azuredeploy.json +++ b/101-internal-loadbalancer-create/azuredeploy.json @@ -15,6 +15,13 @@ "metadata": { "description": "Subnet prefix" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -23,19 +30,14 @@ "loadBalancerName": "loadBalancer1", "nicName": "networkInterface1", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/', variables('subnetName'))]", - "lbID": "[resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName'))]", - "nicId": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]", - "frontEndIPConfigID": "[concat(variables('lbID'), '/frontendIPConfigurations/loadBalancerFrontEnd')]", - "backEndIPConfigID": "[concat(variables('nicId'), '/ipConfigurations/ipconfig1')]", - "apiVersion": "2015-06-15" + "subnetRef": "[concat(variables('vnetID'),'/subnets/', variables('subnetName'))]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -56,7 +58,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'))]" ], @@ -83,7 +85,7 @@ "apiVersion": "2015-06-15", "name": "[variables('loadBalancerName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" ], @@ -137,4 +139,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-iothub-with-consumergroup-create/azuredeploy.json b/101-iothub-with-consumergroup-create/azuredeploy.json index 2b8f22fd56da..d1c6eca2f2cc 100644 --- a/101-iothub-with-consumergroup-create/azuredeploy.json +++ b/101-iothub-with-consumergroup-create/azuredeploy.json @@ -92,11 +92,18 @@ "metadata": { "description": "Name of device-to-cloud consumer group to provision on the IoT Hub instance." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "apiVersion": "2016-02-03", - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, "resources": [ { @@ -119,7 +126,7 @@ "lockDurationAsIso8601": "[parameters('c2dFeedbackMessagesLockDurationAsIso8601')]" } }, - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, "sku": { "name": "[parameters('skuName')]", @@ -142,4 +149,4 @@ "type": "object" } } -} \ No newline at end of file +} diff --git a/101-jenkins-with-ssh-public-key/azuredeploy.json b/101-jenkins-with-ssh-public-key/azuredeploy.json index b41749efcedf..ec21f323cd0d 100644 --- a/101-jenkins-with-ssh-public-key/azuredeploy.json +++ b/101-jenkins-with-ssh-public-key/azuredeploy.json @@ -31,11 +31,17 @@ "metadata": { "description": "The Jenkins release type" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "resourcePrefix": "jenkins", - "OSDiskName": "[concat(variables('resourcePrefix'), 'OSDisk')]", "nicName": "[concat(variables('resourcePrefix'), 'VMNic')]", "subnetName": "[concat(variables('resourcePrefix'), 'Subnet')]", "publicIPAddressName": "[concat(variables('resourcePrefix'), 'PublicIP')]", @@ -55,7 +61,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -67,7 +73,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NSG - Front End" }, @@ -108,7 +114,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -135,7 +141,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" @@ -162,7 +168,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" ], @@ -196,7 +202,7 @@ "name": "osdisk", "caching": "ReadWrite", "createOption": "FromImage", - "managedDisk":{ + "managedDisk": { "storageAccountType": "Standard_LRS" } } @@ -214,7 +220,7 @@ "type": "extensions", "name": "[variables('vmExtensionName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" ], diff --git a/101-jenkins/azuredeploy.json b/101-jenkins/azuredeploy.json index c69722b941a3..2d3455aca179 100644 --- a/101-jenkins/azuredeploy.json +++ b/101-jenkins/azuredeploy.json @@ -31,11 +31,17 @@ "metadata": { "description": "The Jenkins release type" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "resourcePrefix": "jenkins", - "OSDiskName": "[concat(variables('resourcePrefix'), 'OSDisk')]", "nicName": "[concat(variables('resourcePrefix'), 'VMNic')]", "subnetName": "[concat(variables('resourcePrefix'), 'Subnet')]", "publicIPAddressName": "[concat(variables('resourcePrefix'), 'PublicIP')]", @@ -55,7 +61,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -67,7 +73,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NSG - Front End" }, @@ -108,7 +114,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -135,7 +141,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" @@ -162,7 +168,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" ], @@ -186,7 +192,7 @@ "name": "osdisk", "caching": "ReadWrite", "createOption": "FromImage", - "managedDisk":{ + "managedDisk": { "storageAccountType": "Standard_LRS" } } @@ -204,7 +210,7 @@ "type": "extensions", "name": "[variables('vmExtensionName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" ], diff --git a/101-key-vault-create/azuredeploy.json b/101-key-vault-create/azuredeploy.json index 08c3fb7184ae..0020176192a7 100644 --- a/101-key-vault-create/azuredeploy.json +++ b/101-key-vault-create/azuredeploy.json @@ -23,14 +23,18 @@ }, "keysPermissions": { "type": "array", - "defaultValue": ["list"], + "defaultValue": [ + "list" + ], "metadata": { "description": "Permissions to keys in the vault. Valid values are: all, create, import, update, get, list, delete, backup, restore, encrypt, decrypt, wrapkey, unwrapkey, sign, and verify." } }, "secretsPermissions": { "type": "array", - "defaultValue": ["list"], + "defaultValue": [ + "list" + ], "metadata": { "description": "Permissions to secrets in the vault. Valid values are: all, get, set, list, and delete." } @@ -78,6 +82,13 @@ "metadata": { "description": "Specifies whether Azure Resource Manager is permitted to retrieve secrets from the key vault." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -85,7 +96,7 @@ "type": "Microsoft.KeyVault/vaults", "name": "[parameters('keyVaultName')]", "apiVersion": "2016-10-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "enabledForDeployment": "[parameters('enableVaultForDeployment')]", "enabledForDiskEncryption": "[parameters('enableVaultForDiskEncryption')]", @@ -108,4 +119,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-loadbalancer-with-multivip/azuredeploy.json b/101-loadbalancer-with-multivip/azuredeploy.json index b80b930fffba..ab02b2423829 100644 --- a/101-loadbalancer-with-multivip/azuredeploy.json +++ b/101-loadbalancer-with-multivip/azuredeploy.json @@ -32,6 +32,13 @@ "metadata": { "description": "Public IP type" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -48,18 +55,15 @@ "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName'))]", "lbBackendPoolID": "[concat(variables('lbID'),'/backendAddressPools/loadBalancerBackend')]", "lbProbeID": "[concat(variables('lbID'),'/probes/tcpProbe')]", - "nicId": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]", "frontEndIPConfigID1": "[concat(variables('lbID'),'/frontendIPConfigurations/loadBalancerFrontEnd1')]", - "frontEndIPConfigID2": "[concat(variables('lbID'),'/frontendIPConfigurations/loadBalancerFrontEnd2')]", - "backEndIPConfigID": "[concat(variables('nicId'),'/ipConfigurations/ipconfig1')]", - "apiVersion": "2015-06-15" + "frontEndIPConfigID2": "[concat(variables('lbID'),'/frontendIPConfigurations/loadBalancerFrontEnd2')]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName1')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]", "dnsSettings": { @@ -71,7 +75,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName2')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } @@ -80,7 +84,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -101,7 +105,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'))]" @@ -129,7 +133,7 @@ "apiVersion": "2015-06-15", "name": "[variables('loadBalancerName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName1'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName2'))]" @@ -208,4 +212,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-loadbalancer-with-nat-rule/azuredeploy.json b/101-loadbalancer-with-nat-rule/azuredeploy.json index 93fb6bf5d19d..df9c5249f17b 100644 --- a/101-loadbalancer-with-nat-rule/azuredeploy.json +++ b/101-loadbalancer-with-nat-rule/azuredeploy.json @@ -32,6 +32,13 @@ "metadata": { "description": "Public IP type" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -44,17 +51,14 @@ "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", "publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]", "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName'))]", - "nicId": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]", - "frontEndIPConfigID": "[concat(variables('lbID'),'/frontendIPConfigurations/loadBalancerFrontEnd')]", - "backEndIPConfigID": "[concat(variables('nicId'),'/ipConfigurations/ipconfig1')]", - "apiVersion": "2015-06-15" + "frontEndIPConfigID": "[concat(variables('lbID'),'/frontendIPConfigurations/loadBalancerFrontEnd')]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]", "dnsSettings": { @@ -66,7 +70,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -87,7 +91,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'))]" @@ -120,7 +124,7 @@ "apiVersion": "2015-06-15", "name": "[variables('loadBalancerName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" ], @@ -157,4 +161,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-logic-app-and-function-app/azuredeploy.json b/101-logic-app-and-function-app/azuredeploy.json index 36f0aacbc6c4..5263fc224a82 100644 --- a/101-logic-app-and-function-app/azuredeploy.json +++ b/101-logic-app-and-function-app/azuredeploy.json @@ -15,6 +15,13 @@ "metadata": { "description": "The name of the function app to create. Must be globally unique." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -23,8 +30,8 @@ "functionName": "Echo", "hostingPlanName": "[parameters('functionAppName')]", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'azfunctions')]", - "storageACcountid": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", - "LogicAppLocation": "[resourceGroup().location]", + "storageACcountid": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "LogicAppLocation": "[parameters('location')]", "storageAccountType": "Standard_LRS" }, "resources": [ @@ -86,7 +93,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -95,7 +102,7 @@ "type": "Microsoft.Web/serverfarms", "apiVersion": "2015-04-01", "name": "[variables('hostingPlanName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "name": "[variables('hostingPlanName')]", "computeMode": "Dynamic", @@ -106,7 +113,7 @@ "apiVersion": "2015-08-01", "type": "Microsoft.Web/sites", "name": "[parameters('functionAppName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "kind": "functionapp", "dependsOn": [ "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", @@ -166,4 +173,4 @@ "value": "[listCallbackURL(resourceId('Microsoft.Logic/workflows/triggers', parameters('logicAppName'), 'Request'), '2016-06-01').value]" } } -} \ No newline at end of file +} diff --git a/101-logic-app-create/azuredeploy.json b/101-logic-app-create/azuredeploy.json index c5ccd29f04a3..e269088c1ea8 100644 --- a/101-logic-app-create/azuredeploy.json +++ b/101-logic-app-create/azuredeploy.json @@ -14,6 +14,13 @@ "metadata": { "description": "A test URI" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -22,7 +29,7 @@ "type": "Microsoft.Logic/workflows", "apiVersion": "2016-06-01", "name": "[parameters('logicAppName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "LogicApp" }, diff --git a/101-logic-app-ftp-to-blob/azuredeploy.json b/101-logic-app-ftp-to-blob/azuredeploy.json index 63f82d2d87da..6dc082b4fba1 100644 --- a/101-logic-app-ftp-to-blob/azuredeploy.json +++ b/101-logic-app-ftp-to-blob/azuredeploy.json @@ -51,7 +51,6 @@ "description": "The port for the FTP server." } }, - "ftpConnectionName": { "type": "string", "metadata": { @@ -71,6 +70,13 @@ "metadata": { "description": "The container/path of the folder you want to add files to." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -82,11 +88,11 @@ { "type": "Microsoft.Web/connections", "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[parameters('ftpConnectionName')]", "properties": { "api": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/ftp')]" + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/ftp')]" }, "displayName": "ftp", "parameterValues": { @@ -103,11 +109,11 @@ { "type": "Microsoft.Web/connections", "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[parameters('azureBlobConnectionName')]", "properties": { "api": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/azureblob')]" + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/azureblob')]" }, "displayName": "azureblob", "parameterValues": { @@ -120,7 +126,7 @@ "type": "Microsoft.Logic/workflows", "apiVersion": "2016-06-01", "name": "[parameters('logicAppName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Web/connections', parameters('azureBlobConnectionName'))]", "[resourceId('Microsoft.Web/connections', parameters('ftpConnectionName'))]" @@ -186,11 +192,11 @@ "$connections": { "value": { "azureblob": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/azureblob')]", + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/azureblob')]", "connectionId": "[resourceId('Microsoft.Web/connections', parameters('azureBlobConnectionName'))]" }, "ftp": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/ftp')]", + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/ftp')]", "connectionId": "[resourceId('Microsoft.Web/connections', parameters('ftpConnectionName'))]" } } diff --git a/101-logic-app-sendgrid/azuredeploy.json b/101-logic-app-sendgrid/azuredeploy.json index b7eb1c262ac6..ecafbc44ebac 100644 --- a/101-logic-app-sendgrid/azuredeploy.json +++ b/101-logic-app-sendgrid/azuredeploy.json @@ -19,6 +19,13 @@ "metadata": { "description": "The name for the SendGrid connection." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -26,11 +33,11 @@ { "type": "Microsoft.Web/connections", "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[parameters('sendgridName')]", "properties": { "api": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/sendgrid')]" + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/sendgrid')]" }, "displayName": "sendgrid", "parameterValues": { @@ -42,7 +49,7 @@ "type": "Microsoft.Logic/workflows", "apiVersion": "2016-06-01", "name": "[parameters('logicAppName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Web/connections', parameters('sendgridName'))]" ], @@ -116,7 +123,7 @@ "$connections": { "value": { "sendgrid": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/sendgrid')]", + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/sendgrid')]", "connectionId": "[resourceId('Microsoft.Web/connections', parameters('sendgridName'))]" } } @@ -126,10 +133,9 @@ } ], "outputs": { - "triggerURI": { - "type": "string", - "value": "[listCallbackURL(concat(resourceId('Microsoft.Logic/workflows/', parameters('logicAppName')), '/triggers/manual'), '2016-06-01').value]" - } - + "triggerURI": { + "type": "string", + "value": "[listCallbackURL(concat(resourceId('Microsoft.Logic/workflows/', parameters('logicAppName')), '/triggers/manual'), '2016-06-01').value]" + } } } diff --git a/101-logic-app-sql-proc/azuredeploy.json b/101-logic-app-sql-proc/azuredeploy.json index 03278803a992..03c9d4643d60 100644 --- a/101-logic-app-sql-proc/azuredeploy.json +++ b/101-logic-app-sql-proc/azuredeploy.json @@ -43,6 +43,13 @@ "metadata": { "description": "The procedure to run." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -52,11 +59,11 @@ { "type": "Microsoft.Web/connections", "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[parameters('sqlConnectionName')]", "properties": { "api": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/sql')]" + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/sql')]" }, "displayName": "sql_connection", "parameterValues": { @@ -72,7 +79,7 @@ "type": "Microsoft.Logic/workflows", "apiVersion": "2016-06-01", "name": "[parameters('logicAppName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Web/connections', parameters('sqlConnectionName'))]" ], @@ -82,7 +89,7 @@ "contentVersion": "1.0.0.0", "parameters": { "$connections": { - "defaultValue": { }, + "defaultValue": {}, "type": "Object" } }, @@ -97,14 +104,13 @@ }, "actions": { "Execute_stored_procedure": { - "runAfter": { }, + "runAfter": {}, "type": "ApiConnection", "inputs": { - "body": { - }, + "body": {}, "host": { "api": { - "runtimeUrl": "[concat('https://logic-apis-', resourceGroup().location, '.azure-apim.net/apim/sql')]" + "runtimeUrl": "[concat('https://logic-apis-', parameters('location'), '.azure-apim.net/apim/sql')]" }, "connection": { "name": "@parameters('$connections')['sql']['connectionId']" @@ -115,7 +121,7 @@ } } }, - "outputs": { } + "outputs": {} }, "parameters": { "$connections": { @@ -123,14 +129,14 @@ "sql": { "connectionId": "[resourceId('Microsoft.Web/connections', parameters('sqlConnectionName'))]", "connectionName": "[parameters('sqlConnectionName')]", - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/sql')]" + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/sql')]" } } } } }, - "resources": [ ] + "resources": [] } ], - "outputs": { } + "outputs": {} } diff --git a/101-media-services-create/azuredeploy.json b/101-media-services-create/azuredeploy.json index 6d4cba2d15a6..15a593a20fa5 100644 --- a/101-media-services-create/azuredeploy.json +++ b/101-media-services-create/azuredeploy.json @@ -7,6 +7,13 @@ "metadata": { "description": "Name of the Media Services account. A Media Services account name is globally unique, all lowercase letters or numbers with no spaces." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -17,7 +24,7 @@ "name": "[parameters('mediaServiceName')]", "type": "Microsoft.Media/mediaServices", "apiVersion": "2015-10-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('storageName'))]" ], @@ -35,10 +42,10 @@ "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2016-01-01", "kind": "Storage", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" } } ] -} \ No newline at end of file +} diff --git a/101-mobile-app-create/azuredeploy.json b/101-mobile-app-create/azuredeploy.json index 09c71c6c5a80..9f2ed9c7b593 100644 --- a/101-mobile-app-create/azuredeploy.json +++ b/101-mobile-app-create/azuredeploy.json @@ -55,6 +55,13 @@ "metadata": { "description": "The maximum size, in bytes, for the database" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -70,7 +77,7 @@ "type": "Microsoft.Web/serverfarms", "apiVersion": "2015-08-01", "name": "[variables('hostingPlanName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[parameters('hostingPlanSettings').skuName]", "tier": "[parameters('hostingPlanSettings').tier]", @@ -84,7 +91,7 @@ "apiVersion": "2015-08-01", "type": "Microsoft.Web/sites", "name": "[variables('uniqueAppName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "kind": "mobileapp", "properties": { "name": "[variables('uniqueAppName')]", @@ -143,7 +150,7 @@ { "name": "[variables('databaseServerName')]", "type": "Microsoft.Sql/servers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01-preview", "properties": { "administratorLogin": "[parameters('sqlServerAdminLogin')]", @@ -154,7 +161,7 @@ { "name": "[variables('databaseName')]", "type": "databases", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01-preview", "dependsOn": [ "[variables('databaseServerName')]" @@ -171,7 +178,7 @@ "dependsOn": [ "[variables('databaseServerName')]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "open", "properties": { "endIpAddress": "255.255.255.255", @@ -184,9 +191,9 @@ "apiVersion": "2014-09-01", "type": "Microsoft.NotificationHubs/namespaces", "name": "[variables('notificationHubNamespace')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { - "region": "[resourceGroup().location]", + "region": "[parameters('location')]", "namespaceType": "NotificationHub" } }, @@ -194,11 +201,11 @@ "apiVersion": "2014-09-01", "name": "[concat(variables('notificationHubNamespace'), '/', variables('uniqueAppName'), '-hub')]", "type": "Microsoft.NotificationHubs/namespaces/notificationHubs", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('notificationHubNamespace')]" ], "properties": {} } ] -} \ No newline at end of file +} diff --git a/101-mutiple-vms-with-data-management-gateway/azuredeploy.json b/101-mutiple-vms-with-data-management-gateway/azuredeploy.json index eb69579738f3..fbe15759bbe8 100644 --- a/101-mutiple-vms-with-data-management-gateway/azuredeploy.json +++ b/101-mutiple-vms-with-data-management-gateway/azuredeploy.json @@ -3,13 +3,13 @@ "contentVersion": "1.0.0.0", "parameters": { "existingDataFactoryName": { - "type":"string", + "type": "string", "metadata": { "description": "your existing data factory name" } }, "existingDataFactoryResourceGroup": { - "type":"string", + "type": "string", "metadata": { "description": "your existing data factory resource group" } @@ -20,7 +20,7 @@ "description": "Gateway name must be unique in subscription" } }, - "GatewayNodeCount":{ + "GatewayNodeCount": { "type": "int", "maxValue": 4, "minValue": 1, @@ -40,20 +40,19 @@ "description": "Password for the virtual machine" } }, - "existingVirtualNetworkName":{ + "existingVirtualNetworkName": { "type": "string", "metadata": { "description": "your existing vnet name" } }, - "existingVnetLocation": - { + "existingVnetLocation": { "type": "string", "metadata": { "description": "your virtual machine will be create in the same datacenter with VNET" } }, - "existingVnetResourceGroupName":{ + "existingVnetResourceGroupName": { "type": "string", "metadata": { "description": "Name of the existing VNET resource group" @@ -81,41 +80,44 @@ } }, "variables": { - "delimiters": [ "-", "_" ], - "prefix": "[split(parameters('GatewayName'), variables('delimiters'))[0]]", + "delimiters": [ + "-", + "_" + ], + "prefix": "[split(parameters('GatewayName'), variables('delimiters'))[0]]", "gatewayId": "[resourceId(parameters('existingDataFactoryResourceGroup'), 'Microsoft.DataFactory/dataFactories/gateways', parameters('existingDataFactoryName'), parameters('GatewayName'))]", - "storageAccountName": "[take(concat(toLower(variables('prefix')), uniquestring(resourceGroup().id, parameters('GatewayName'))), 24)]", + "storageAccountName": "[take(concat(toLower(variables('prefix')), uniquestring(resourceGroup().id, parameters('GatewayName'))), 24)]", "networkSecurityGroupName": "[concat(parameters('GatewayName'), 'nsg')]", "vmTemplateLink": "[concat(parameters('_artifactsLocation'), 'nested/VMtemplate.json',parameters('_artifactsLocationSasToken'))]", "subnetId": "[resourceId(parameters('existingVnetResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('existingVirtualNetworkName'), parameters('existingSubnetInYourVnet'))]", "scriptURL": "[concat(parameters('_artifactsLocation'), 'scripts/gatewayInstall.ps1',parameters('_artifactsLocationSasToken'))]" }, - "resources": [ + "resources": [ { "apiVersion": "2017-05-10", "name": "nestedTemplate", "type": "Microsoft.Resources/deployments", "resourceGroup": "[parameters('existingDataFactoryResourceGroup')]", "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": {}, - "resources": [ - { - "type": "Microsoft.DataFactory/dataFactories/gateways", - "apiVersion": "2015-10-01", - "name": "[concat(parameters('existingDataFactoryName'), '/', parameters('GatewayName'))]", - "properties": { - "multiNodeSupportEnabled": true, - "description": "my gateway" - } - } - ] - }, - "parameters": {} + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "variables": {}, + "resources": [ + { + "type": "Microsoft.DataFactory/dataFactories/gateways", + "apiVersion": "2015-10-01", + "name": "[concat(parameters('existingDataFactoryName'), '/', parameters('GatewayName'))]", + "properties": { + "multiNodeSupportEnabled": true, + "description": "my gateway" + } + } + ] + }, + "parameters": {} } }, { @@ -128,14 +130,14 @@ { "name": "default-allow-rdp", "properties": { - "priority": 1000, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "3389", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" + "priority": 1000, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "3389", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } } ] @@ -164,9 +166,9 @@ "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]", "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" ], - "copy": { - "name": "vmcopy", - "count": "[parameters('GatewayNodeCount')]" + "copy": { + "name": "vmcopy", + "count": "[parameters('GatewayNodeCount')]" }, "properties": { "mode": "Incremental", @@ -175,8 +177,7 @@ "contentVersion": "1.0.0.0" }, "parameters": { - "gatewayId": - { + "gatewayId": { "value": "[variables('gatewayId')]" }, "virtualMachineName": { @@ -188,28 +189,23 @@ "adminPassword": { "value": "[parameters('adminPassword')]" }, - "existingVnetLocation": - { + "existingVnetLocation": { "value": "[parameters('existingVnetLocation')]" }, - "subnetId": - { - "value":"[variables('subnetId')]" + "subnetId": { + "value": "[variables('subnetId')]" }, - "nsgId": - { - "value":"[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + "nsgId": { + "value": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" }, - "storageAccountName": - { + "storageAccountName": { "value": "[variables('storageAccountName')]" }, - "scriptUrl": - { + "scriptUrl": { "value": "[variables('scriptURL')]" } } } } ] -} +} \ No newline at end of file diff --git a/101-mutiple-vms-with-data-management-gateway/nested/VMtemplate.json b/101-mutiple-vms-with-data-management-gateway/nested/VMtemplate.json index 010df1faa68a..a0aafc3ed105 100644 --- a/101-mutiple-vms-with-data-management-gateway/nested/VMtemplate.json +++ b/101-mutiple-vms-with-data-management-gateway/nested/VMtemplate.json @@ -2,12 +2,10 @@ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { - "gatewayId": - { + "gatewayId": { "type": "string" }, - "virtualMachineName": - { + "virtualMachineName": { "type": "string" }, "adminUserName": { @@ -16,29 +14,24 @@ "adminPassword": { "type": "securestring" }, - "existingVnetLocation": - { + "existingVnetLocation": { "type": "string" }, - "subnetId": - { - "type":"string" + "subnetId": { + "type": "string" }, - "nsgId": - { - "type":"string" + "nsgId": { + "type": "string" }, - "storageAccountName": - { + "storageAccountName": { "type": "string" }, - "scriptUrl": - { + "scriptUrl": { "type": "string" } }, "variables": { - "nicName": "[concat(parameters('virtualMachineName'), 'Nic')]", + "nicName": "[concat(parameters('virtualMachineName'), 'Nic')]", "publicIPAddressName": "[concat(parameters('virtualMachineName'), '-ip')]" }, "resources": [ @@ -75,7 +68,7 @@ } ], "networkSecurityGroup": { - "id": "[parameters('nsgId')]" + "id": "[parameters('nsgId')]" } } }, @@ -88,7 +81,7 @@ "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], "properties": { - "hardwareProfile": { + "hardwareProfile": { "vmSize": "Standard_A3" }, "osProfile": { @@ -98,7 +91,7 @@ }, "storageProfile": { "imageReference": { - "publisher": "MicrosoftWindowsServer", + "publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", "sku": "2016-Datacenter", "version": "latest" @@ -133,7 +126,7 @@ "apiVersion": "2015-06-15", "location": "[parameters('existingVnetLocation')]", "tags": { - "vmname": "[parameters('virtualMachineName')]" + "vmname": "[parameters('virtualMachineName')]" }, "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines/',parameters('virtualMachineName'))]" @@ -142,9 +135,11 @@ "publisher": "Microsoft.Compute", "type": "CustomScriptExtension", "typeHandlerVersion": "1.7", - "autoUpgradeMinorVersion":true, + "autoUpgradeMinorVersion": true, "settings": { - "fileUris": [ "[parameters('scriptURL')]"] + "fileUris": [ + "[parameters('scriptURL')]" + ] }, "protectedSettings": { "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File gatewayInstall.ps1 ', listAuthKeys(parameters('gatewayId'), '2015-10-01').key1)]" diff --git a/101-nic-publicip-dns-vnet/azuredeploy.json b/101-nic-publicip-dns-vnet/azuredeploy.json index db2489cb1637..88a3c8955fa7 100644 --- a/101-nic-publicip-dns-vnet/azuredeploy.json +++ b/101-nic-publicip-dns-vnet/azuredeploy.json @@ -32,6 +32,13 @@ "metadata": { "description": "Type of public IP address" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -40,15 +47,14 @@ "subnetName": "subnet1", "nicName": "networkInterface1", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "apiVersion": "2015-06-15" + "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]", "dnsSettings": { @@ -60,7 +66,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -81,7 +87,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -104,4 +110,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-powerbi-workspace-create/azuredeploy.json b/101-powerbi-workspace-create/azuredeploy.json index a2a6d07fd347..f9fb5998e039 100644 --- a/101-powerbi-workspace-create/azuredeploy.json +++ b/101-powerbi-workspace-create/azuredeploy.json @@ -3,7 +3,7 @@ "contentVersion": "1.0.0.0", "parameters": { "powerbiWorkspaceName": { - "type": "string", + "type": "string", "minLength": 3, "maxLength": 63, "metadata": { @@ -19,6 +19,13 @@ "metadata": { "description": "provide the sku for powerbi workspace collection." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -26,7 +33,7 @@ "apiVersion": "2016-01-29", "type": "Microsoft.PowerBI/workspaceCollections", "name": "[parameters('powerbiWorkspaceName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[parameters('sku')]" }, diff --git a/101-rbac-builtinrole-virtualmachine/azuredeploy.json b/101-rbac-builtinrole-virtualmachine/azuredeploy.json index e6d7c5dc2da3..abbbe7297b4d 100644 --- a/101-rbac-builtinrole-virtualmachine/azuredeploy.json +++ b/101-rbac-builtinrole-virtualmachine/azuredeploy.json @@ -31,6 +31,13 @@ "metadata": { "description": "A new GUID used to identify the role" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { diff --git a/101-rbac-builtinrole-virtualmachine/prereqs/prereq.azuredeploy.json b/101-rbac-builtinrole-virtualmachine/prereqs/prereq.azuredeploy.json index 69e0abbec3b7..2bf70e2b02de 100644 --- a/101-rbac-builtinrole-virtualmachine/prereqs/prereq.azuredeploy.json +++ b/101-rbac-builtinrole-virtualmachine/prereqs/prereq.azuredeploy.json @@ -13,6 +13,13 @@ "metadata": { "description": "Password for the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -27,7 +34,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -48,7 +55,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" ], @@ -70,7 +77,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -117,4 +124,4 @@ "value": "[variables('vmName')]" } } -} \ No newline at end of file +} diff --git a/101-recovery-services-backup-vms/azuredeploy.json b/101-recovery-services-backup-vms/azuredeploy.json index 9ad9efa04f62..3b4334270597 100644 --- a/101-recovery-services-backup-vms/azuredeploy.json +++ b/101-recovery-services-backup-vms/azuredeploy.json @@ -1,54 +1,61 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "existingVirtualMachinesResourceGroup": { - "type": "string", - "metadata": { - "description": "Resource group where the virtual machines are located. This can be different than resource group of the vault. " - } - }, - "existingVirtualMachines": { - "type": "array", - "metadata": { - "description": "Array of Azure virtual machines. e.g. [\"vm1\",\"vm2\",\"vm3\"]" - } - }, - "existingRecoveryServicesVault": { - "type": "string", - "metadata": { - "description": "Recovery services vault name where the VMs will be backed up to. " - } - }, - "existingBackupPolicy": { - "type": "string", - "defaultValue": "DefaultPolicy", - "metadata": { - "description": "Backup policy to be used to backup VMs. Backup POlicy defines the schedule of the backup and how long to retain backup copies. By default every vault comes with a 'DefaultPolicy' which canbe used here." - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "existingVirtualMachinesResourceGroup": { + "type": "string", + "metadata": { + "description": "Resource group where the virtual machines are located. This can be different than resource group of the vault. " + } }, - "variables": { - "backupFabric": "Azure", - "v2VmType": "Microsoft.Compute/virtualMachines", - "v2VmContainer": "iaasvmcontainer;iaasvmcontainerv2;", - "v2Vm": "vm;iaasvmcontainerv2;" + "existingVirtualMachines": { + "type": "array", + "metadata": { + "description": "Array of Azure virtual machines. e.g. [\"vm1\",\"vm2\",\"vm3\"]" + } }, - "resources": [ - { - "name": "[concat(parameters('existingRecoveryServicesVault'), '/', variables('backupFabric'), '/', variables('v2VmContainer'), concat(parameters('existingVirtualMachinesResourceGroup'),';',parameters('existingVirtualMachines')[copyIndex()]), '/', variables('v2Vm'), concat(parameters('existingVirtualMachinesResourceGroup'),';',parameters('existingVirtualMachines')[copyIndex()]))]", - "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", - "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", - "copy": { - "name": "v2VmsCopy", - "count": "[length(parameters('existingVirtualMachines'))]" - }, - "properties": { - "protectedItemType": "[variables('v2VmType')]", - "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies',parameters('existingRecoveryServicesVault'),parameters('existingBackupPolicy') )]", - "sourceResourceId": "[resourceId(subscription().subscriptionId,parameters('existingVirtualMachinesResourceGroup'),'Microsoft.Compute/virtualMachines',parameters('existingVirtualMachines')[copyIndex()])]" - } - } - ] + "existingRecoveryServicesVault": { + "type": "string", + "metadata": { + "description": "Recovery services vault name where the VMs will be backed up to. " + } + }, + "existingBackupPolicy": { + "type": "string", + "defaultValue": "DefaultPolicy", + "metadata": { + "description": "Backup policy to be used to backup VMs. Backup POlicy defines the schedule of the backup and how long to retain backup copies. By default every vault comes with a 'DefaultPolicy' which canbe used here." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "backupFabric": "Azure", + "v2VmType": "Microsoft.Compute/virtualMachines", + "v2VmContainer": "iaasvmcontainer;iaasvmcontainerv2;", + "v2Vm": "vm;iaasvmcontainerv2;" + }, + "resources": [ + { + "name": "[concat(parameters('existingRecoveryServicesVault'), '/', variables('backupFabric'), '/', variables('v2VmContainer'), concat(parameters('existingVirtualMachinesResourceGroup'),';',parameters('existingVirtualMachines')[copyIndex()]), '/', variables('v2Vm'), concat(parameters('existingVirtualMachinesResourceGroup'),';',parameters('existingVirtualMachines')[copyIndex()]))]", + "apiVersion": "2016-06-01", + "location": "[parameters('location')]", + "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", + "copy": { + "name": "v2VmsCopy", + "count": "[length(parameters('existingVirtualMachines'))]" + }, + "properties": { + "protectedItemType": "[variables('v2VmType')]", + "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies',parameters('existingRecoveryServicesVault'),parameters('existingBackupPolicy') )]", + "sourceResourceId": "[resourceId(subscription().subscriptionId,parameters('existingVirtualMachinesResourceGroup'),'Microsoft.Compute/virtualMachines',parameters('existingVirtualMachines')[copyIndex()])]" + } + } + ] } diff --git a/101-recovery-services-create-vault-enable-diagnostics/azuredeploy.json b/101-recovery-services-create-vault-enable-diagnostics/azuredeploy.json index 4ca2316be85d..398412e24b30 100644 --- a/101-recovery-services-create-vault-enable-diagnostics/azuredeploy.json +++ b/101-recovery-services-create-vault-enable-diagnostics/azuredeploy.json @@ -7,6 +7,13 @@ "metadata": { "description": "Name of the Vault" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -19,7 +26,7 @@ "type": "Microsoft.RecoveryServices/vaults", "apiVersion": "2018-01-10", "name": "[parameters('vaultName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "RS0", "tier": "Standard" @@ -41,7 +48,7 @@ "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2017-06-01", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, @@ -75,4 +82,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/101-recovery-services-create-vm-and-configure-backup/azuredeploy.json b/101-recovery-services-create-vm-and-configure-backup/azuredeploy.json index 96f95dddf2e3..cb6a23e6c54a 100644 --- a/101-recovery-services-create-vm-and-configure-backup/azuredeploy.json +++ b/101-recovery-services-create-vm-and-configure-backup/azuredeploy.json @@ -34,6 +34,13 @@ "metadata": { "description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: 2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter, 2016-Nano-Server, 2016-Datacenter-with-Containers, 2016-Datacenter." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -59,14 +66,14 @@ "backupFabric": "Azure", "backupPolicyName": "DefaultPolicy", "protectionContainer": "[concat('iaasvmcontainer;iaasvmcontainerv2;', resourceGroup().name, ';', variables('vmName'))]", - "protectedItem": "[concat('vm;iaasvmcontainerv2;', resourceGroup().name, ';', variables('vmName'))]" + "protectedItem": "[concat('vm;iaasvmcontainerv2;', resourceGroup().name, ';', variables('vmName'))]" }, "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, @@ -77,7 +84,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -89,7 +96,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -110,7 +117,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -136,7 +143,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -195,7 +202,7 @@ { "apiVersion": "2016-06-01", "type": "Microsoft.RecoveryServices/vaults", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[variables('vaultName')]", "sku": { "name": "RS0", @@ -214,8 +221,8 @@ "properties": { "protectedItemType": "Microsoft.ClassicCompute/virtualMachines", "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies', variables('vaultName'), variables('backupPolicyName'))]", - "sourceResourceId": "[resourceId('Microsoft.Compute/virtualMachines/', variables('vmName'))]" + "sourceResourceId": "[resourceId('Microsoft.Compute/virtualMachines/', variables('vmName'))]" } } ] -} \ No newline at end of file +} diff --git a/101-recovery-services-daily-backup-policy-create/azuredeploy.json b/101-recovery-services-daily-backup-policy-create/azuredeploy.json index d3ee4f2860fa..612143a42be6 100644 --- a/101-recovery-services-daily-backup-policy-create/azuredeploy.json +++ b/101-recovery-services-daily-backup-policy-create/azuredeploy.json @@ -1,150 +1,158 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vaultName": { - "type": "string", - "metadata": { - "description": "Name of the Recovery Services Vault" - } - }, - "policyName": { - "type": "string", - "metadata": { - "description": "Name of the Backup Policy" - } - }, - "scheduleRunTimes": { - "type": "array", - "metadata": { - "description": "Times in day when backup should be triggered. e.g. 01:00 or 13:00. Must be an array, however for IaaS VMs only one value is valid. This will be used in LTR too for daily, weekly, monthly and yearly backup." - } - }, - "timeZone": { - "type": "string", - "metadata": { - "description": "Any Valid timezone, for example:UTC, Pacific Standard Time. Refer: https://msdn.microsoft.com/en-us/library/gg154758.aspx" - } - }, - "dailyRetentionDurationCount": { - "type": "int", - "metadata": { - "description": "Number of days you want to retain the backup" - } - }, - "daysOfTheWeek": { - "type": "array", - "metadata": { - "description": "Backup will run on array of Days like, Monday, Tuesday etc. Applies in Weekly retention only." - } - }, - "weeklyRetentionDurationCount": { - "type": "int", - "metadata": { - "description": "Number of weeks you want to retain the backup" - } - }, - "monthlyRetentionDurationCount": { - "type": "int", - "metadata": { - "description": "Number of months you want to retain the backup" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vaultName": { + "type": "string", + "metadata": { + "description": "Name of the Recovery Services Vault" + } + }, + "policyName": { + "type": "string", + "metadata": { + "description": "Name of the Backup Policy" + } + }, + "scheduleRunTimes": { + "type": "array", + "metadata": { + "description": "Times in day when backup should be triggered. e.g. 01:00 or 13:00. Must be an array, however for IaaS VMs only one value is valid. This will be used in LTR too for daily, weekly, monthly and yearly backup." + } + }, + "timeZone": { + "type": "string", + "metadata": { + "description": "Any Valid timezone, for example:UTC, Pacific Standard Time. Refer: https://msdn.microsoft.com/en-us/library/gg154758.aspx" + } + }, + "dailyRetentionDurationCount": { + "type": "int", + "metadata": { + "description": "Number of days you want to retain the backup" + } + }, + "daysOfTheWeek": { + "type": "array", + "metadata": { + "description": "Backup will run on array of Days like, Monday, Tuesday etc. Applies in Weekly retention only." + } + }, + "weeklyRetentionDurationCount": { + "type": "int", + "metadata": { + "description": "Number of weeks you want to retain the backup" + } + }, + "monthlyRetentionDurationCount": { + "type": "int", + "metadata": { + "description": "Number of months you want to retain the backup" + } + }, + "monthsOfYear": { + "type": "array", + "metadata": { + "description": "Array of Months for Yearly Retention" + } + }, + "yearlyRetentionDurationCount": { + "type": "int", + "metadata": { + "description": "Number of years you want to retain the backup" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.RecoveryServices/vaults", + "apiVersion": "2015-11-10", + "name": "[parameters('vaultName')]", + "location": "[parameters('location')]", + "sku": { + "name": "RS0", + "tier": "Standard" + }, + "properties": {} + }, + { + "apiVersion": "2016-06-01", + "name": "[concat(parameters('vaultName'), '/', parameters('policyName'))]", + "type": "Microsoft.RecoveryServices/vaults/backupPolicies", + "dependsOn": [ + "[concat('Microsoft.RecoveryServices/vaults/', parameters('vaultName'))]" + ], + "location": "[parameters('location')]", + "properties": { + "backupManagementType": "AzureIaasVM", + "schedulePolicy": { + "scheduleRunFrequency": "Daily", + "scheduleRunDays": null, + "scheduleRunTimes": "[parameters('scheduleRunTimes')]", + "schedulePolicyType": "SimpleSchedulePolicy" }, - "monthsOfYear": { - "type": "array", - "metadata": { - "description": "Array of Months for Yearly Retention" + "retentionPolicy": { + "dailySchedule": { + "retentionTimes": "[parameters('scheduleRunTimes')]", + "retentionDuration": { + "count": "[parameters('dailyRetentionDurationCount')]", + "durationType": "Days" } - }, - "yearlyRetentionDurationCount": { - "type": "int", - "metadata": { - "description": "Number of years you want to retain the backup" + }, + "weeklySchedule": { + "daysOfTheWeek": "[parameters('daysOfTheWeek')]", + "retentionTimes": "[parameters('scheduleRunTimes')]", + "retentionDuration": { + "count": "[parameters('weeklyRetentionDurationCount')]", + "durationType": "Weeks" } - } - }, - "resources": [ - { - "type": "Microsoft.RecoveryServices/vaults", - "apiVersion": "2015-11-10", - "name": "[parameters('vaultName')]", - "location": "[resourceGroup().location]", - "sku": { - "name": "RS0", - "tier": "Standard" - }, - "properties": { - } - }, - { - "apiVersion": "2016-06-01", - "name": "[concat(parameters('vaultName'), '/', parameters('policyName'))]", - "type": "Microsoft.RecoveryServices/vaults/backupPolicies", - "dependsOn": [ "[concat('Microsoft.RecoveryServices/vaults/', parameters('vaultName'))]" ], - "location": "[resourceGroup().location]", - "properties": { - "backupManagementType": "AzureIaasVM", - "schedulePolicy": { - "scheduleRunFrequency": "Daily", - "scheduleRunDays": null, - "scheduleRunTimes": "[parameters('scheduleRunTimes')]", - "schedulePolicyType": "SimpleSchedulePolicy" }, - "retentionPolicy": { - "dailySchedule": { - "retentionTimes": "[parameters('scheduleRunTimes')]", - "retentionDuration": { - "count": "[parameters('dailyRetentionDurationCount')]", - "durationType": "Days" - } - }, - "weeklySchedule": { - "daysOfTheWeek": "[parameters('daysOfTheWeek')]", - "retentionTimes": "[parameters('scheduleRunTimes')]", - "retentionDuration": { - "count": "[parameters('weeklyRetentionDurationCount')]", - "durationType": "Weeks" - } + "monthlySchedule": { + "retentionScheduleFormatType": "Daily", + "retentionScheduleDaily": { + "daysOfTheMonth": [ + { + "date": 1, + "isLast": false + } + ] }, - "monthlySchedule": { - "retentionScheduleFormatType": "Daily", - "retentionScheduleDaily": { - "daysOfTheMonth": [ - { - "date": 1, - "isLast": false - } - ] - }, - "retentionScheduleWeekly": null, - "retentionTimes": "[parameters('scheduleRunTimes')]", - "retentionDuration": { - "count": "[parameters('monthlyRetentionDurationCount')]", - "durationType": "Months" - } - }, - "yearlySchedule": { - "retentionScheduleFormatType": "Daily", - "monthsOfYear": "[parameters('monthsOfYear')]", - "retentionScheduleDaily": { - "daysOfTheMonth": [ - { - "date": 1, - "isLast": false - } - ] - }, - "retentionScheduleWeekly": null, - "retentionTimes": "[parameters('scheduleRunTimes')]", - "retentionDuration": { - "count": "[parameters('yearlyRetentionDurationCount')]", - "durationType": "Years" - } + "retentionScheduleWeekly": null, + "retentionTimes": "[parameters('scheduleRunTimes')]", + "retentionDuration": { + "count": "[parameters('monthlyRetentionDurationCount')]", + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Daily", + "monthsOfYear": "[parameters('monthsOfYear')]", + "retentionScheduleDaily": { + "daysOfTheMonth": [ + { + "date": 1, + "isLast": false + } + ] }, - "retentionPolicyType": "LongTermRetentionPolicy" + "retentionScheduleWeekly": null, + "retentionTimes": "[parameters('scheduleRunTimes')]", + "retentionDuration": { + "count": "[parameters('yearlyRetentionDurationCount')]", + "durationType": "Years" + } }, - "timeZone": "[parameters('timeZone')]" - } + "retentionPolicyType": "LongTermRetentionPolicy" + }, + "timeZone": "[parameters('timeZone')]" } - ] + } + ] } diff --git a/101-recovery-services-vault-create/azuredeploy.json b/101-recovery-services-vault-create/azuredeploy.json index 1ff6b418b04b..6bab5331f528 100644 --- a/101-recovery-services-vault-create/azuredeploy.json +++ b/101-recovery-services-vault-create/azuredeploy.json @@ -17,6 +17,13 @@ "metadata": { "description": "SKU tier for the vault" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -24,13 +31,12 @@ "type": "Microsoft.RecoveryServices/vaults", "apiVersion": "2016-06-01", "name": "[parameters('vaultName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "RS0", "tier": "[parameters('skuTier')]" }, - "properties": { - } + "properties": {} } ] -} \ No newline at end of file +} diff --git a/101-recovery-services-weekly-backup-policy-create/azuredeploy.json b/101-recovery-services-weekly-backup-policy-create/azuredeploy.json index 391c7d026f92..9b6a60714e64 100644 --- a/101-recovery-services-weekly-backup-policy-create/azuredeploy.json +++ b/101-recovery-services-weekly-backup-policy-create/azuredeploy.json @@ -1,168 +1,176 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vaultName": { - "type": "string", - "metadata": { - "description": "Name of the Recovery Services Vault" - } - }, - "policyName": { - "type": "string", - "metadata": { - "description": "Name of the Backup Policy" - } - }, - "scheduleRunDays": { - "type": "array", - "metadata": { - "description": "Backup Schedule will run on array of Days like, Monday, Tuesday etc. Applies in Weekly Backup Type only." - } - }, - "scheduleRunTimes": { - "type": "array", - "metadata": { - "description": "Times in day when backup should be triggered. e.g. 01:00, 13:00. This will be used in LTR too for daily, weekly, monthly and yearly backup." - } - }, - "timeZone": { - "type": "string", - "metadata": { - "description": "Any Valid timezone, for example:UTC, Pacific Standard Time. Refer: https://msdn.microsoft.com/en-us/library/gg154758.aspx" - } - }, - "weeklyRetentionDurationCount": { - "type": "int", - "metadata": { - "description": "Number of weeks you want to retain the backup" - } - }, - "daysOfTheWeekForMontlyRetention": { - "type": "array", - "metadata": { - "description": "Array of Days for Monthly Retention (Min One or Max all values from scheduleRunDays, but not any other days which are not part of scheduleRunDays)" - } - }, - "weeksOfTheMonthForMonthlyRetention": { - "type": "array", - "metadata": { - "description": "Array of Weeks for Monthly Retention - First, Second, Third, Fourth, Last" - } - }, - "monthlyRetentionDurationCount": { - "type": "int", - "metadata": { - "description": "Number of months you want to retain the backup" - } - }, - "monthsOfYear": { - "type": "array", - "metadata": { - "description": "Array of Months for Yearly Retention" - } - }, - "daysOfTheWeekForYearlyRetention": { - "type": "array", - "metadata": { - "description": "Array of Days for Yearly Retention (Min One or Max all values from scheduleRunDays, but not any other days which are not part of scheduleRunDays)" - } - }, - "weeksOfTheMonthForYearlyRetention": { - "type": "array", - "metadata": { - "description": "Array of Weeks for Yearly Retention - First, Second, Third, Fourth, Last" - } - }, - "yearlyRetentionDurationCount": { - "type": "int", - "metadata": { - "description": "Number of years you want to retain the backup" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vaultName": { + "type": "string", + "metadata": { + "description": "Name of the Recovery Services Vault" + } }, - "resources": [ - { - "type": "Microsoft.RecoveryServices/vaults", - "apiVersion": "2016-06-01", - "name": "[parameters('vaultName')]", - "location": "[resourceGroup().location]", - "sku": { - "name": "RS0", - "tier": "Standard" - }, - "properties": { - } + "policyName": { + "type": "string", + "metadata": { + "description": "Name of the Backup Policy" + } + }, + "scheduleRunDays": { + "type": "array", + "metadata": { + "description": "Backup Schedule will run on array of Days like, Monday, Tuesday etc. Applies in Weekly Backup Type only." + } + }, + "scheduleRunTimes": { + "type": "array", + "metadata": { + "description": "Times in day when backup should be triggered. e.g. 01:00, 13:00. This will be used in LTR too for daily, weekly, monthly and yearly backup." + } + }, + "timeZone": { + "type": "string", + "metadata": { + "description": "Any Valid timezone, for example:UTC, Pacific Standard Time. Refer: https://msdn.microsoft.com/en-us/library/gg154758.aspx" + } + }, + "weeklyRetentionDurationCount": { + "type": "int", + "metadata": { + "description": "Number of weeks you want to retain the backup" + } + }, + "daysOfTheWeekForMontlyRetention": { + "type": "array", + "metadata": { + "description": "Array of Days for Monthly Retention (Min One or Max all values from scheduleRunDays, but not any other days which are not part of scheduleRunDays)" + } + }, + "weeksOfTheMonthForMonthlyRetention": { + "type": "array", + "metadata": { + "description": "Array of Weeks for Monthly Retention - First, Second, Third, Fourth, Last" + } + }, + "monthlyRetentionDurationCount": { + "type": "int", + "metadata": { + "description": "Number of months you want to retain the backup" + } + }, + "monthsOfYear": { + "type": "array", + "metadata": { + "description": "Array of Months for Yearly Retention" + } + }, + "daysOfTheWeekForYearlyRetention": { + "type": "array", + "metadata": { + "description": "Array of Days for Yearly Retention (Min One or Max all values from scheduleRunDays, but not any other days which are not part of scheduleRunDays)" + } + }, + "weeksOfTheMonthForYearlyRetention": { + "type": "array", + "metadata": { + "description": "Array of Weeks for Yearly Retention - First, Second, Third, Fourth, Last" + } + }, + "yearlyRetentionDurationCount": { + "type": "int", + "metadata": { + "description": "Number of years you want to retain the backup" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.RecoveryServices/vaults", + "apiVersion": "2016-06-01", + "name": "[parameters('vaultName')]", + "location": "[parameters('location')]", + "sku": { + "name": "RS0", + "tier": "Standard" }, - { - "apiVersion": "2016-06-01", - "name": "[concat(parameters('vaultName'), '/', parameters('policyName'))]", - "type": "Microsoft.RecoveryServices/vaults/backupPolicies", - "dependsOn": [ "[concat('Microsoft.RecoveryServices/vaults/', parameters('vaultName'))]" ], - "location": "[resourceGroup().location]", - "properties": { - "backupManagementType": "AzureIaasVM", - "schedulePolicy": { - "scheduleRunFrequency": "Weekly", - "scheduleRunDays": "[parameters('scheduleRunDays')]", - "scheduleRunTimes": "[parameters('scheduleRunTimes')]", - "schedulePolicyType": "SimpleSchedulePolicy" + "properties": {} + }, + { + "apiVersion": "2016-06-01", + "name": "[concat(parameters('vaultName'), '/', parameters('policyName'))]", + "type": "Microsoft.RecoveryServices/vaults/backupPolicies", + "dependsOn": [ + "[concat('Microsoft.RecoveryServices/vaults/', parameters('vaultName'))]" + ], + "location": "[parameters('location')]", + "properties": { + "backupManagementType": "AzureIaasVM", + "schedulePolicy": { + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": "[parameters('scheduleRunDays')]", + "scheduleRunTimes": "[parameters('scheduleRunTimes')]", + "schedulePolicyType": "SimpleSchedulePolicy" + }, + "retentionPolicy": { + "dailySchedule": null, + "weeklySchedule": { + "daysOfTheWeek": "[parameters('scheduleRunDays')]", + "retentionTimes": "[parameters('scheduleRunTimes')]", + "retentionDuration": { + "count": "[parameters('weeklyRetentionDurationCount')]", + "durationType": "Weeks" + } }, - "retentionPolicy": { - "dailySchedule": null, - "weeklySchedule": { - "daysOfTheWeek": "[parameters('scheduleRunDays')]", - "retentionTimes": "[parameters('scheduleRunTimes')]", - "retentionDuration": { - "count": "[parameters('weeklyRetentionDurationCount')]", - "durationType": "Weeks" - } + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleDaily": { + "daysOfTheMonth": [ + { + "date": 1, + "isLast": false + } + ] }, - "monthlySchedule": { - "retentionScheduleFormatType": "Weekly", - "retentionScheduleDaily": { - "daysOfTheMonth": [ - { - "date": 1, - "isLast": false - } - ] - }, - "retentionScheduleWeekly": { - "daysOfTheWeek": "[parameters('daysOfTheWeekForMontlyRetention')]", - "weeksOfTheMonth": "[parameters('weeksOfTheMonthForMonthlyRetention')]" - }, - "retentionTimes": "[parameters('scheduleRunTimes')]", - "retentionDuration": { - "count": "[parameters('monthlyRetentionDurationCount')]", - "durationType": "Months" - } + "retentionScheduleWeekly": { + "daysOfTheWeek": "[parameters('daysOfTheWeekForMontlyRetention')]", + "weeksOfTheMonth": "[parameters('weeksOfTheMonthForMonthlyRetention')]" }, - "yearlySchedule": { - "retentionScheduleFormatType": "Weekly", - "monthsOfYear": "[parameters('monthsOfYear')]", - "retentionScheduleDaily": { - "daysOfTheMonth": [ - { - "date": 1, - "isLast": false - } - ] - }, - "retentionScheduleWeekly": { - "daysOfTheWeek": "[parameters('daysOfTheWeekForYearlyRetention')]", - "weeksOfTheMonth": "[parameters('weeksOfTheMonthForYearlyRetention')]" - }, - "retentionTimes": "[parameters('scheduleRunTimes')]", - "retentionDuration": { - "count": "[parameters('yearlyRetentionDurationCount')]", - "durationType": "Years" - } + "retentionTimes": "[parameters('scheduleRunTimes')]", + "retentionDuration": { + "count": "[parameters('monthlyRetentionDurationCount')]", + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": "[parameters('monthsOfYear')]", + "retentionScheduleDaily": { + "daysOfTheMonth": [ + { + "date": 1, + "isLast": false + } + ] }, - "retentionPolicyType": "LongTermRetentionPolicy" + "retentionScheduleWeekly": { + "daysOfTheWeek": "[parameters('daysOfTheWeekForYearlyRetention')]", + "weeksOfTheMonth": "[parameters('weeksOfTheMonthForYearlyRetention')]" + }, + "retentionTimes": "[parameters('scheduleRunTimes')]", + "retentionDuration": { + "count": "[parameters('yearlyRetentionDurationCount')]", + "durationType": "Years" + } }, - "timeZone": "[parameters('timeZone')]" - } + "retentionPolicyType": "LongTermRetentionPolicy" + }, + "timeZone": "[parameters('timeZone')]" } - ] + } + ] } diff --git a/101-redis-cache/prereqs/prereq.azuredeploy.json b/101-redis-cache/prereqs/prereq.azuredeploy.json index 8b28f12fecc8..6fd1e96faa4d 100644 --- a/101-redis-cache/prereqs/prereq.azuredeploy.json +++ b/101-redis-cache/prereqs/prereq.azuredeploy.json @@ -1,31 +1,39 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" - }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "comments": "Storage account used to store diagnostics data", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": { - - } - }], - "outputs": { - "existingDiagnosticsStorageAccountId": { - "type": "string", - "value": "[concat(resourceGroup().id, '/providers/Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } + }, + "variables": { + "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store diagnostics data", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + } + ], + "outputs": { + "existingDiagnosticsStorageAccountId": { + "type": "string", + "value": "[concat(resourceGroup().id, '/providers/Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" + } + } } diff --git a/101-security-group-create/azuredeploy.json b/101-security-group-create/azuredeploy.json index 704dfdc13b6c..245829cd8407 100644 --- a/101-security-group-create/azuredeploy.json +++ b/101-security-group-create/azuredeploy.json @@ -15,6 +15,13 @@ "metadata": { "description": "Subnet-1 Prefix" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -28,7 +35,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSecurityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -52,7 +59,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" ], @@ -76,4 +83,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-servicebus-create-namespace/azuredeploy.json b/101-servicebus-create-namespace/azuredeploy.json index 8b1093b41afe..b60527b6e2fa 100644 --- a/101-servicebus-create-namespace/azuredeploy.json +++ b/101-servicebus-create-namespace/azuredeploy.json @@ -19,19 +19,26 @@ "metadata": { "description": "The messaging tier for service Bus namespace" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "defaultSASKeyName": "RootManageSharedAccessKey", "defaultAuthRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('serviceBusNamespaceName'), variables('defaultSASKeyName'))]", - "sbVersion": "2017-04-01" + "sbVersion": "2017-04-01" }, "resources": [ { "apiVersion": "2017-04-01", "name": "[parameters('serviceBusNamespaceName')]", "type": "Microsoft.ServiceBus/namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard" } diff --git a/101-servicebus-namespace/azuredeploy.json b/101-servicebus-namespace/azuredeploy.json index 1c8f9d633fd3..fcf1e2f136f8 100644 --- a/101-servicebus-namespace/azuredeploy.json +++ b/101-servicebus-namespace/azuredeploy.json @@ -7,20 +7,25 @@ "metadata": { "description": "Name of the Service Bus Namespace" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - "sbVersion": "2015-08-01" - }, + "variables": { }, "resources": [ { "apiVersion": "2015-08-01", "name": "[parameters('serviceBusNamespaceName')]", "type": "Microsoft.ServiceBus/namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {}, "resources": [] } ], "outputs": {} -} \ No newline at end of file +} diff --git a/101-servicebus-pn-ar/azuredeploy.json b/101-servicebus-pn-ar/azuredeploy.json index e8c444a936c5..373cbc31341d 100644 --- a/101-servicebus-pn-ar/azuredeploy.json +++ b/101-servicebus-pn-ar/azuredeploy.json @@ -1,88 +1,95 @@ { - "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "premiumNamespaceName": { - "type": "string", - "metadata": { - "description": "Name of the Event Hub namespace" - } - }, - "skuCapacity": { - "type": "int", - "allowedValues": [ - 1, - 2, - 4 - ], - "defaultValue": 1, - "metadata": { - "description": "MessagingUnits for premium namespace" - } - }, - "namespaceSASKeyName": { - "type": "string", - "metadata": { - "description": "Name of the Namespace AuthorizationRule" - } - } + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "premiumNamespaceName": { + "type": "string", + "metadata": { + "description": "Name of the Event Hub namespace" + } + }, + "skuCapacity": { + "type": "int", + "allowedValues": [ + 1, + 2, + 4 + ], + "defaultValue": 1, + "metadata": { + "description": "MessagingUnits for premium namespace" + } }, - "variables": { - "ehVersion": "2017-04-01", - "defaultSASKeyName": "RootManageSharedAccessKey", - "customSASKeyName": "[concat(parameters('premiumNamespaceName'), concat('/', parameters('namespaceSASKeyName')))]", - "defaultAuthRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('premiumNamespaceName'), variables('defaultSASKeyName'))]", - "customAuthRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('premiumNamespaceName'), parameters('namespaceSASKeyName'))]" + "namespaceSASKeyName": { + "type": "string", + "metadata": { + "description": "Name of the Namespace AuthorizationRule" + } }, - "resources": [ - { - "apiVersion": "2017-04-01", - "name": "[parameters('premiumNamespaceName')]", - "type": "Microsoft.ServiceBus/namespaces", - "location": "[resourceGroup().location]", - "kind": "Messaging", - "sku": { - "name": "Premium", - "tier": "Premium", - "capacity": "[parameters('skuCapacity')]" - }, - "properties": { - "createACSNamespace": true - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "ehVersion": "2017-04-01", + "defaultSASKeyName": "RootManageSharedAccessKey", + "customSASKeyName": "[concat(parameters('premiumNamespaceName'), concat('/', parameters('namespaceSASKeyName')))]", + "defaultAuthRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('premiumNamespaceName'), variables('defaultSASKeyName'))]", + "customAuthRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('premiumNamespaceName'), parameters('namespaceSASKeyName'))]" + }, + "resources": [ + { + "apiVersion": "2017-04-01", + "name": "[parameters('premiumNamespaceName')]", + "type": "Microsoft.ServiceBus/namespaces", + "location": "[parameters('location')]", + "kind": "Messaging", + "sku": { + "name": "Premium", + "tier": "Premium", + "capacity": "[parameters('skuCapacity')]" }, - { - "apiVersion": "2017-04-01", - "name": "[variables('customSASKeyName')]", - "type": "Microsoft.ServiceBus/namespaces/authorizationRules", - "dependsOn": [ - "[concat('Microsoft.ServiceBus/namespaces/', parameters('premiumNamespaceName'))]" - ], - "location": "[resourceGroup().location]", - "properties": { - "Rights": [ - "Send", - "Listen", - "Manage" - ] - } + "properties": { + "createACSNamespace": true } - ], - "outputs": { - "NamespaceDefaultConnectionString": { - "type": "string", - "value": "[listkeys(variables('defaultAuthRuleResourceId'), variables('ehVersion')).primaryConnectionString]" - }, - "DefaultSharedAccessPolicyPrimaryKey": { - "type": "string", - "value": "[listkeys(variables('defaultAuthRuleResourceId'), variables('ehVersion')).primaryKey]" - }, - "NamespaceCustomConnectionString": { - "type": "string", - "value": "[listkeys(variables('customAuthRuleResourceId'), variables('ehVersion')).primaryConnectionString]" - }, - "CustomSharedAccessPolicyPrimaryKey": { - "type": "string", - "value": "[listkeys(variables('customAuthRuleResourceId'), variables('ehVersion')).primaryKey]" - } + }, + { + "apiVersion": "2017-04-01", + "name": "[variables('customSASKeyName')]", + "type": "Microsoft.ServiceBus/namespaces/authorizationRules", + "dependsOn": [ + "[concat('Microsoft.ServiceBus/namespaces/', parameters('premiumNamespaceName'))]" + ], + "location": "[parameters('location')]", + "properties": { + "Rights": [ + "Send", + "Listen", + "Manage" + ] + } + } + ], + "outputs": { + "NamespaceDefaultConnectionString": { + "type": "string", + "value": "[listkeys(variables('defaultAuthRuleResourceId'), variables('ehVersion')).primaryConnectionString]" + }, + "DefaultSharedAccessPolicyPrimaryKey": { + "type": "string", + "value": "[listkeys(variables('defaultAuthRuleResourceId'), variables('ehVersion')).primaryKey]" + }, + "NamespaceCustomConnectionString": { + "type": "string", + "value": "[listkeys(variables('customAuthRuleResourceId'), variables('ehVersion')).primaryConnectionString]" + }, + "CustomSharedAccessPolicyPrimaryKey": { + "type": "string", + "value": "[listkeys(variables('customAuthRuleResourceId'), variables('ehVersion')).primaryKey]" } -} \ No newline at end of file + } +} diff --git a/101-servicebus-queue/azuredeploy.json b/101-servicebus-queue/azuredeploy.json index 322019ad1014..972d2abb6dc5 100644 --- a/101-servicebus-queue/azuredeploy.json +++ b/101-servicebus-queue/azuredeploy.json @@ -19,6 +19,13 @@ "metadata": { "description": "Name of the Queue" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -30,11 +37,11 @@ "apiVersion": "2017-04-01", "name": "[parameters('serviceBusNamespaceName')]", "type": "Microsoft.ServiceBus/namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard" }, - "properties": { }, + "properties": {}, "resources": [ { "apiVersion": "2017-04-01", diff --git a/101-servicebus-topic-subscription-sqlfilter/azuredeploy.json b/101-servicebus-topic-subscription-sqlfilter/azuredeploy.json index 33a58b34c90f..54288d3d8b2a 100644 --- a/101-servicebus-topic-subscription-sqlfilter/azuredeploy.json +++ b/101-servicebus-topic-subscription-sqlfilter/azuredeploy.json @@ -1,82 +1,87 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "serviceBusNamespaceName": { - "type": "string", - "metadata": { - "description": "Name of the Service Bus Namespace" - } - }, - "serviceBusTopicName": { - "type": "string", - "metadata": { - "description": "Name of the Service Bus Topic" - } - }, - "serviceBusTopicSubscriptionName": { - "type": "string", - "metadata": { - "description": "Name of the Service Bus Topic Subscription" - } - }, - "serviceBusTopicSubscriptionSqlFilter": { - "type": "string", - "metadata": { - "description": "The SQL Filter of the Service Bus Topic Subscription" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "serviceBusNamespaceName": { + "type": "string", + "metadata": { + "description": "Name of the Service Bus Namespace" } }, - "variables": { + "serviceBusTopicName": { + "type": "string", + "metadata": { + "description": "Name of the Service Bus Topic" + } + }, + "serviceBusTopicSubscriptionName": { + "type": "string", + "metadata": { + "description": "Name of the Service Bus Topic Subscription" + } }, - "resources": [ - { - "apiVersion": "2017-04-01", - "name": "[parameters('serviceBusNamespaceName')]", - "type": "Microsoft.ServiceBus/namespaces", - "location": "[resourceGroup().location]", - "properties": { - }, - "resources": [ - { + "serviceBusTopicSubscriptionSqlFilter": { + "type": "string", + "metadata": { + "description": "The SQL Filter of the Service Bus Topic Subscription" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [ + { + "apiVersion": "2017-04-01", + "name": "[parameters('serviceBusNamespaceName')]", + "type": "Microsoft.ServiceBus/namespaces", + "location": "[parameters('location')]", + "properties": {}, + "resources": [ + { + "apiVersion": "2017-04-01", + "name": "[parameters('serviceBusTopicName')]", + "type": "topics", + "dependsOn": [ + "[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'))]" + ], + "properties": { + "path": "[parameters('serviceBusTopicName')]" + }, + "resources": [ + { "apiVersion": "2017-04-01", - "name": "[parameters('serviceBusTopicName')]", - "type": "topics", + "name": "[parameters('serviceBusTopicSubscriptionName')]", + "type": "subscriptions", "dependsOn": [ - "[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'))]" + "[parameters('serviceBusTopicName')]" ], - "properties": { - "path": "[parameters('serviceBusTopicName')]" - }, + "properties": {}, "resources": [ - { - "apiVersion": "2017-04-01", - "name": "[parameters('serviceBusTopicSubscriptionName')]", - "type": "subscriptions", - "dependsOn": [ - "[parameters('serviceBusTopicName')]" - ], - "properties": { - }, - "resources": [{ - "apiVersion": "2017-04-01", - "name": "[concat(parameters('serviceBusTopicSubscriptionName'), '-filter')]", - "type": "Rules", - "dependsOn": [ - "[parameters('serviceBusTopicSubscriptionName')]" - ], - "properties": { - "filter": { - "sqlExpression": "[parameters('serviceBusTopicSubscriptionSqlFilter')]" - } - } - }] + { + "apiVersion": "2017-04-01", + "name": "[concat(parameters('serviceBusTopicSubscriptionName'), '-filter')]", + "type": "Rules", + "dependsOn": [ + "[parameters('serviceBusTopicSubscriptionName')]" + ], + "properties": { + "filter": { + "sqlExpression": "[parameters('serviceBusTopicSubscriptionSqlFilter')]" + } } + } ] - } - ] - } - ], - "outputs": { + } + ] + } + ] } - } + ], + "outputs": {} +} diff --git a/101-servicebus-topic-subscription/azuredeploy.json b/101-servicebus-topic-subscription/azuredeploy.json index 908dc31387a8..081b4cf33a2e 100644 --- a/101-servicebus-topic-subscription/azuredeploy.json +++ b/101-servicebus-topic-subscription/azuredeploy.json @@ -25,6 +25,13 @@ "metadata": { "description": "Name of the Subscription" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -36,7 +43,7 @@ "apiVersion": "2017-04-01", "name": "[parameters('serviceBusNamespaceName')]", "type": "Microsoft.ServiceBus/namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard", "tier": "Standard" @@ -92,4 +99,4 @@ "value": "[listkeys(variables('authRuleResourceId'), '2017-04-01').primaryKey]" } } -} \ No newline at end of file +} diff --git a/101-servicebus-topic/azuredeploy.json b/101-servicebus-topic/azuredeploy.json index 9237a2f6019b..f4650d031abd 100644 --- a/101-servicebus-topic/azuredeploy.json +++ b/101-servicebus-topic/azuredeploy.json @@ -13,17 +13,22 @@ "metadata": { "description": "Name of the Service Bus Topic" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - "sbVersion": "2015-08-01" - }, + "variables": { }, "resources": [ { "apiVersion": "2015-08-01", "name": "[parameters('serviceBusNamespaceName')]", "type": "Microsoft.ServiceBus/namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {}, "resources": [ { @@ -42,4 +47,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/101-spinnaker-existing-vnet/azuredeploy.json b/101-spinnaker-existing-vnet/azuredeploy.json index da85c0474b5f..0ecbf0858c1f 100644 --- a/101-spinnaker-existing-vnet/azuredeploy.json +++ b/101-spinnaker-existing-vnet/azuredeploy.json @@ -37,6 +37,13 @@ "metadata": { "description": "Name of the subnet in the virtual network you want to use" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -60,7 +67,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, @@ -71,7 +78,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -83,7 +90,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" ], @@ -108,7 +115,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" @@ -167,7 +174,7 @@ "type": "extensions", "name": "[variables('vmExtensionName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" ], @@ -199,4 +206,4 @@ "value": "[concat('ssh -L 9000:localhost:9000 -L 8084:localhost:8084 ', parameters('adminUsername'), '@', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]" } } -} \ No newline at end of file +} diff --git a/101-spinnaker-existing-vnet/prereqs/prereq.azuredeploy.json b/101-spinnaker-existing-vnet/prereqs/prereq.azuredeploy.json index bd8d5fd558bc..6e00a3eb1da1 100644 --- a/101-spinnaker-existing-vnet/prereqs/prereq.azuredeploy.json +++ b/101-spinnaker-existing-vnet/prereqs/prereq.azuredeploy.json @@ -1,52 +1,60 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "existingVirtualNetworkName": "existingVirtualNetwork", - "existingVnetPrefix": "10.0.0.0/16", - "existingVnetFESubnetName": "subnet-1", - "existingVnetFESubnetPrefix": "10.0.1.0/24" - }, - "resources": [ - { - "name": "[variables('existingVirtualNetworkName')]", - "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", - "apiVersion": "2017-04-01", - "dependsOn": [], - "tags": { - "displayName": "VirtualNetwork" - }, + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "existingVirtualNetworkName": "existingVirtualNetwork", + "existingVnetPrefix": "10.0.0.0/16", + "existingVnetFESubnetName": "subnet-1", + "existingVnetFESubnetPrefix": "10.0.1.0/24" + }, + "resources": [ + { + "name": "[variables('existingVirtualNetworkName')]", + "type": "Microsoft.Network/virtualNetworks", + "location": "[parameters('location')]", + "apiVersion": "2017-04-01", + "dependsOn": [], + "tags": { + "displayName": "VirtualNetwork" + }, + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('existingVnetPrefix')]" + ] + }, + "subnets": [ + { + "name": "[variables('existingVnetFESubnetName')]", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('existingVnetPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('existingVnetFESubnetName')]", - "properties": { - "addressPrefix": "[variables('existingVnetFESubnetPrefix')]" - } - } - ] + "addressPrefix": "[variables('existingVnetFESubnetPrefix')]" } - } - ], - "outputs": { - "existingVirtualNetworkResourceGroup": { - "type": "string", - "value": "[resourceGroup().name]" - }, - "existingVirtualNetworkName": { - "type": "string", - "value": "[variables('existingVirtualNetworkName')]" - }, - "subnetName": { - "type": "string", - "value": "[variables('existingVnetFESubnetName')]" - } + } + ] + } + } + ], + "outputs": { + "existingVirtualNetworkResourceGroup": { + "type": "string", + "value": "[resourceGroup().name]" + }, + "existingVirtualNetworkName": { + "type": "string", + "value": "[variables('existingVirtualNetworkName')]" + }, + "subnetName": { + "type": "string", + "value": "[variables('existingVnetFESubnetName')]" } -} \ No newline at end of file + } +} diff --git a/101-spinnaker/azuredeploy.json b/101-spinnaker/azuredeploy.json index c11d7af9716c..989607ca9f92 100644 --- a/101-spinnaker/azuredeploy.json +++ b/101-spinnaker/azuredeploy.json @@ -19,6 +19,13 @@ "metadata": { "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -41,18 +48,18 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, "kind": "Storage", - "properties": { } + "properties": {} }, { "apiVersion": "2016-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -64,7 +71,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -85,7 +92,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" @@ -111,7 +118,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" @@ -170,7 +177,7 @@ "type": "extensions", "name": "[variables('vmExtensionName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" ], diff --git a/101-sql-elastic-pool-create/azuredeploy.json b/101-sql-elastic-pool-create/azuredeploy.json index 45df8fe99296..aa3bb022b06d 100644 --- a/101-sql-elastic-pool-create/azuredeploy.json +++ b/101-sql-elastic-pool-create/azuredeploy.json @@ -1,139 +1,146 @@ { - "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "administratorLogin": { - "type": "string", - "metadata": { - "description": "The SQL Server administrator login" - } - }, - "administratorLoginPassword": { - "type": "securestring", - "metadata": { - "description": "The SQL Server administrator login password." - } - }, - "serverName": { - "type": "string", - "metadata": { - "description": "The SQL Server name." - } - }, - "elasticPoolName": { - "type": "string", - "metadata": { - "description": "The Elastic Pool name." - } - }, - "edition": { - "type": "string", - "defaultValue": "Standard", - "allowedValues": [ - "Basic", - "Standard", - "Premium" - ], - "metadata": { - "description": "The Elastic Pool edition." - } - }, - "poolDtu": { - "type": "int", - "metadata": { - "description": "The Elastic Pool DTU." - } - }, - "databaseDtuMin": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The Elastic Pool database DTU min." - } - }, - "databaseDtuMax": { - "type": "int", - "metadata": { - "description": "The Elastic Pool database DTU max." - } - }, - "databasesNames": { - "type": "array", - "defaultValue": [ - "db1", - "db2" - ], - "metadata": { - "description": "The SQL Databases names." - } - }, - "databaseCollation": { - "type": "string", - "defaultValue": "SQL_Latin1_General_CP1_CI_AS", - "metadata": { - "description": "The SQL Database collation." - } - } - }, - "variables": {}, - "resources": [ - { - "apiVersion": "2014-04-01-preview", - "location": "[resourceGroup().location]", - "name": "[parameters('serverName')]", - "properties": { - "administratorLogin": "[parameters('administratorLogin')]", - "administratorLoginPassword": "[parameters('administratorLoginPassword')]", - "version": "12.0" - }, - "type": "Microsoft.Sql/servers" - }, - { - "apiVersion": "2014-04-01", - "dependsOn": [ - "[concat('Microsoft.Sql/servers/', parameters('serverName'))]" - ], - "location": "[resourceGroup().location]", - "name": "[concat(parameters('serverName'), '/', parameters('elasticPoolName'))]", - "properties": { - "edition": "[parameters('edition')]", - "dtu": "[parameters('poolDtu')]", - "databaseDtuMin": "[parameters('databaseDtuMin')]", - "databaseDtuMax": "[parameters('databaseDtuMax')]" - }, - "type": "Microsoft.Sql/servers/elasticPools" - }, - { - "type": "Microsoft.Sql/servers/databases", - "name": "[concat(parameters('serverName'), '/', parameters('databasesNames')[copyIndex()])]", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01-preview", - "dependsOn": [ - "[concat('Microsoft.Sql/servers/', parameters('serverName'))]", - "[concat('Microsoft.Sql/servers/', parameters('serverName') ,'/elasticpools/', parameters('elasticPoolName'))]" - ], - "properties": { - "collation": "[parameters('databaseCollation')]", - "requestedServiceObjectiveName": "ElasticPool", - "elasticPoolName": "[parameters('elasticPoolName')]" - }, - "copy": { - "name": "addDatabasesInElasticPool", - "count": "[length(parameters('databasesNames'))]" - } - }, - { - "apiVersion": "2014-04-01-preview", - "dependsOn": [ - "[concat('Microsoft.Sql/servers/', parameters('serverName'))]" - ], - "location": "[resourceGroup().location]", - "name": "[concat(parameters('serverName'), '/', 'AllowAllWindowsAzureIps')]", - "properties": { - "endIpAddress": "0.0.0.0", - "startIpAddress": "0.0.0.0" - }, - "type": "Microsoft.Sql/servers/firewallrules" - } - ] -} \ No newline at end of file + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "administratorLogin": { + "type": "string", + "metadata": { + "description": "The SQL Server administrator login" + } + }, + "administratorLoginPassword": { + "type": "securestring", + "metadata": { + "description": "The SQL Server administrator login password." + } + }, + "serverName": { + "type": "string", + "metadata": { + "description": "The SQL Server name." + } + }, + "elasticPoolName": { + "type": "string", + "metadata": { + "description": "The Elastic Pool name." + } + }, + "edition": { + "type": "string", + "defaultValue": "Standard", + "allowedValues": [ + "Basic", + "Standard", + "Premium" + ], + "metadata": { + "description": "The Elastic Pool edition." + } + }, + "poolDtu": { + "type": "int", + "metadata": { + "description": "The Elastic Pool DTU." + } + }, + "databaseDtuMin": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The Elastic Pool database DTU min." + } + }, + "databaseDtuMax": { + "type": "int", + "metadata": { + "description": "The Elastic Pool database DTU max." + } + }, + "databasesNames": { + "type": "array", + "defaultValue": [ + "db1", + "db2" + ], + "metadata": { + "description": "The SQL Databases names." + } + }, + "databaseCollation": { + "type": "string", + "defaultValue": "SQL_Latin1_General_CP1_CI_AS", + "metadata": { + "description": "The SQL Database collation." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [ + { + "apiVersion": "2014-04-01-preview", + "location": "[parameters('location')]", + "name": "[parameters('serverName')]", + "properties": { + "administratorLogin": "[parameters('administratorLogin')]", + "administratorLoginPassword": "[parameters('administratorLoginPassword')]", + "version": "12.0" + }, + "type": "Microsoft.Sql/servers" + }, + { + "apiVersion": "2014-04-01", + "dependsOn": [ + "[concat('Microsoft.Sql/servers/', parameters('serverName'))]" + ], + "location": "[parameters('location')]", + "name": "[concat(parameters('serverName'), '/', parameters('elasticPoolName'))]", + "properties": { + "edition": "[parameters('edition')]", + "dtu": "[parameters('poolDtu')]", + "databaseDtuMin": "[parameters('databaseDtuMin')]", + "databaseDtuMax": "[parameters('databaseDtuMax')]" + }, + "type": "Microsoft.Sql/servers/elasticPools" + }, + { + "type": "Microsoft.Sql/servers/databases", + "name": "[concat(parameters('serverName'), '/', parameters('databasesNames')[copyIndex()])]", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01-preview", + "dependsOn": [ + "[concat('Microsoft.Sql/servers/', parameters('serverName'))]", + "[concat('Microsoft.Sql/servers/', parameters('serverName') ,'/elasticpools/', parameters('elasticPoolName'))]" + ], + "properties": { + "collation": "[parameters('databaseCollation')]", + "requestedServiceObjectiveName": "ElasticPool", + "elasticPoolName": "[parameters('elasticPoolName')]" + }, + "copy": { + "name": "addDatabasesInElasticPool", + "count": "[length(parameters('databasesNames'))]" + } + }, + { + "apiVersion": "2014-04-01-preview", + "dependsOn": [ + "[concat('Microsoft.Sql/servers/', parameters('serverName'))]" + ], + "location": "[parameters('location')]", + "name": "[concat(parameters('serverName'), '/', 'AllowAllWindowsAzureIps')]", + "properties": { + "endIpAddress": "0.0.0.0", + "startIpAddress": "0.0.0.0" + }, + "type": "Microsoft.Sql/servers/firewallrules" + } + ] +} diff --git a/101-sql-with-failover-group/azuredeploy.json b/101-sql-with-failover-group/azuredeploy.json index 5c44898aec29..5419261af247 100644 --- a/101-sql-with-failover-group/azuredeploy.json +++ b/101-sql-with-failover-group/azuredeploy.json @@ -1,128 +1,135 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "sqlServerPrimaryName": { - "type": "string", - "metadata": { - "description": "The name of the primary SQL Server." - } - }, - "sqlServerPrimaryAdminUsername": { - "type": "string", - "metadata": { - "description": "The administrator username of the primary SQL Server." - } - }, - "sqlServerPrimaryAdminPassword": { - "type": "securestring", - "metadata": { - "description": "The administrator password of the primary SQL Server." - } - }, - "sqlServerSecondaryName": { - "type": "string", - "metadata": { - "description": "The name of the secondary SQL Server." - } - }, - "sqlServerSecondaryRegion": { - "type": "string", - "metadata": { - "description": "The location of the secondary SQL Server." - } - }, - "sqlServerSecondaryAdminUsername": { - "type": "string", - "metadata": { - "description": "The administrator username of the secondary SQL Server." - } - }, - "sqlServerSecondaryAdminPassword": { - "type": "securestring", - "metadata": { - "description": "The administrator password of the secondary SQL Server." - } - }, - "sqlFailoverGroupName": { - "type": "string", - "metadata": { - "description": "The name of the failover group." - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "sqlServerPrimaryName": { + "type": "string", + "metadata": { + "description": "The name of the primary SQL Server." + } }, - "variables": { - "sqlDatabaseName": "MyData", - "sqlDatabaseServiceObjective": "Basic", - "sqlDatabaseEdition": "Basic" + "sqlServerPrimaryAdminUsername": { + "type": "string", + "metadata": { + "description": "The administrator username of the primary SQL Server." + } }, - "resources": [ + "sqlServerPrimaryAdminPassword": { + "type": "securestring", + "metadata": { + "description": "The administrator password of the primary SQL Server." + } + }, + "sqlServerSecondaryName": { + "type": "string", + "metadata": { + "description": "The name of the secondary SQL Server." + } + }, + "sqlServerSecondaryRegion": { + "type": "string", + "metadata": { + "description": "The location of the secondary SQL Server." + } + }, + "sqlServerSecondaryAdminUsername": { + "type": "string", + "metadata": { + "description": "The administrator username of the secondary SQL Server." + } + }, + "sqlServerSecondaryAdminPassword": { + "type": "securestring", + "metadata": { + "description": "The administrator password of the secondary SQL Server." + } + }, + "sqlFailoverGroupName": { + "type": "string", + "metadata": { + "description": "The name of the failover group." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "sqlDatabaseName": "MyData", + "sqlDatabaseServiceObjective": "Basic", + "sqlDatabaseEdition": "Basic" + }, + "resources": [ + { + "type": "Microsoft.Sql/servers", + "kind": "v12.0", + "name": "[parameters('sqlServerPrimaryName')]", + "apiVersion": "2014-04-01-preview", + "location": "[parameters('location')]", + "properties": { + "administratorLogin": "[parameters('sqlServerPrimaryAdminUsername')]", + "administratorLoginPassword": "[parameters('sqlServerPrimaryAdminPassword')]", + "version": "12.0" + }, + "resources": [ { - "type": "Microsoft.Sql/servers", - "kind": "v12.0", - "name": "[parameters('sqlServerPrimaryName')]", - "apiVersion": "2014-04-01-preview", - "location": "[resourceGroup().location]", - "properties": { - "administratorLogin": "[parameters('sqlServerPrimaryAdminUsername')]", - "administratorLoginPassword": "[parameters('sqlServerPrimaryAdminPassword')]", - "version": "12.0" + "apiVersion": "2015-05-01-preview", + "type": "failoverGroups", + "name": "[parameters('sqlFailoverGroupName')]", + "properties": { + "serverName": "[parameters('sqlServerPrimaryName')]", + "partnerServers": [ + { + "id": "[resourceId('Microsoft.Sql/servers/', parameters('sqlServerSecondaryName'))]" + } + ], + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 60 }, - "resources": [ - { - "apiVersion": "2015-05-01-preview", - "type": "failoverGroups", - "name": "[parameters('sqlFailoverGroupName')]", - "properties": { - "serverName": "[parameters('sqlServerPrimaryName')]", - "partnerServers": [ - { - "id": "[resourceId('Microsoft.Sql/servers/', parameters('sqlServerSecondaryName'))]" - } - ], - "readWriteEndpoint": { - "failoverPolicy": "Automatic", - "failoverWithDataLossGracePeriodMinutes": 60 - }, - "readOnlyEndpoint": { - "failoverPolicy": "Disabled" - }, - "databases": [ - "[resourceId('Microsoft.Sql/servers/databases', parameters('sqlServerPrimaryName'), variables('sqlDatabaseName'))]" - ] - }, - "dependsOn": [ - "[parameters('sqlServerPrimaryName')]", - "[resourceId('Microsoft.Sql/servers/databases', parameters('sqlServerPrimaryName'), variables('sqlDatabaseName'))]", - "[resourceId('Microsoft.Sql/servers', parameters('sqlServerSecondaryName'))]" - ] - }, - { - "name": "[variables('sqlDatabaseName')]", - "type": "databases", - "apiVersion": "2014-04-01-preview", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[parameters('sqlServerPrimaryName')]" - ], - "properties": { - "edition": "[variables('sqlDatabaseEdition')]", - "requestedServiceObjectiveName": "[variables('sqlDatabaseServiceObjective')]" - } - } + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "databases": [ + "[resourceId('Microsoft.Sql/servers/databases', parameters('sqlServerPrimaryName'), variables('sqlDatabaseName'))]" ] + }, + "dependsOn": [ + "[parameters('sqlServerPrimaryName')]", + "[resourceId('Microsoft.Sql/servers/databases', parameters('sqlServerPrimaryName'), variables('sqlDatabaseName'))]", + "[resourceId('Microsoft.Sql/servers', parameters('sqlServerSecondaryName'))]" + ] }, { - "type": "Microsoft.Sql/servers", - "kind": "v12.0", - "name": "[parameters('sqlServerSecondaryName')]", - "apiVersion": "2014-04-01-preview", - "location": "[parameters('sqlServerSecondaryRegion')]", - "properties": { - "administratorLogin": "[parameters('sqlServerSecondaryAdminUsername')]", - "administratorLoginPassword": "[parameters('sqlServerSecondaryAdminPassword')]", - "version": "12.0" - } + "name": "[variables('sqlDatabaseName')]", + "type": "databases", + "apiVersion": "2014-04-01-preview", + "location": "[parameters('location')]", + "dependsOn": [ + "[parameters('sqlServerPrimaryName')]" + ], + "properties": { + "edition": "[variables('sqlDatabaseEdition')]", + "requestedServiceObjectiveName": "[variables('sqlDatabaseServiceObjective')]" + } } - ] + ] + }, + { + "type": "Microsoft.Sql/servers", + "kind": "v12.0", + "name": "[parameters('sqlServerSecondaryName')]", + "apiVersion": "2014-04-01-preview", + "location": "[parameters('sqlServerSecondaryRegion')]", + "properties": { + "administratorLogin": "[parameters('sqlServerSecondaryAdminUsername')]", + "administratorLoginPassword": "[parameters('sqlServerSecondaryAdminPassword')]", + "version": "12.0" + } + } + ] } diff --git a/101-storage-account-create/azuredeploy.json b/101-storage-account-create/azuredeploy.json index e525d7c0279a..97b6ad758235 100644 --- a/101-storage-account-create/azuredeploy.json +++ b/101-storage-account-create/azuredeploy.json @@ -14,6 +14,13 @@ "metadata": { "description": "Storage Account type" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -24,19 +31,18 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { - "name": "[parameters('storageAccountType')]" + "name": "[parameters('storageAccountType')]" }, - "kind": "Storage", - "properties": { - } + "kind": "Storage", + "properties": {} } ], "outputs": { - "storageAccountName": { - "type": "string", - "value": "[variables('storageAccountName')]" - } + "storageAccountName": { + "type": "string", + "value": "[variables('storageAccountName')]" + } } } diff --git a/101-subnet-add-vnet-existing/azuredeploy.json b/101-subnet-add-vnet-existing/azuredeploy.json index 36c20694121b..56ef2870e953 100644 --- a/101-subnet-add-vnet-existing/azuredeploy.json +++ b/101-subnet-add-vnet-existing/azuredeploy.json @@ -20,6 +20,13 @@ "metadata": { "description": "Address space of the subnet to add" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -30,11 +37,11 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks/subnets", "name": "[concat(parameters('existingVNETName'), '/', parameters('newSubnetName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressPrefix": "[parameters('newSubnetAddressPrefix')]" } } ], "outputs": {} -} \ No newline at end of file +} diff --git a/101-subnet-add-vnet-existing/prereqs/prereq.azuredeploy.json b/101-subnet-add-vnet-existing/prereqs/prereq.azuredeploy.json index 720f423c7602..16734368692f 100644 --- a/101-subnet-add-vnet-existing/prereqs/prereq.azuredeploy.json +++ b/101-subnet-add-vnet-existing/prereqs/prereq.azuredeploy.json @@ -1,16 +1,13 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": { - }, + "parameters": {}, "variables": { "firstVNETName": "vnet-01", "firstVNETLocation": "West US", "firstVNETPrefix": "10.0.0.0/16", "firstVNETFESubnetName": "subnet01", "firstVNETFESubnetPrefix": "10.0.1.0/24" - - }, "resources": [ { @@ -18,7 +15,7 @@ "type": "Microsoft.Network/virtualNetworks", "location": "[variables('firstVNETLocation')]", "apiVersion": "2015-06-15", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "firstVNET" }, diff --git a/101-ubuntu-mate-desktop-vscode/azuredeploy.json b/101-ubuntu-mate-desktop-vscode/azuredeploy.json index cd1536effc73..b758ceb377db 100644 --- a/101-ubuntu-mate-desktop-vscode/azuredeploy.json +++ b/101-ubuntu-mate-desktop-vscode/azuredeploy.json @@ -40,6 +40,13 @@ "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": { @@ -66,7 +73,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('infraStorageAccountName')]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This storage account is for infrastructure (e.g. vm disks)", "kind": "Storage", "sku": { @@ -78,7 +85,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -90,7 +97,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkSecurityGroups", "name": "nsg", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -128,7 +135,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', 'nsg')]" ], @@ -155,7 +162,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -181,7 +188,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('infraStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -224,7 +231,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/CustomScript')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -250,4 +257,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/101-visual-studio-team-services-project-create/azuredeploy.json b/101-visual-studio-team-services-project-create/azuredeploy.json index 9c6195eb1d76..eaaeb6dc175d 100644 --- a/101-visual-studio-team-services-project-create/azuredeploy.json +++ b/101-visual-studio-team-services-project-create/azuredeploy.json @@ -36,6 +36,13 @@ "metadata": { "description": "The version control of the Visual Studio Team Services project's source code: Git or Tfvc." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -43,7 +50,7 @@ { "name": "[parameters('accountName')]", "type": "microsoft.visualstudio/account", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01-preview", "properties": { "operationType": "Create", @@ -53,7 +60,7 @@ { "name": "[parameters('projectName')]", "type": "project", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01-preview", "dependsOn": [ "[concat('microsoft.visualstudio/account/', parameters('accountName'))]" @@ -66,4 +73,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/101-vm-automatic-static-ip/azuredeploy.json b/101-vm-automatic-static-ip/azuredeploy.json index 0f92d77a7f98..c9d4f7cd14e6 100644 --- a/101-vm-automatic-static-ip/azuredeploy.json +++ b/101-vm-automatic-static-ip/azuredeploy.json @@ -28,6 +28,13 @@ "description": "The sasToken required to access baseURL. 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": { @@ -43,7 +50,7 @@ "apiVersion": "2018-03-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -64,7 +71,7 @@ "apiVersion": "2018-03-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('virtualNetworkName')]" ], @@ -86,7 +93,7 @@ "apiVersion": "2017-12-01", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "updateIp" ], @@ -145,8 +152,8 @@ ], "outputs": { "privateIp": { - "type": "string", - "value": "[reference(variables('nicName')).ipConfigurations[0].properties.privateIPAddress]" + "type": "string", + "value": "[reference(variables('nicName')).ipConfigurations[0].properties.privateIPAddress]" } } } diff --git a/101-vm-automatic-static-ip/nested/update-nic.json b/101-vm-automatic-static-ip/nested/update-nic.json index eb8e73ac74ee..b39e8f12c896 100644 --- a/101-vm-automatic-static-ip/nested/update-nic.json +++ b/101-vm-automatic-static-ip/nested/update-nic.json @@ -2,24 +2,30 @@ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { - "nicName": { - "type": "string" - }, - "subnetRef": { - "type": "string" - }, - "privateIp": { - "type": "string" + "nicName": { + "type": "string" + }, + "subnetRef": { + "type": "string" + }, + "privateIp": { + "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." } + } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", "apiVersion": "2018-03-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -37,4 +43,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/101-vm-customdata/azuredeploy.json b/101-vm-customdata/azuredeploy.json index 995eb8f478db..e2b8ba6f52b0 100644 --- a/101-vm-customdata/azuredeploy.json +++ b/101-vm-customdata/azuredeploy.json @@ -45,6 +45,13 @@ "metadata": { "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values: 12.04.5-LTS, 14.04.2-LTS, 15.10." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -58,7 +65,6 @@ "addressPrefix": "10.0.0.0/16", "subnet1Name": "Subnet-1", "subnet1Prefix": "10.0.0.0/24", - "vmStorageAccountContainerName": "vhds", "publicIPAddressType": "Dynamic", "storageAccountType": "Standard_LRS", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", @@ -70,7 +76,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -79,7 +85,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -91,7 +97,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -112,7 +118,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -138,7 +144,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -180,4 +186,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-vm-from-user-image/azuredeploy.json b/101-vm-from-user-image/azuredeploy.json index 0bcefe5a3954..a4e52bf42e90 100644 --- a/101-vm-from-user-image/azuredeploy.json +++ b/101-vm-from-user-image/azuredeploy.json @@ -88,6 +88,13 @@ "metadata": { "description": "Resource group of the existing VNET" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -104,7 +111,7 @@ "type": "Microsoft.Compute/images", "apiVersion": "2016-04-30-preview", "name": "[variables('imageName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "storageProfile": { "osDisk": { @@ -143,7 +150,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -155,7 +162,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "Microsoft.Resources/deployments/vnet-template" @@ -181,7 +188,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]", "[variables('imageName')]" diff --git a/101-vm-from-user-image/newvnet.json b/101-vm-from-user-image/newvnet.json index 15c711e05914..bafeb58999f4 100644 --- a/101-vm-from-user-image/newvnet.json +++ b/101-vm-from-user-image/newvnet.json @@ -19,19 +19,27 @@ "metadata": { "description": "Subnet Name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "apiVersion": "2016-03-30", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { - "addressPrefixes": [ "10.0.0.0/16" ] + "addressPrefixes": [ + "10.0.0.0/16" + ] }, "subnets": [ { diff --git a/101-vm-from-user-image/prereqs/prereq.azuredeploy.json b/101-vm-from-user-image/prereqs/prereq.azuredeploy.json index 88f46487b305..192e4e870178 100644 --- a/101-vm-from-user-image/prereqs/prereq.azuredeploy.json +++ b/101-vm-from-user-image/prereqs/prereq.azuredeploy.json @@ -1,35 +1,43 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store VM disks", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + } + ], + "outputs": { + "storageAccountName": { + "type": "string", + "value": "[variables('storageAccountName')]" }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "comments": "Storage account used to store VM disks", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": { - - } - }], - "outputs": { - "storageAccountName": { - "type": "string", - "value": "[variables('storageAccountName')]" - }, - "rgName": { - "type": "string", - "value": "[resourceGroup().name]" - } + "rgName": { + "type": "string", + "value": "[resourceGroup().name]" } -} \ No newline at end of file + } +} diff --git a/101-vm-full-disk-encrypted-rhel-unmanaged/azuredeploy.json b/101-vm-full-disk-encrypted-rhel-unmanaged/azuredeploy.json index d0df87c6c0f1..fe1d8c553999 100644 --- a/101-vm-full-disk-encrypted-rhel-unmanaged/azuredeploy.json +++ b/101-vm-full-disk-encrypted-rhel-unmanaged/azuredeploy.json @@ -57,6 +57,13 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -99,7 +106,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', variables('setupRaidExtensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Resources/deployments', variables('createVmDeploymentName'))]" ], diff --git a/101-vm-full-disk-encrypted-rhel/azuredeploy.json b/101-vm-full-disk-encrypted-rhel/azuredeploy.json index c8ad28db424a..bcbffdfd5326 100644 --- a/101-vm-full-disk-encrypted-rhel/azuredeploy.json +++ b/101-vm-full-disk-encrypted-rhel/azuredeploy.json @@ -57,6 +57,13 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -99,7 +106,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', variables('setupRaidExtensionName'))]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Resources/deployments', variables('createVmDeploymentName'))]" ], diff --git a/101-vm-linux-serial-output/azuredeploy.json b/101-vm-linux-serial-output/azuredeploy.json index c5054800a06a..8c465a0e2cba 100644 --- a/101-vm-linux-serial-output/azuredeploy.json +++ b/101-vm-linux-serial-output/azuredeploy.json @@ -19,13 +19,19 @@ "metadata": { "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "storageAccountName": "[concat(uniquestring(resourceGroup().id),'storage')]", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", - "OSDiskName": "serialOutputSampleOSDisk", "imageSKU": "14.04.2-LTS", "nicName": "serialOutputSampleNic", "addressPrefix": "10.0.0.0/16", @@ -34,7 +40,6 @@ "storageAccountType": "Standard_LRS", "publicIPAddressName": "serialOutputSamplePublicIP", "publicIPAddressType": "Dynamic", - "vmStorageAccountContainerName": "vhds", "vmName": "serialOutputSampleVM", "vmSize": "Standard_D2", "virtualNetworkName": "serialOutputSampleVNET", @@ -47,7 +52,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -56,7 +61,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -68,7 +73,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -89,7 +94,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -115,7 +120,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -156,4 +161,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-vm-multiple-data-disk/azuredeploy.json b/101-vm-multiple-data-disk/azuredeploy.json index cb197a1496b0..34212f28fc8d 100644 --- a/101-vm-multiple-data-disk/azuredeploy.json +++ b/101-vm-multiple-data-disk/azuredeploy.json @@ -31,6 +31,13 @@ "metadata": { "description": "Size of each data disk in GB" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -38,7 +45,6 @@ "addressPrefix": "10.0.0.0/16", "subnet1Name": "Subnet-1", "subnet1Prefix": "10.0.0.0/24", - "vmStorageAccountContainerName": "vhds", "imagePublisher": "MicrosoftWindowsServer", "imageOffer": "WindowsServer", "imageSKU": "2012-Datacenter", @@ -58,7 +64,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -67,7 +73,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -79,7 +85,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -100,7 +106,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -126,7 +132,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -189,4 +195,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-vm-multiple-ipconfig/azuredeploy.json b/101-vm-multiple-ipconfig/azuredeploy.json index 3bec0fbe66f8..aa3b19bfc529 100644 --- a/101-vm-multiple-ipconfig/azuredeploy.json +++ b/101-vm-multiple-ipconfig/azuredeploy.json @@ -62,6 +62,13 @@ "metadata": { "description": "The Windows/Linux image for the selected VM. " } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -84,7 +91,7 @@ "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -96,7 +103,7 @@ "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName2')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType2')]", "dnsSettings": { @@ -108,7 +115,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vnetName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -132,7 +139,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", @@ -182,7 +189,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" ], diff --git a/101-vm-secure-password/azuredeploy.json b/101-vm-secure-password/azuredeploy.json index 21fe0d141f0e..2ebf7c41a20f 100644 --- a/101-vm-secure-password/azuredeploy.json +++ b/101-vm-secure-password/azuredeploy.json @@ -32,6 +32,13 @@ "metadata": { "description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: 2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -45,7 +52,6 @@ "storageAccountType": "Standard_LRS", "publicIPAddressName": "myPublicIP", "publicIPAddressType": "Dynamic", - "vmStorageAccountContainerName": "vhds", "vmName": "SimpleWindowsVM", "vmSize": "Standard_A1", "virtualNetworkName": "MyVNET", @@ -58,7 +64,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -67,7 +73,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -79,7 +85,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -100,7 +106,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -126,7 +132,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -174,4 +180,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-vm-simple-freebsd/azuredeploy.json b/101-vm-simple-freebsd/azuredeploy.json index 7440994dfd87..e545ea141c22 100644 --- a/101-vm-simple-freebsd/azuredeploy.json +++ b/101-vm-simple-freebsd/azuredeploy.json @@ -31,6 +31,13 @@ "metadata": { "description": "The FreeBSD version for the VM. This will pick a fully patched image of this given FreeBSD version." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -54,7 +61,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, @@ -65,7 +72,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -77,7 +84,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -98,7 +105,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -124,7 +131,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" diff --git a/101-vm-simple-linux-with-accelerated-networking/azuredeploy.json b/101-vm-simple-linux-with-accelerated-networking/azuredeploy.json index 9796f3858cee..d1841b8aa871 100644 --- a/101-vm-simple-linux-with-accelerated-networking/azuredeploy.json +++ b/101-vm-simple-linux-with-accelerated-networking/azuredeploy.json @@ -19,38 +19,39 @@ "metadata": { "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "ubuntuOSVersion": "16.04.0-LTS", - "nicName": "myVMNic", "addressPrefix": "10.0.0.0/16", "subnetName": "Subnet", "subnetPrefix": "10.0.0.0/24", - "storageAccountName": "[concat('stglinuxvm', uniquestring(resourceGroup().id))]", "storageAccountSkuName": "Standard_LRS", "storageAccountSkuType": "Standard", "storageAccountKind": "Storage", - "publicIPAddressName": "myPublicIP", "publicIPAddressType": "Dynamic", - "vmName": "MyUbuntuVM", "vmSize": "Standard_D3_v2", - "virtualNetworkName": "MyVNET" }, "resources": [ - { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountSkuName')]", "tier": "[variables('storageAccountSkuType')]" @@ -58,12 +59,11 @@ "kind": "[variables('storageAccountKind')]", "properties": {} }, - { "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -71,12 +71,11 @@ } } }, - { "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -93,12 +92,11 @@ ] } }, - { "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", "apiVersion": "2016-09-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -122,12 +120,11 @@ ] } }, - { "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -174,7 +171,6 @@ } } } - ], "outputs": { "hostname": { @@ -186,4 +182,4 @@ "value": "[concat('ssh ', parameters('adminUsername'), '@', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]" } } -} \ No newline at end of file +} diff --git a/101-vm-simple-linux/azuredeploy.json b/101-vm-simple-linux/azuredeploy.json index ae45baeaebd3..5d7dca16f888 100644 --- a/101-vm-simple-linux/azuredeploy.json +++ b/101-vm-simple-linux/azuredeploy.json @@ -32,6 +32,13 @@ "metadata": { "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -56,7 +63,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, @@ -67,7 +74,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -79,7 +86,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -100,7 +107,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -126,7 +133,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -184,4 +191,4 @@ "value": "[concat('ssh ', parameters('adminUsername'), '@', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]" } } -} \ No newline at end of file +} diff --git a/101-vm-simple-rhel-unmanaged/azuredeploy.json b/101-vm-simple-rhel-unmanaged/azuredeploy.json index dc184563215b..7b87d23a5868 100644 --- a/101-vm-simple-rhel-unmanaged/azuredeploy.json +++ b/101-vm-simple-rhel-unmanaged/azuredeploy.json @@ -19,6 +19,13 @@ "metadata": { "description": "Name for the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -46,7 +53,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -55,7 +62,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]" } @@ -64,7 +71,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -85,7 +92,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -111,7 +118,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -177,4 +184,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-vm-simple-rhel/azuredeploy.json b/101-vm-simple-rhel/azuredeploy.json index e3a5fe1fe667..3951de321155 100644 --- a/101-vm-simple-rhel/azuredeploy.json +++ b/101-vm-simple-rhel/azuredeploy.json @@ -19,16 +19,21 @@ "metadata": { "description": "Name for the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "computeResouresApiVersion": "2016-04-30-preview", "dataDisk1Name": "[concat(uniquestring(parameters('vmName')), 'datadisk1')]", "dataDisk2Name": "[concat(uniquestring(parameters('vmName')), 'datadisk2')]", "imagePublisher": "RedHat", "imageOffer": "RHEL", "imageSku": "7.2", - "OSDiskName": "[concat(uniquestring(parameters('vmName')), 'osdisk')]", "nicName": "[concat(uniquestring(parameters('vmName')), 'nic')]", "addressPrefix": "10.0.0.0/16", "subnetName": "Subnet", @@ -45,7 +50,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]" } @@ -54,7 +59,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -75,7 +80,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -101,7 +106,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "Tag1": "ManagedVM" }, @@ -149,4 +154,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-vm-simple-windows/azuredeploy.json b/101-vm-simple-windows/azuredeploy.json index fe51011a55c0..35c1a58044d6 100644 --- a/101-vm-simple-windows/azuredeploy.json +++ b/101-vm-simple-windows/azuredeploy.json @@ -34,6 +34,13 @@ "metadata": { "description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -52,7 +59,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, @@ -63,7 +70,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -75,7 +82,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -96,7 +103,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -122,7 +129,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" diff --git a/101-vm-sql-existing-autobackup-update/azuredeploy.json b/101-vm-sql-existing-autobackup-update/azuredeploy.json index ffab5284977a..c613979ae45b 100644 --- a/101-vm-sql-existing-autobackup-update/azuredeploy.json +++ b/101-vm-sql-existing-autobackup-update/azuredeploy.json @@ -1,90 +1,97 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "existingVirtualMachineName": { - "type": "string", - "metadata": { - "description": "Existing SQL Server virtual machine name" - } - }, - "sqlAutobackupRetentionPeriod": { - "type": "string", - "metadata": { - "description": "SQL Server Auto Backup Retention Period" - }, - "allowedValues":[ - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12", - "13", - "14", - "15", - "16", - "17", - "18", - "19", - "20", - "21", - "22", - "23", - "24", - "25", - "26", - "27", - "28", - "29", - "30" - ], - "defaultValue":"2" - }, - "sqlAutobackupStorageAccountName": { - "type": "string", - "metadata": { - "description": "SQL Server Auto Backup Storage Account Name" - } - }, - "sqlAutobackupEncryptionPassword": { - "type": "string", - "metadata": { - "description": "SQL Server Auto Backup Encryption Password" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "existingVirtualMachineName": { + "type": "string", + "metadata": { + "description": "Existing SQL Server virtual machine name" + } }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('existingVirtualMachineName'), '/SqlIaasExtension')]", - "location": "[resourceGroup().location]", - "properties": { - "type": "SqlIaaSAgent", - "publisher": "Microsoft.SqlServer.Management", - "typeHandlerVersion": "1.2", - "autoUpgradeMinorVersion": true, - "settings": { - "AutoBackupSettings": { - "Enable": true, - "RetentionPeriod": "[parameters('sqlAutobackupRetentionPeriod')]", - "EnableEncryption": true - } - }, - "protectedSettings": { - "StorageUrl": "[reference(resourceId('Microsoft.Storage/storageAccounts', parameters('sqlAutobackupStorageAccountName')), '2015-06-15').primaryEndpoints['blob']]", - "StorageAccessKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('sqlAutobackupStorageAccountName')), '2015-06-15').key1]", - "Password": "[parameters('sqlAutobackupEncryptionPassword')]" - } - } + "sqlAutobackupRetentionPeriod": { + "type": "string", + "metadata": { + "description": "SQL Server Auto Backup Retention Period" + }, + "allowedValues": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30" + ], + "defaultValue": "2" + }, + "sqlAutobackupStorageAccountName": { + "type": "string", + "metadata": { + "description": "SQL Server Auto Backup Storage Account Name" + } + }, + "sqlAutobackupEncryptionPassword": { + "type": "string", + "metadata": { + "description": "SQL Server Auto Backup Encryption Password" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('existingVirtualMachineName'), '/SqlIaasExtension')]", + "location": "[parameters('location')]", + "properties": { + "type": "SqlIaaSAgent", + "publisher": "Microsoft.SqlServer.Management", + "typeHandlerVersion": "1.2", + "autoUpgradeMinorVersion": true, + "settings": { + "AutoBackupSettings": { + "Enable": true, + "RetentionPeriod": "[parameters('sqlAutobackupRetentionPeriod')]", + "EnableEncryption": true + } + }, + "protectedSettings": { + "StorageUrl": "[reference(resourceId('Microsoft.Storage/storageAccounts', parameters('sqlAutobackupStorageAccountName')), '2015-06-15').primaryEndpoints['blob']]", + "StorageAccessKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('sqlAutobackupStorageAccountName')), '2015-06-15').key1]", + "Password": "[parameters('sqlAutobackupEncryptionPassword')]" } - ], - "outputs": {} -} \ No newline at end of file + } + } + ], + "outputs": {} +} diff --git a/101-vm-sql-existing-autobackup-update/prereqs/prereq.azuredeploy.json b/101-vm-sql-existing-autobackup-update/prereqs/prereq.azuredeploy.json index 97a6f969cadc..ecf9259df8f6 100644 --- a/101-vm-sql-existing-autobackup-update/prereqs/prereq.azuredeploy.json +++ b/101-vm-sql-existing-autobackup-update/prereqs/prereq.azuredeploy.json @@ -1,272 +1,281 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "metadata": { - "description": "Username to access the Virtual Machines" - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password to access the Virtual Machines" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username to access the Virtual Machines" + } }, - "variables": { - "storageAccountName1": "[concat(uniqueString(resourceGroup().id),'storage1')]", - "storageAccountName2": "[concat(uniqueString(resourceGroup().id),'storage2')]", - "vmNSGName": "ExistingNSG", - "ipAddressName": "ExistingPip", - "virtualNetworkName": "ExistingVnet", - "vmNicName": "ExistingNic", - "vmName": "ExistingWinvm" + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Password to access the Virtual Machines" + } }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName1')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "comments": "Storage account used to store VM disks", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": { - - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountName1": "[concat(uniqueString(resourceGroup().id),'storage1')]", + "storageAccountName2": "[concat(uniqueString(resourceGroup().id),'storage2')]", + "vmNSGName": "ExistingNSG", + "ipAddressName": "ExistingPip", + "virtualNetworkName": "ExistingVnet", + "vmNicName": "ExistingNic", + "vmName": "ExistingWinvm" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName1')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store VM disks", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName2')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store diagnostics and backup data", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('vmNSGName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "NSG for the VM subnet.", + "tags": { + "displayName": "VM NSG" + }, + "properties": { + "securityRules": [] + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('ipAddressName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": " Public IP used by the Jump VM", + "tags": { + "displayName": "VM Public IP" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "idleTimeoutInMinutes": 4 + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', variables('vmNSGName'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName2')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "comments": "Storage account used to store diagnostics and backup data", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", + "subnets": [ + { + "name": "default", "properties": { - + "addressPrefix": "10.0.1.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNSGName'))]" + } } - }, - { - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('vmNSGName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "NSG for the VM subnet.", - "tags": { - "displayName": "VM NSG" - }, + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('vmNicName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "NIC for the VM", + "tags": { + "displayName": "VM NIC" + }, + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "securityRules": [ - - ] + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('ipAddressName'))]" + }, + "subnet": { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'),'default')]" + } } + } + ] + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "Windows VM", + "tags": { + "displayName": "Virtual Machine" + }, + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName1'))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('vmNicName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" }, - { - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('ipAddressName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": " Public IP used by the Jump VM", - "tags": { - "displayName": "VM Public IP" - }, - "properties": { - "publicIPAllocationMethod": "Static", - "idleTimeoutInMinutes": 4 - } + "osProfile": { + "computerName": "windowsvm", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]", + "windowsConfiguration": { + "provisionVmAgent": "true" + } }, - { - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" + "storageProfile": { + "imageReference": { + "publisher": "MicrosoftSQLServer", + "offer": "SQL2014SP2-WS2012R2", + "sku": "Enterprise", + "version": "latest" + }, + "osDisk": { + "name": "[variables('vmName')]", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName1')),'2016-01-01').primaryEndpoints.blob,'vhds/', variables('vmName'),'-','vmOSDisk','.vhd')]" }, - "dependsOn": [ - "[concat('Microsoft.Network/networkSecurityGroups/', variables('vmNSGName'))]" - ], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "default", - "properties": { - "addressPrefix": "10.0.1.0/24", - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNSGName'))]" - } - } - }] + "caching": "ReadWrite", + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(variables('vmName'), '-disk-1')]", + "createOption": "Empty", + "lun": 0, + "diskSizeGB": 1023, + "caching": "ReadOnly", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName1')),'2016-01-01').primaryEndpoints.blob,'vhds/', variables('vmName'),'-','vmDataDisk','.vhd')]" + } } + ] }, - { - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('vmNicName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "NIC for the VM", - "tags": { - "displayName": "VM NIC" - }, - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" - ], - "properties": { - "ipConfigurations": [{ - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('ipAddressName'))]" - }, - "subnet": { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'),'default')]" - } - } - }] + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" } + ] }, - { - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "comments": "Windows VM", - "tags": { - "displayName": "Virtual Machine" + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName2'))).primaryEndpoints.blob]" + } + } + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmName'), '/SqlIaasExtension')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" + ], + "properties": { + "type": "SqlIaaSAgent", + "publisher": "Microsoft.SqlServer.Management", + "typeHandlerVersion": "1.2", + "autoUpgradeMinorVersion": "true", + "settings": { + "AutoTelemetrySettings": { + "Region": "[parameters('location')]" + }, + "AutoPatchingSettings": { + "PatchCategory": "WindowsMandatoryUpdates", + "Enable": true, + "DayOfWeek": "Sunday", + "MaintenanceWindowStartingHour": "2", + "MaintenanceWindowDuration": "60" + }, + "KeyVaultCredentialSettings": { + "Enable": false, + "CredentialName": "" + }, + "ServerConfigurationsManagementSettings": { + "SQLConnectivityUpdateSettings": { + "ConnectivityType": "Private", + "Port": "1433" }, - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName1'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('vmNicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "Standard_DS1_v2" - }, - "osProfile": { - "computerName": "windowsvm", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "windowsConfiguration": { - "provisionVmAgent": "true" - } - }, - "storageProfile": { - "imageReference": { - "publisher": "MicrosoftSQLServer", - "offer": "SQL2014SP2-WS2012R2", - "sku": "Enterprise", - "version": "latest" - }, - "osDisk": { - "name": "[variables('vmName')]", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName1')),'2016-01-01').primaryEndpoints.blob,'vhds/', variables('vmName'),'-','vmOSDisk','.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - }, - "dataDisks": [{ - "name": "[concat(variables('vmName'), '-disk-1')]", - "createOption": "Empty", - "lun": 0, - "diskSizeGB": 1023, - "caching": "ReadOnly", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName1')),'2016-01-01').primaryEndpoints.blob,'vhds/', variables('vmName'),'-','vmDataDisk','.vhd')]" - } - }] - }, - "networkProfile": { - "networkInterfaces": [{ - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" - }] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName2'))).primaryEndpoints.blob]" - } - } + "SQLWorkloadTypeUpdateSettings": { + "SQLWorkloadType": "GENERAL" + }, + "SQLStorageUpdateSettings": { + "DiskCount": "1", + "NumberOfColumns": "1", + "StartingDeviceID": "2", + "DiskConfigurationType": "NEW" + }, + "AdditionalFeaturesServerConfigurations": { + "IsRServicesEnabled": "false" } + } }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'), '/SqlIaasExtension')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" - ], - "properties": { - "type": "SqlIaaSAgent", - "publisher": "Microsoft.SqlServer.Management", - "typeHandlerVersion": "1.2", - "autoUpgradeMinorVersion": "true", - "settings": { - "AutoTelemetrySettings": { - "Region": "[resourceGroup().location]" - }, - "AutoPatchingSettings": { - "PatchCategory": "WindowsMandatoryUpdates", - "Enable": true, - "DayOfWeek": "Sunday", - "MaintenanceWindowStartingHour": "2", - "MaintenanceWindowDuration": "60" - }, - "KeyVaultCredentialSettings": { - "Enable": false, - "CredentialName": "" - }, - "ServerConfigurationsManagementSettings": { - "SQLConnectivityUpdateSettings": { - "ConnectivityType": "Private", - "Port": "1433" - }, - "SQLWorkloadTypeUpdateSettings": { - "SQLWorkloadType": "GENERAL" - }, - "SQLStorageUpdateSettings": { - "DiskCount": "1", - "NumberOfColumns": "1", - "StartingDeviceID": "2", - "DiskConfigurationType": "NEW" - }, - "AdditionalFeaturesServerConfigurations": { - "IsRServicesEnabled": "false" - } - } - }, - "protectedSettings": {} - } - } - ], - "outputs": { - "existingVirtualMachineName": { - "type": "string", - "value": "[variables('vmName')]" - }, - "sqlAutobackupStorageAccountName": { - "type": "string", - "value": "[variables('storageAccountName2')]" - } - + "protectedSettings": {} + } + } + ], + "outputs": { + "existingVirtualMachineName": { + "type": "string", + "value": "[variables('vmName')]" + }, + "sqlAutobackupStorageAccountName": { + "type": "string", + "value": "[variables('storageAccountName2')]" } + } } diff --git a/101-vm-sql-existing-autopatching-update/azuredeploy.json b/101-vm-sql-existing-autopatching-update/azuredeploy.json index 2abf3d2f27cd..e2ab347e9d04 100644 --- a/101-vm-sql-existing-autopatching-update/azuredeploy.json +++ b/101-vm-sql-existing-autopatching-update/azuredeploy.json @@ -1,102 +1,109 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "existingVirtualMachineName": { - "type": "string", - "metadata": { - "description": "Existing SQL Server virtual machine name" - } - }, - "sqlAutopatchingDayOfWeek": { - "type": "string", - "metadata": { - "description": "SQL Server Auto Patching Day of A Week" - }, - "allowedValues": [ - "Everyday", - "Never", - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - "defaultValue":"Sunday" - }, - "sqlAutopatchingStartHour": { - "type": "string", - "metadata": { - "description": "SQL Server Auto Patching Starting Hour" - }, - "allowedValues": [ - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12", - "13", - "14", - "15", - "16", - "17", - "18", - "19", - "20", - "21", - "22", - "23" - ], - "defaultValue":"2" - }, - "sqlAutopatchingWindowDuration": { - "type": "string", - "metadata": { - "description": "SQL Server Auto Patching Duration Window in minutes" - }, - "allowedValues": [ - "30", - "60", - "90", - "120", - "150", - "180" - ], - "defaultValue":"60" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "existingVirtualMachineName": { + "type": "string", + "metadata": { + "description": "Existing SQL Server virtual machine name" + } + }, + "sqlAutopatchingDayOfWeek": { + "type": "string", + "metadata": { + "description": "SQL Server Auto Patching Day of A Week" + }, + "allowedValues": [ + "Everyday", + "Never", + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "defaultValue": "Sunday" + }, + "sqlAutopatchingStartHour": { + "type": "string", + "metadata": { + "description": "SQL Server Auto Patching Starting Hour" + }, + "allowedValues": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23" + ], + "defaultValue": "2" + }, + "sqlAutopatchingWindowDuration": { + "type": "string", + "metadata": { + "description": "SQL Server Auto Patching Duration Window in minutes" + }, + "allowedValues": [ + "30", + "60", + "90", + "120", + "150", + "180" + ], + "defaultValue": "60" }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('existingVirtualMachineName'), '/SqlIaasExtension')]", - "location": "[resourceGroup().location]", - "properties": { - "type": "SqlIaaSAgent", - "publisher": "Microsoft.SqlServer.Management", - "typeHandlerVersion": "1.2", - "autoUpgradeMinorVersion": "true", - "settings": { - "AutoPatchingSettings": { - "PatchCategory": "WindowsMandatoryUpdates", - "Enable": true, - "DayOfWeek": "[parameters('sqlAutopatchingDayOfWeek')]", - "MaintenanceWindowStartingHour": "[parameters('sqlAutopatchingStartHour')]", - "MaintenanceWindowDuration": "[parameters('sqlAutopatchingWindowDuration')]" - } - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('existingVirtualMachineName'), '/SqlIaasExtension')]", + "location": "[parameters('location')]", + "properties": { + "type": "SqlIaaSAgent", + "publisher": "Microsoft.SqlServer.Management", + "typeHandlerVersion": "1.2", + "autoUpgradeMinorVersion": "true", + "settings": { + "AutoPatchingSettings": { + "PatchCategory": "WindowsMandatoryUpdates", + "Enable": true, + "DayOfWeek": "[parameters('sqlAutopatchingDayOfWeek')]", + "MaintenanceWindowStartingHour": "[parameters('sqlAutopatchingStartHour')]", + "MaintenanceWindowDuration": "[parameters('sqlAutopatchingWindowDuration')]" + } } - ], - "outputs": {} -} \ No newline at end of file + } + } + ], + "outputs": {} +} diff --git a/101-vm-sql-existing-autopatching-update/prereqs/prereq.azuredeploy.json b/101-vm-sql-existing-autopatching-update/prereqs/prereq.azuredeploy.json index fb5c2e728bdd..352374b3aebf 100644 --- a/101-vm-sql-existing-autopatching-update/prereqs/prereq.azuredeploy.json +++ b/101-vm-sql-existing-autopatching-update/prereqs/prereq.azuredeploy.json @@ -1,251 +1,262 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "metadata": { - "description": "Username to access virtual Machines" - } - }, - "adminPassword": { - "type": "securestring", - "minLength": 12, - "metadata": { - "description": "Password to access virtual Machines" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username to access virtual Machines" + } }, - "variables": { - "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]", - "vmNSGName": "ExistingNsg", - "ipAddressName": "ExistingPip", - "virtualNetworkName": "ExistingVNet", - "vmNicName": "ExistingNic", - "vmName": "ExistingWinVm" + "adminPassword": { + "type": "securestring", + "minLength": 12, + "metadata": { + "description": "Password to access virtual Machines" + } }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "comments": "Storage account used to store VM disks", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": { - - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]", + "vmNSGName": "ExistingNsg", + "ipAddressName": "ExistingPip", + "virtualNetworkName": "ExistingVNet", + "vmNicName": "ExistingNic", + "vmName": "ExistingWinVm" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store VM disks", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('vmNSGName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "NSG for the VM subnet.", + "tags": { + "displayName": "VM NSG" + }, + "properties": { + "securityRules": [] + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('ipAddressName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": " Public IP used by the Jump VM", + "tags": { + "displayName": "VM Public IP" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "idleTimeoutInMinutes": 4 + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', variables('vmNSGName'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - { - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('vmNSGName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "NSG for the VM subnet.", - "tags": { - "displayName": "VM NSG" - }, + "subnets": [ + { + "name": "default", "properties": { - "securityRules": [ - - ] + "addressPrefix": "10.0.1.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNSGName'))]" + } } - }, - { - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('ipAddressName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": " Public IP used by the Jump VM", - "tags": { - "displayName": "VM Public IP" - }, + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('vmNicName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "NIC for the VM", + "tags": { + "displayName": "VM NIC" + }, + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "publicIPAllocationMethod": "Static", - "idleTimeoutInMinutes": 4 + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('ipAddressName'))]" + }, + "subnet": { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'),'default')]" + } } + } + ] + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "Windows VM", + "tags": { + "displayName": "Virtual Machine" + }, + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('vmNicName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" }, - { - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" + "osProfile": { + "computerName": "windowsvm", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]", + "windowsConfiguration": { + "provisionVmAgent": "true" + } + }, + "storageProfile": { + "imageReference": { + "publisher": "MicrosoftSQLServer", + "offer": "SQL2014SP2-WS2012R2", + "sku": "Enterprise", + "version": "latest" + }, + "osDisk": { + "name": "[variables('vmName')]", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),'2016-01-01').primaryEndpoints.blob,'vhds/', variables('vmName'),'-','vmOSDisk','.vhd')]" }, - "dependsOn": [ - "[concat('Microsoft.Network/networkSecurityGroups/', variables('vmNSGName'))]" - ], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "default", - "properties": { - "addressPrefix": "10.0.1.0/24", - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNSGName'))]" - } - } - }] + "caching": "ReadWrite", + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(variables('vmName'), '-disk-1')]", + "createOption": "Empty", + "lun": 0, + "diskSizeGB": 1023, + "caching": "ReadOnly", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),'2016-01-01').primaryEndpoints.blob,'vhds/', variables('vmName'),'-','vmDataDisk','.vhd')]" + } } + ] }, - { - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('vmNicName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "NIC for the VM", - "tags": { - "displayName": "VM NIC" - }, - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" - ], - "properties": { - "ipConfigurations": [{ - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('ipAddressName'))]" - }, - "subnet": { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'),'default')]" - } - } - }] + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" } + ] }, - { - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "comments": "Windows VM", - "tags": { - "displayName": "Virtual Machine" + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob]" + } + } + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmName'), '/SqlIaasExtension')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" + ], + "properties": { + "type": "SqlIaaSAgent", + "publisher": "Microsoft.SqlServer.Management", + "typeHandlerVersion": "1.2", + "autoUpgradeMinorVersion": "true", + "settings": { + "AutoTelemetrySettings": { + "Region": "[parameters('location')]" + }, + "AutoPatchingSettings": { + "PatchCategory": "WindowsMandatoryUpdates", + "Enable": true, + "DayOfWeek": "Sunday", + "MaintenanceWindowStartingHour": "2", + "MaintenanceWindowDuration": "60" + }, + "KeyVaultCredentialSettings": { + "Enable": false, + "CredentialName": "" + }, + "ServerConfigurationsManagementSettings": { + "SQLConnectivityUpdateSettings": { + "ConnectivityType": "Private", + "Port": "1433" }, - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('vmNicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "Standard_DS1_v2" - }, - "osProfile": { - "computerName": "windowsvm", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "windowsConfiguration": { - "provisionVmAgent": "true" - } - }, - "storageProfile": { - "imageReference": { - "publisher": "MicrosoftSQLServer", - "offer": "SQL2014SP2-WS2012R2", - "sku": "Enterprise", - "version": "latest" - }, - "osDisk": { - "name": "[variables('vmName')]", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),'2016-01-01').primaryEndpoints.blob,'vhds/', variables('vmName'),'-','vmOSDisk','.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - }, - "dataDisks": [{ - "name": "[concat(variables('vmName'), '-disk-1')]", - "createOption": "Empty", - "lun": 0, - "diskSizeGB": 1023, - "caching": "ReadOnly", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),'2016-01-01').primaryEndpoints.blob,'vhds/', variables('vmName'),'-','vmDataDisk','.vhd')]" - } - }] - }, - "networkProfile": { - "networkInterfaces": [{ - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" - }] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob]" - } - } + "SQLWorkloadTypeUpdateSettings": { + "SQLWorkloadType": "GENERAL" + }, + "SQLStorageUpdateSettings": { + "DiskCount": "1", + "NumberOfColumns": "1", + "StartingDeviceID": "2", + "DiskConfigurationType": "NEW" + }, + "AdditionalFeaturesServerConfigurations": { + "IsRServicesEnabled": "false" } + } }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'), '/SqlIaasExtension')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" - ], - "properties": { - "type": "SqlIaaSAgent", - "publisher": "Microsoft.SqlServer.Management", - "typeHandlerVersion": "1.2", - "autoUpgradeMinorVersion": "true", - "settings": { - "AutoTelemetrySettings": { - "Region": "[resourceGroup().location]" - }, - "AutoPatchingSettings": { - "PatchCategory": "WindowsMandatoryUpdates", - "Enable": true, - "DayOfWeek": "Sunday", - "MaintenanceWindowStartingHour": "2", - "MaintenanceWindowDuration": "60" - }, - "KeyVaultCredentialSettings": { - "Enable": false, - "CredentialName": "" - }, - "ServerConfigurationsManagementSettings": { - "SQLConnectivityUpdateSettings": { - "ConnectivityType": "Private", - "Port": "1433" - }, - "SQLWorkloadTypeUpdateSettings": { - "SQLWorkloadType": "GENERAL" - }, - "SQLStorageUpdateSettings": { - "DiskCount": "1", - "NumberOfColumns": "1", - "StartingDeviceID": "2", - "DiskConfigurationType": "NEW" - }, - "AdditionalFeaturesServerConfigurations": { - "IsRServicesEnabled": "false" - } - } - }, - "protectedSettings": {} - } - } - ], - "outputs": { - "existingVirtualMachineName": { - "type": "string", - "value": "[variables('vmName')]" - } - + "protectedSettings": {} + } + } + ], + "outputs": { + "existingVirtualMachineName": { + "type": "string", + "value": "[variables('vmName')]" } + } } diff --git a/101-vm-sql-existing-keyvault-update/azuredeploy.json b/101-vm-sql-existing-keyvault-update/azuredeploy.json index b2d0f5a76ec0..56b41420bacd 100644 --- a/101-vm-sql-existing-keyvault-update/azuredeploy.json +++ b/101-vm-sql-existing-keyvault-update/azuredeploy.json @@ -1,66 +1,71 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "existingVirtualMachineName": { - "type": "string", - "metadata": { - "description": "Existing SQL Server virtual machine name" - } - }, - "sqlCredentialName": { - "type": "string", - "metadata": { - "description": "SQL credential name to create on the SQL Server virtual machine" - } - }, - "sqlAkvUrl": { - "type": "string", - "metadata": { - "description": "Azure Key Vault URL" - } - }, - "servicePrincipalName": { - "type": "string", - "metadata": { - "description": "Azure Key Vault principal name or id" - } - }, - "servicePrincipalSecret": { - "type": "securestring", - "metadata": { - "description": "Azure Key Vault principal secret" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "existingVirtualMachineName": { + "type": "string", + "metadata": { + "description": "Existing SQL Server virtual machine name" + } }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('existingVirtualMachineName'), '/SqlIaasExtension')]", - "location": "[resourceGroup().location]", - "properties": { - "type": "SqlIaaSAgent", - "publisher": "Microsoft.SqlServer.Management", - "typeHandlerVersion": "1.2", - "autoUpgradeMinorVersion": "true", - "settings": { - "KeyVaultCredentialSettings": { - "Enable": true, - "CredentialName": "[parameters('sqlCredentialName')]" - } - }, - "protectedSettings": { - "PrivateKeyVaultCredentialSettings": { - "AzureKeyVaultUrl": "[parameters('sqlAkvUrl')]", - "ServicePrincipalName": "[parameters('servicePrincipalName')]", - "ServicePrincipalSecret": "[parameters('servicePrincipalSecret')]" - } - } - } - } - ], - "outputs": + "sqlCredentialName": { + "type": "string", + "metadata": { + "description": "SQL credential name to create on the SQL Server virtual machine" + } + }, + "sqlAkvUrl": { + "type": "string", + "metadata": { + "description": "Azure Key Vault URL" + } + }, + "servicePrincipalName": { + "type": "string", + "metadata": { + "description": "Azure Key Vault principal name or id" + } + }, + "servicePrincipalSecret": { + "type": "securestring", + "metadata": { + "description": "Azure Key Vault principal secret" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('existingVirtualMachineName'), '/SqlIaasExtension')]", + "location": "[parameters('location')]", + "properties": { + "type": "SqlIaaSAgent", + "publisher": "Microsoft.SqlServer.Management", + "typeHandlerVersion": "1.2", + "autoUpgradeMinorVersion": "true", + "settings": { + "KeyVaultCredentialSettings": { + "Enable": true, + "CredentialName": "[parameters('sqlCredentialName')]" + } + }, + "protectedSettings": { + "PrivateKeyVaultCredentialSettings": { + "AzureKeyVaultUrl": "[parameters('sqlAkvUrl')]", + "ServicePrincipalName": "[parameters('servicePrincipalName')]", + "ServicePrincipalSecret": "[parameters('servicePrincipalSecret')]" + } + } + } } -} \ No newline at end of file + ], + "outputs": {} +} diff --git a/101-vm-tags/azuredeploy.json b/101-vm-tags/azuredeploy.json index 6c3dc06e8a3b..4c7ef00aed2e 100644 --- a/101-vm-tags/azuredeploy.json +++ b/101-vm-tags/azuredeploy.json @@ -52,6 +52,13 @@ "metadata": { "description": "Created By Tag" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -69,15 +76,14 @@ "vmSize": "Standard_D1", "virtualNetworkName": "MyVNET", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "apiVersion": "2015-06-15" + "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]" }, "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "Department": "[parameters('departmentName')]", "Application": "[parameters('applicationName')]", @@ -91,7 +97,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "Department": "[parameters('departmentName')]", "Application": "[parameters('applicationName')]", @@ -108,7 +114,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "Department": "[parameters('departmentName')]", "Application": "[parameters('applicationName')]", @@ -134,7 +140,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "Department": "[parameters('departmentName')]", "Application": "[parameters('applicationName')]", @@ -165,7 +171,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "Department": "[parameters('departmentName')]", "Application": "[parameters('applicationName')]", @@ -211,4 +217,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-vm-user-image-data-disks/azuredeploy.json b/101-vm-user-image-data-disks/azuredeploy.json index fff1b377bf62..bbb5ff28ac77 100644 --- a/101-vm-user-image-data-disks/azuredeploy.json +++ b/101-vm-user-image-data-disks/azuredeploy.json @@ -102,6 +102,13 @@ "metadata": { "description": "Resource group of the existing VNET" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -118,7 +125,7 @@ "type": "Microsoft.Compute/images", "apiVersion": "2017-03-30", "name": "[variables('imageName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "storageProfile": { "osDisk": { @@ -164,7 +171,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -176,7 +183,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "Microsoft.Resources/deployments/vnet-template" @@ -202,7 +209,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]", "[concat('Microsoft.Compute/images/', variables('imageName'))]" @@ -254,4 +261,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-vm-user-image-data-disks/newvnet.json b/101-vm-user-image-data-disks/newvnet.json index 15c711e05914..bafeb58999f4 100644 --- a/101-vm-user-image-data-disks/newvnet.json +++ b/101-vm-user-image-data-disks/newvnet.json @@ -19,19 +19,27 @@ "metadata": { "description": "Subnet Name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "apiVersion": "2016-03-30", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { - "addressPrefixes": [ "10.0.0.0/16" ] + "addressPrefixes": [ + "10.0.0.0/16" + ] }, "subnets": [ { diff --git a/101-vm-windows-copy-datadisks/azuredeploy.json b/101-vm-windows-copy-datadisks/azuredeploy.json index d70762bfa10f..ff19c6569651 100644 --- a/101-vm-windows-copy-datadisks/azuredeploy.json +++ b/101-vm-windows-copy-datadisks/azuredeploy.json @@ -44,6 +44,13 @@ "metadata": { "description": "The number of dataDisks to be returned in the output array." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -65,7 +72,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -77,7 +84,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -98,7 +105,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -124,7 +131,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -175,4 +182,4 @@ "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" } } -} \ No newline at end of file +} diff --git a/101-vm-with-data-management-gateway/azuredeploy.json b/101-vm-with-data-management-gateway/azuredeploy.json index 13b99d36a44e..1aa16e4e7f77 100644 --- a/101-vm-with-data-management-gateway/azuredeploy.json +++ b/101-vm-with-data-management-gateway/azuredeploy.json @@ -3,7 +3,7 @@ "contentVersion": "1.0.0.0", "parameters": { "existingDataFactoryName": { - "type":"string", + "type": "string", "metadata": { "description": "your existing data factory name" } @@ -26,20 +26,19 @@ "description": "Password for the virtual machine" } }, - "existingVirtualNetworkName":{ + "existingVirtualNetworkName": { "type": "string", "metadata": { "description": "your existing vnet name" } }, - "existingVnetLocation": - { + "existingVnetLocation": { "type": "string", "metadata": { "description": "your virtual machine will be create in the same datacenter with VNET" } }, - "existingVnetResourceGroupName":{ + "existingVnetResourceGroupName": { "type": "string", "metadata": { "description": "Name of the existing VNET resource group" @@ -53,7 +52,10 @@ }, "enableToSetDataStorePasswordsFromInternet": { "type": "string", - "allowedValues": ["yes", "no"], + "allowedValues": [ + "yes", + "no" + ], "defaultValue": "yes", "metadata": { "description": "If you choose yes, we will create a dns name label for your machine and open one inbound port for our service to access your machine and set data store passwords." @@ -75,11 +77,14 @@ } }, "variables": { - "delimiters": [ "-", "_" ], + "delimiters": [ + "-", + "_" + ], "prefix": "[split(parameters('gatewayName'), variables('delimiters'))[0]]", - "virtualMachineName" : "[take(concat('vm-', variables('prefix')), 15)]", + "virtualMachineName": "[take(concat('vm-', variables('prefix')), 15)]", "nsglink": "[concat(parameters('_artifactsLocation'), 'nested/', parameters('enableToSetDataStorePasswordsFromInternet'),'IncomingRemote.json',parameters('_artifactsLocationSasToken'))]", - "nsgTemplateName": "[concat(variables('virtualMachineName'), 'NSGTemplate')]", + "nsgTemplateName": "[concat(variables('virtualMachineName'), 'NSGTemplate')]", "storageAccountName": "[take(concat(toLower(variables('prefix')), uniquestring(resourceGroup().id, variables('virtualMachineName'))), 24)]", "nicName": "[concat(variables('virtualMachineName'), 'Nic')]", "publicIPAddressName": "[concat(variables('virtualMachineName'), '-ip')]", @@ -104,7 +109,7 @@ "[resourceId('Microsoft.DataFactory/dataFactories/gateways', parameters('existingDataFactoryName'), parameters('GatewayName'))]" ], "tags": { - "vmname": "[variables('virtualMachineName')]" + "vmname": "[variables('virtualMachineName')]" }, "sku": { "name": "Standard_LRS" @@ -118,7 +123,7 @@ "name": "[variables('nicName')]", "location": "[parameters('existingVnetLocation')]", "tags": { - "vmname": "[variables('virtualMachineName')]" + "vmname": "[variables('virtualMachineName')]" }, "dependsOn": [ "[resourceId('Microsoft.Resources/deployments/', variables('nsgTemplateName'))]" @@ -139,7 +144,7 @@ } ], "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" } } }, @@ -149,14 +154,14 @@ "name": "[variables('virtualMachineName')]", "location": "[parameters('existingVnetLocation')]", "tags": { - "vmname": "[variables('virtualMachineName')]" + "vmname": "[variables('virtualMachineName')]" }, "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], "properties": { - "hardwareProfile": { + "hardwareProfile": { "vmSize": "Standard_A3" }, "osProfile": { @@ -166,7 +171,7 @@ }, "storageProfile": { "imageReference": { - "publisher": "MicrosoftWindowsServer", + "publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", "sku": "2016-Datacenter", "version": "latest" @@ -212,7 +217,7 @@ "apiVersion": "2015-06-15", "location": "[parameters('existingVnetLocation')]", "tags": { - "vmname": "[variables('virtualMachineName')]" + "vmname": "[variables('virtualMachineName')]" }, "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines/',variables('virtualMachineName'))]" @@ -221,9 +226,11 @@ "publisher": "Microsoft.Compute", "type": "CustomScriptExtension", "typeHandlerVersion": "1.7", - "autoUpgradeMinorVersion":true, + "autoUpgradeMinorVersion": true, "settings": { - "fileUris": [ "[variables('scriptURL')]"] + "fileUris": [ + "[variables('scriptURL')]" + ] }, "protectedSettings": { "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File gatewayInstall.ps1 ', listAuthKeys(resourceId('Microsoft.DataFactory/dataFactories/gateways', parameters('existingDataFactoryName'), parameters('GatewayName')), '2015-10-01').key1, ' ', reference(variables('nsgTemplateName')).outputs.hostname.Value, ' ', parameters('enableToSetDataStorePasswordsFromInternet'))]" @@ -252,10 +259,10 @@ "networkSecurityGroupName": { "value": "[variables('networkSecurityGroupName')]" }, - "publicIPAddressName":{ + "publicIPAddressName": { "value": "[variables('publicIPAddressName')]" }, - "existingVnetLocation":{ + "existingVnetLocation": { "value": "[parameters('existingVnetLocation')]" } } diff --git a/101-vm-with-data-management-gateway/nested/noIncomingRemote.json b/101-vm-with-data-management-gateway/nested/noIncomingRemote.json index 3257fe6a6d1b..83a8de31bd9d 100644 --- a/101-vm-with-data-management-gateway/nested/noIncomingRemote.json +++ b/101-vm-with-data-management-gateway/nested/noIncomingRemote.json @@ -8,22 +8,22 @@ "networkSecurityGroupName": { "type": "string" }, - "publicIPAddressName":{ + "publicIPAddressName": { "type": "string" }, - "existingVnetLocation":{ + "existingVnetLocation": { "type": "string" } }, - "variables": { - }, - "resources": [{ + "variables": {}, + "resources": [ + { "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIPAddressName')]", "location": "[parameters('existingVnetLocation')]", "tags": { - "vmname": "[parameters('vmName')]" + "vmname": "[parameters('vmName')]" }, "properties": { "publicIPAllocationMethod": "Dynamic" @@ -35,21 +35,21 @@ "apiVersion": "2016-09-01", "location": "[parameters('existingVnetLocation')]", "tags": { - "vmname": "[parameters('vmName')]" + "vmname": "[parameters('vmName')]" }, "properties": { "securityRules": [ { "name": "default-allow-rdp", "properties": { - "priority": 1000, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "3389", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" + "priority": 1000, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "3389", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } } ] @@ -62,4 +62,4 @@ "value": "" } } -} \ No newline at end of file +} diff --git a/101-vm-with-data-management-gateway/nested/yesIncomingRemote.json b/101-vm-with-data-management-gateway/nested/yesIncomingRemote.json index 52302d1c16c7..d57fc1cf5f64 100644 --- a/101-vm-with-data-management-gateway/nested/yesIncomingRemote.json +++ b/101-vm-with-data-management-gateway/nested/yesIncomingRemote.json @@ -8,10 +8,10 @@ "networkSecurityGroupName": { "type": "string" }, - "publicIPAddressName":{ + "publicIPAddressName": { "type": "string" }, - "existingVnetLocation":{ + "existingVnetLocation": { "type": "string" } }, @@ -25,7 +25,7 @@ "name": "[parameters('publicIPAddressName')]", "location": "[parameters('existingVnetLocation')]", "tags": { - "vmname": "[parameters('vmName')]" + "vmname": "[parameters('vmName')]" }, "properties": { "publicIPAllocationMethod": "Dynamic", @@ -40,34 +40,34 @@ "apiVersion": "2016-09-01", "location": "[parameters('existingVnetLocation')]", "tags": { - "vmname": "[parameters('vmName')]" + "vmname": "[parameters('vmName')]" }, "properties": { "securityRules": [ { "name": "default-allow-rdp", "properties": { - "priority": 1000, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "3389", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" + "priority": 1000, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "3389", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } }, { "name": "ResourceManager", "properties": { - "priority": 1010, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "8050", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" + "priority": 1010, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "8050", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } } ] @@ -80,4 +80,4 @@ "value": "[reference(parameters('publicIPAddressName')).dnsSettings.fqdn]" } } -} \ No newline at end of file +} diff --git a/101-vm-with-rdp-port/azuredeploy.json b/101-vm-with-rdp-port/azuredeploy.json index c1f7a0a750a9..34d0d9e38a03 100644 --- a/101-vm-with-rdp-port/azuredeploy.json +++ b/101-vm-with-rdp-port/azuredeploy.json @@ -34,6 +34,13 @@ "metadata": { "description": "Public port number for RDP" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -45,15 +52,14 @@ "subnet-id": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')),'/subnets/',variables('subnetName'))]", "imagePublisher": "MicrosoftWindowsServer", "imageOffer": "WindowsServer", - "imageSku": "2012-R2-Datacenter", - "apiVersion": "2015-06-15" + "imageSku": "2012-R2-Datacenter" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "publicIp", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -65,7 +71,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -74,7 +80,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -95,7 +101,7 @@ "apiVersion": "2015-06-15", "name": "loadBalancer", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Network/publicIPAddresses/publicIp" ], @@ -135,7 +141,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('vmName'),'-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "Microsoft.Network/loadBalancers/loadBalancer" @@ -168,7 +174,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts',variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/',parameters('vmName'),'-nic')]" @@ -209,4 +215,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-vms-with-selfhost-integration-runtime/azuredeploy.json b/101-vms-with-selfhost-integration-runtime/azuredeploy.json index 216144ac52e2..9a16f6ec7a39 100644 --- a/101-vms-with-selfhost-integration-runtime/azuredeploy.json +++ b/101-vms-with-selfhost-integration-runtime/azuredeploy.json @@ -90,7 +90,10 @@ } }, "variables": { - "delimiters": [ "-", "_" ], + "delimiters": [ + "-", + "_" + ], "prefix": "[split(parameters('IntegrationRuntimeName'), variables('delimiters'))[0]]", "storageAccountName": "[take(concat(toLower(variables('prefix')), uniquestring(resourceGroup().id, parameters('IntegrationRuntimeName'))), 24)]", "networkSecurityGroupName": "[concat(parameters('IntegrationRuntimeName'), 'nsg')]", diff --git a/101-vms-with-selfhost-integration-runtime/nested/IRInstall.json b/101-vms-with-selfhost-integration-runtime/nested/IRInstall.json index 6111ee4c3f05..cd347c96810d 100644 --- a/101-vms-with-selfhost-integration-runtime/nested/IRInstall.json +++ b/101-vms-with-selfhost-integration-runtime/nested/IRInstall.json @@ -1,44 +1,44 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "IRkey": { - "type": "string" - }, - "virtualMachineName": { - "type": "string" - }, - "existingVnetLocation": { - "type": "string" - }, - "scriptUrl": { - "type": "string" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "IRkey": { + "type": "string" }, - "variables": {}, - "resources": [ - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('virtualMachineName'), '/' ,parameters('virtualMachineName'), 'installGW')]", - "apiVersion": "2017-03-30", - "location": "[parameters('existingVnetLocation')]", - "tags": { - "vmname": "[parameters('virtualMachineName')]" - }, - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.7", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[parameters('scriptURL')]" - ] - }, - "protectedSettings": { - "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File gatewayInstall.ps1 ', parameters('IRkey'))]" - } - } + "virtualMachineName": { + "type": "string" + }, + "existingVnetLocation": { + "type": "string" + }, + "scriptUrl": { + "type": "string" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('virtualMachineName'), '/' ,parameters('virtualMachineName'), 'installGW')]", + "apiVersion": "2017-03-30", + "location": "[parameters('existingVnetLocation')]", + "tags": { + "vmname": "[parameters('virtualMachineName')]" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.7", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[parameters('scriptURL')]" + ] + }, + "protectedSettings": { + "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File gatewayInstall.ps1 ', parameters('IRkey'))]" } - ] + } + } + ] } diff --git a/101-vms-with-selfhost-integration-runtime/nested/V1IRtemplate.json b/101-vms-with-selfhost-integration-runtime/nested/V1IRtemplate.json index 4285d2a619ff..f15661d880e2 100644 --- a/101-vms-with-selfhost-integration-runtime/nested/V1IRtemplate.json +++ b/101-vms-with-selfhost-integration-runtime/nested/V1IRtemplate.json @@ -1,30 +1,30 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "existingDataFactoryName": { - "type":"string" - }, - "IntegrationRuntimeName": { - "type": "string" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "existingDataFactoryName": { + "type": "string" }, - "variables": {}, - "resources": [ - { - "type": "Microsoft.DataFactory/dataFactories/gateways", - "apiVersion": "2015-10-01", - "name": "[concat(parameters('existingDataFactoryName'), '/', parameters('IntegrationRuntimeName'))]", - "properties": { - "multiNodeSupportEnabled": true, - "description": "my integration runtime" - } - } - ], - "outputs": { - "IRkey":{ - "type": "string", - "value": "[listAuthKeys(resourceId('Microsoft.DataFactory/dataFactories/gateways', parameters('existingDataFactoryName'), parameters('IntegrationRuntimeName')), '2015-10-01').key1]" - } + "IntegrationRuntimeName": { + "type": "string" } -} \ No newline at end of file + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.DataFactory/dataFactories/gateways", + "apiVersion": "2015-10-01", + "name": "[concat(parameters('existingDataFactoryName'), '/', parameters('IntegrationRuntimeName'))]", + "properties": { + "multiNodeSupportEnabled": true, + "description": "my integration runtime" + } + } + ], + "outputs": { + "IRkey": { + "type": "string", + "value": "[listAuthKeys(resourceId('Microsoft.DataFactory/dataFactories/gateways', parameters('existingDataFactoryName'), parameters('IntegrationRuntimeName')), '2015-10-01').key1]" + } + } +} diff --git a/101-vms-with-selfhost-integration-runtime/nested/V2IRtemplate.json b/101-vms-with-selfhost-integration-runtime/nested/V2IRtemplate.json index dcec523ef2b6..1c05c8cbc5ca 100644 --- a/101-vms-with-selfhost-integration-runtime/nested/V2IRtemplate.json +++ b/101-vms-with-selfhost-integration-runtime/nested/V2IRtemplate.json @@ -1,30 +1,30 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "existingDataFactoryName": { - "type":"string" - }, - "IntegrationRuntimeName": { - "type": "string" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "existingDataFactoryName": { + "type": "string" }, - "variables": {}, - "resources": [ - { - "type": "Microsoft.DataFactory/factories/integrationruntimes", - "apiVersion": "2017-09-01-preview", - "name": "[concat(parameters('existingDataFactoryName'), '/', parameters('IntegrationRuntimeName'))]", - "properties": { - "type": "SelfHosted", - "description": "Self-hosted Integration runtime created using ARM template" - } - } - ], - "outputs": { - "IRkey":{ - "type": "string", - "value": "[listAuthKeys(resourceId('Microsoft.DataFactory/factories/integrationruntimes', parameters('existingDataFactoryName'), parameters('IntegrationRuntimeName')), '2017-09-01-preview').authKey1]" - } + "IntegrationRuntimeName": { + "type": "string" } -} \ No newline at end of file + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.DataFactory/factories/integrationruntimes", + "apiVersion": "2017-09-01-preview", + "name": "[concat(parameters('existingDataFactoryName'), '/', parameters('IntegrationRuntimeName'))]", + "properties": { + "type": "SelfHosted", + "description": "Self-hosted Integration runtime created using ARM template" + } + } + ], + "outputs": { + "IRkey": { + "type": "string", + "value": "[listAuthKeys(resourceId('Microsoft.DataFactory/factories/integrationruntimes', parameters('existingDataFactoryName'), parameters('IntegrationRuntimeName')), '2017-09-01-preview').authKey1]" + } + } +} diff --git a/101-vms-with-selfhost-integration-runtime/nested/VMtemplate.json b/101-vms-with-selfhost-integration-runtime/nested/VMtemplate.json index c962a0137d2a..4eb472bf502a 100644 --- a/101-vms-with-selfhost-integration-runtime/nested/VMtemplate.json +++ b/101-vms-with-selfhost-integration-runtime/nested/VMtemplate.json @@ -2,8 +2,7 @@ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { - "virtualMachineName": - { + "virtualMachineName": { "type": "string" }, "adminUserName": { @@ -12,25 +11,21 @@ "adminPassword": { "type": "securestring" }, - "existingVnetLocation": - { + "existingVnetLocation": { "type": "string" }, - "subnetId": - { - "type":"string" + "subnetId": { + "type": "string" }, - "nsgId": - { - "type":"string" + "nsgId": { + "type": "string" }, - "storageAccountName": - { + "storageAccountName": { "type": "string" } }, "variables": { - "nicName": "[concat(parameters('virtualMachineName'), 'Nic')]", + "nicName": "[concat(parameters('virtualMachineName'), 'Nic')]", "publicIPAddressName": "[concat(parameters('virtualMachineName'), '-ip')]" }, "resources": [ @@ -67,7 +62,7 @@ } ], "networkSecurityGroup": { - "id": "[parameters('nsgId')]" + "id": "[parameters('nsgId')]" } } }, @@ -80,7 +75,7 @@ "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], "properties": { - "hardwareProfile": { + "hardwareProfile": { "vmSize": "Standard_A3" }, "osProfile": { @@ -90,7 +85,7 @@ }, "storageProfile": { "imageReference": { - "publisher": "MicrosoftWindowsServer", + "publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", "sku": "2016-Datacenter", "version": "latest" diff --git a/101-vms-with-selfhost-integration-runtime/prereqs/prereq.azuredeploy.json b/101-vms-with-selfhost-integration-runtime/prereqs/prereq.azuredeploy.json index 04e965185c55..d0189d54898e 100644 --- a/101-vms-with-selfhost-integration-runtime/prereqs/prereq.azuredeploy.json +++ b/101-vms-with-selfhost-integration-runtime/prereqs/prereq.azuredeploy.json @@ -1,8 +1,7 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": { - }, + "parameters": {}, "variables": { "firstVNETName": "vnet-01", "firstVNETLocation": "West US", @@ -22,7 +21,9 @@ }, "properties": { "addressSpace": { - "addressPrefixes": [ "[variables('firstVNETPrefix')]" ] + "addressPrefixes": [ + "[variables('firstVNETPrefix')]" + ] }, "subnets": [ { @@ -51,4 +52,4 @@ "value": "[concat('xiaoyz',resourceGroup().name)]" } } -} \ No newline at end of file +} diff --git a/101-vnet-two-subnets/azuredeploy.json b/101-vnet-two-subnets/azuredeploy.json index 911bbc763e24..b087441830d7 100644 --- a/101-vnet-two-subnets/azuredeploy.json +++ b/101-vnet-two-subnets/azuredeploy.json @@ -43,17 +43,22 @@ "metadata": { "description": "Subnet 2 Name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - "apiVersion": "2015-06-15" - }, + "variables": {}, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -77,4 +82,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-vsts-cloudloadtest-rig/azuredeploy.json b/101-vsts-cloudloadtest-rig/azuredeploy.json index bb229f9af002..5d9e200dea2c 100644 --- a/101-vsts-cloudloadtest-rig/azuredeploy.json +++ b/101-vsts-cloudloadtest-rig/azuredeploy.json @@ -1,265 +1,268 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vstsAccountName": { - "type": "string", - "metadata": { - "description": "Please enter the VSTS account name. If you access your VSTS account using 'https://yourAccountName.visualstudio.com', enter yourAccountName." - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vstsAccountName": { + "type": "string", + "metadata": { + "description": "Please enter the VSTS account name. If you access your VSTS account using 'https://yourAccountName.visualstudio.com', enter yourAccountName." + } + }, + "vstsPersonalAccessToken": { + "type": "securestring", + "metadata": { + "description": "Personal Access Token (PAT) for the VSTS account. You should select the scope as 'Load test (read and write)'. Please refer 'https://www.visualstudio.com/en-us/get-started/setup/use-personal-access-tokens-to-authenticate' for more details." + } + }, + "agentCount": { + "defaultValue": 1, + "type": "int", + "metadata": { + "description": "Number of load generating agent machines to provision" + } + }, + "agentGroupName": { + "defaultValue": "", + "type": "string", + "metadata": { + "description": "LoadTest Agent Group Name (can be empty and will default to resource groupname)" + } + }, + "publicIPAddressType": { + "type": "string", + "defaultValue": "Dynamic", + "allowedValues": [ + "Dynamic", + "Static" + ], + "metadata": { + "description": "Type of public IP allocation method" + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username for the virtual machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the virtual machine." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "sizeOfDiskInGB": "100", + "imagePublisher": "MicrosoftWindowsServer", + "imageOffer": "WindowsServer", + "addressPrefix": "10.0.0.0/16", + "sequenceVersion": "[uniqueString(resourceGroup().id)]", + "uniqueStringValue": "[substring(variables('sequenceVersion'), 3, 7)]", + "subnetName": "Subnet", + "subnetPrefix": "10.0.0.0/24", + "storageAccountType": "Standard_LRS", + "vmName": "[concat('vm', variables('uniqueStringValue'))]", + "vmSize": "Standard_D4_v2", + "storageAccountName": "[concat('storage', variables('uniqueStringValue'))]", + "virtualNetworkName": "clttemplatelocalagentvnet", + "publicIPAddressName": "[concat('publicip', variables('uniqueStringValue'))]", + "publicIPAddressType": "[parameters('publicIPAddressType')]", + "nicName": "[concat('nic', variables('uniqueStringValue'))]", + "windowsOSVersion": "2012-R2-Datacenter", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", + "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", + "defaultAgentGroupName": "[resourceGroup().name]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "accountType": "[variables('storageAccountType')]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(variables('publicIPAddressName'),'i', copyIndex())]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "copy": { + "name": "publicAddressCopy", + "count": "[parameters('agentCount')]" + }, + "properties": { + "publicIPAllocationMethod": "[variables('publicIPAddressType')]" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] }, - "vstsPersonalAccessToken": { - "type": "securestring", - "metadata": { - "description": "Personal Access Token (PAT) for the VSTS account. You should select the scope as 'Load test (read and write)'. Please refer 'https://www.visualstudio.com/en-us/get-started/setup/use-personal-access-tokens-to-authenticate' for more details." + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "[variables('subnetPrefix')]" } - }, - "agentCount": { - "defaultValue": 1, - "type": "int", - "metadata": { - "description": "Number of load generating agent machines to provision" + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('nicName'), 'i', copyIndex())]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "copy": { + "name": "nicCopy", + "count": "[parameters('agentCount')]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('publicIPAddressName'),'i', copyIndex()))]" + }, + "subnet": { + "id": "[variables('subnetRef')]" + } } + } + ] + }, + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/', concat(variables('publicIPAddressName'),'i', copyIndex()))]", + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" + ] + }, + { + "type": "Microsoft.Compute/virtualMachines", + "name": "[concat(variables('vmName'), 'i',copyIndex())]", + "apiVersion": "2016-04-30-preview", + "location": "[parameters('location')]", + "copy": { + "name": "vmCopy", + "count": "[parameters('agentCount')]" + }, + "properties": { + "hardwareProfile": { + "vmSize": "[variables('vmSize')]" }, - "agentGroupName": { - "defaultValue": "", - "type": "string", - "metadata": { - "description": "LoadTest Agent Group Name (can be empty and will default to resource groupname)" - } + "osProfile": { + "computerName": "[concat(variables('vmName'), 'i',copyIndex())]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" }, - "publicIPAddressType": { - "type": "string", - "defaultValue": "Dynamic", - "allowedValues": [ - "Dynamic", - "Static" - ], - "metadata": { - "description": "Type of public IP allocation method" + "storageProfile": { + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[variables('windowsOSVersion')]", + "version": "latest" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "diskSizeGB": "[variables('sizeOfDiskInGB')]", + "lun": 0, + "createOption": "Empty" } + ] }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "Username for the virtual machine." + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('nicName'), 'i', copyIndex()))]" } + ] }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the virtual machine." - } + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net')]" + } } + }, + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', concat(variables('nicName'), 'i', copyIndex()))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" + ] }, - "variables": { - "sizeOfDiskInGB": "100", - "imagePublisher": "MicrosoftWindowsServer", - "imageOffer": "WindowsServer", - "addressPrefix": "10.0.0.0/16", - "sequenceVersion": "[uniqueString(resourceGroup().id)]", - "uniqueStringValue": "[substring(variables('sequenceVersion'), 3, 7)]", - "subnetName": "Subnet", - "subnetPrefix": "10.0.0.0/24", - "storageAccountType": "Standard_LRS", - "vmName": "[concat('vm', variables('uniqueStringValue'))]", - "vmSize": "Standard_D4_v2", - "storageAccountName": "[concat('storage', variables('uniqueStringValue'))]", - "vmStorageAccountContainerName": "vhd", - "virtualNetworkName": "clttemplatelocalagentvnet", - "publicIPAddressName": "[concat('publicip', variables('uniqueStringValue'))]", - "publicIPAddressType": "[parameters('publicIPAddressType')]", - "nicName": "[concat('nic', variables('uniqueStringValue'))]", - "dataDisk1VhdName": "datadisk", - "windowsOSVersion": "2012-R2-Datacenter", - "OSDiskName": "osdisk", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "apiVersion": "2015-06-15", - "defaultAgentGroupName": "[resourceGroup().name]" + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmName'), 'i', copyIndex(), '/DefaultStartupScript')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "copy": { + "name": "vmCopy", + "count": "[parameters('agentCount')]" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "forceUpdateTag": "[variables('sequenceVersion')]", + "typeHandlerVersion": "1.8", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "https://elsprodch2su1.blob.core.windows.net/ets-containerfor-loadagentresources/bootstrap/ManageVSTSCloudLoadAgent.ps1" + ], + "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File .\\bootstrap\\ManageVSTSCloudLoadAgent.ps1 -TeamServicesAccountName ', parameters('vstsAccountName'), ' -PATToken ', parameters('vstsPersonalAccessToken'), ' -AgentGroupName ', variables('defaultAgentGroupName') , ' -ConfigureAgent')]" + } + }, + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'), 'i', copyIndex()))]" + ], + "condition": "[empty(replace(parameters('agentGroupName'), ' ',''))]" }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "type": "Microsoft.Network/publicIPAddresses", - "name": "[concat(variables('publicIPAddressName'),'i', copyIndex())]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "publicAddressCopy", - "count": "[parameters('agentCount')]" - }, - "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]" - } - }, - { - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] - } - }, - { - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('nicName'), 'i', copyIndex())]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicCopy", - "count": "[parameters('agentCount')]" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('publicIPAddressName'),'i', copyIndex()))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ] - }, - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', concat(variables('publicIPAddressName'),'i', copyIndex()))]", - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" - ] - }, - { - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('vmName'), 'i',copyIndex())]", - "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmCopy", - "count": "[parameters('agentCount')]" - }, - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computerName": "[concat(variables('vmName'), 'i',copyIndex())]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[variables('windowsOSVersion')]", - "version": "latest" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "diskSizeGB": "[variables('sizeOfDiskInGB')]", - "lun": 0, - "createOption": "Empty" - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('nicName'), 'i', copyIndex()))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net')]" - } - } - }, - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', concat(variables('nicName'), 'i', copyIndex()))]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" - ] - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'), 'i', copyIndex(), '/DefaultStartupScript')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmCopy", - "count": "[parameters('agentCount')]" - }, - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "forceUpdateTag": "[variables('sequenceVersion')]", - "typeHandlerVersion": "1.8", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "https://elsprodch2su1.blob.core.windows.net/ets-containerfor-loadagentresources/bootstrap/ManageVSTSCloudLoadAgent.ps1" - ], - "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File .\\bootstrap\\ManageVSTSCloudLoadAgent.ps1 -TeamServicesAccountName ', parameters('vstsAccountName'), ' -PATToken ', parameters('vstsPersonalAccessToken'), ' -AgentGroupName ', variables('defaultAgentGroupName') , ' -ConfigureAgent')]" - } - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'), 'i', copyIndex()))]" - ], - "condition": "[empty(replace(parameters('agentGroupName'), ' ',''))]" - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'), 'i', copyIndex(), '/StartupScript')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmCopy", - "count": "[parameters('agentCount')]" - }, - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "forceUpdateTag": "[variables('sequenceVersion')]", - "typeHandlerVersion": "1.8", - "autoUpgradeMinorVersion": false, - "settings": { - "fileUris": [ - "https://elsprodch2su1.blob.core.windows.net/ets-containerfor-loadagentresources/bootstrap/ManageVSTSCloudLoadAgent.ps1" - ], - "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File .\\bootstrap\\ManageVSTSCloudLoadAgent.ps1 -TeamServicesAccountName ', parameters('vstsAccountName'), ' -PATToken ', parameters('vstsPersonalAccessToken'), ' -AgentGroupName ', parameters('agentGroupName') , ' -ConfigureAgent')]" - } - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'), 'i', copyIndex()))]" - ], - "condition": "[greater(length(replace(parameters('agentGroupName'), ' ','')),0)]" + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmName'), 'i', copyIndex(), '/StartupScript')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "copy": { + "name": "vmCopy", + "count": "[parameters('agentCount')]" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "forceUpdateTag": "[variables('sequenceVersion')]", + "typeHandlerVersion": "1.8", + "autoUpgradeMinorVersion": false, + "settings": { + "fileUris": [ + "https://elsprodch2su1.blob.core.windows.net/ets-containerfor-loadagentresources/bootstrap/ManageVSTSCloudLoadAgent.ps1" + ], + "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File .\\bootstrap\\ManageVSTSCloudLoadAgent.ps1 -TeamServicesAccountName ', parameters('vstsAccountName'), ' -PATToken ', parameters('vstsPersonalAccessToken'), ' -AgentGroupName ', parameters('agentGroupName') , ' -ConfigureAgent')]" } - ] -} \ No newline at end of file + }, + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'), 'i', copyIndex()))]" + ], + "condition": "[greater(length(replace(parameters('agentGroupName'), ' ','')),0)]" + } + ] +} diff --git a/101-webapp-custom-deployment-slots/azuredeploy.json b/101-webapp-custom-deployment-slots/azuredeploy.json index 675c30808c57..de5d3c3d928e 100644 --- a/101-webapp-custom-deployment-slots/azuredeploy.json +++ b/101-webapp-custom-deployment-slots/azuredeploy.json @@ -21,22 +21,27 @@ "description": "Array with the names for the environment slots" }, "maxLength": 19 + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { "standardPlanMaxAdditionalSlots": 4, "webAppPortalName": "[concat(parameters('baseResourceName'), 'Portal')]", "appServicePlanName": "[concat('AppServicePlan-', parameters('baseResourceName'))]" }, - "resources": [ { "apiVersion": "2017-08-01", "type": "Microsoft.Web/serverfarms", "kind": "app", "name": "[variables('appServicePlanName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This app service plan is used for the web app and slots.", "tags": { "displayName": "AppServicePlan" @@ -52,7 +57,7 @@ "type": "Microsoft.Web/sites", "kind": "app", "name": "[variables('webAppPortalName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This is the web app, also the default 'nameless' slot.", "tags": { "displayName": "WebApp" @@ -69,7 +74,7 @@ "type": "Microsoft.Web/sites/slots", "name": "[concat(variables('webAppPortalName'), '/', parameters('environments')[copyIndex()])]", "kind": "app", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This specifies the web app slots.", "tags": { "displayName": "WebAppSlots" @@ -86,4 +91,4 @@ } } ] -} \ No newline at end of file +} diff --git a/101-webapp-linux-managed-mysql/azuredeploy.json b/101-webapp-linux-managed-mysql/azuredeploy.json index 0e1ddef96bd6..a4f7399b6dd1 100644 --- a/101-webapp-linux-managed-mysql/azuredeploy.json +++ b/101-webapp-linux-managed-mysql/azuredeploy.json @@ -1,166 +1,173 @@ -{ - "$schema":"http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "siteName":{ - "type":"string", - "metadata":{ - "description":"Name of azure web app" - } - }, - "administratorLogin":{ - "type":"string", - "minLength":1, - "metadata":{ - "description":"Database administrator login name" - } - }, - "administratorLoginPassword":{ - "type":"securestring", - "minLength":8, - "metadata":{ - "description":"Database administrator password" - } - }, - "databaseDTU":{ - "type":"int", - "defaultValue":2, - "metadata":{ - "description":"Azure database for MySQL pricing tier" - } - }, - "databaseSkuName":{ - "type":"string", - "defaultValue":"GP_Gen4_2", - "metadata":{ - "description":"Azure database for MySQL sku name " - } +{ + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "siteName": { + "type": "string", + "metadata": { + "description": "Name of azure web app" + } + }, + "administratorLogin": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "Database administrator login name" + } + }, + "administratorLoginPassword": { + "type": "securestring", + "minLength": 8, + "metadata": { + "description": "Database administrator password" + } + }, + "databaseDTU": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "Azure database for MySQL pricing tier" + } + }, + "databaseSkuName": { + "type": "string", + "defaultValue": "GP_Gen4_2", + "metadata": { + "description": "Azure database for MySQL sku name " + } + }, + "databaseSkuSizeMB": { + "type": "int", + "defaultValue": 5120, + "metadata": { + "description": "Azure database for MySQL Sku Size " + } + }, + "databaseSkuTier": { + "type": "string", + "defaultValue": "GeneralPurpose", + "metadata": { + "description": "Azure database for MySQL pricing tier" + } + }, + "mysqlVersion": { + "type": "string", + "allowedValues": [ + "5.6", + "5.7" + ], + "defaultValue": "5.7", + "metadata": { + "description": "MySQL version" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "databaseName": "[concat(parameters('siteName'), 'database')]", + "serverName": "[concat(parameters('siteName'), 'mysqlserver')]", + "hostingPlanName": "[concat(parameters('siteName'), 'serviceplan')]" + }, + "resources": [ + { + "type": "Microsoft.Web/sites", + "name": "[parameters('siteName')]", + "properties": { + "siteConfig": { + "linuxFxVersion": "php|7.0", + "connectionStrings": [ + { + "name": "defaultConnection", + "ConnectionString": "[concat('Database=', variables('databaseName'), ';Data Source=', variables('serverName') ,'.mysql.database.azure.com;User Id=',parameters('administratorLogin'),'@',variables('serverName') ,';Password=',parameters('administratorLoginPassword'))]", + "type": "MySql" + } + ] + }, + "name": "[parameters('siteName')]", + "serverFarmId": "[variables('hostingPlanName')]", + "hostingEnvironment": "" }, - "databaseSkuSizeMB":{ - "type":"int", - "defaultValue":5120, - "metadata":{ - "description":"Azure database for MySQL Sku Size " - } + "apiVersion": "2016-08-01", + "location": "[parameters('location')]", + "dependsOn": [ + "[variables('hostingPlanName')]" + ] + }, + { + "apiVersion": "2016-09-01", + "name": "[variables('hostingPlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('location')]", + "properties": { + "name": "[variables('hostingPlanName')]", + "workerSizeId": "1", + "reserved": true, + "numberOfWorkers": "1", + "hostingEnvironment": "" }, - "databaseSkuTier":{ - "type":"string", - "defaultValue":"GeneralPurpose", - "metadata":{ - "description":"Azure database for MySQL pricing tier" - } + "sku": { + "Tier": "Standard", + "Name": "S1" }, - "mysqlVersion":{ - "type":"string", - "allowedValues":[ - "5.6", - "5.7" - ], - "defaultValue":"5.7", - "metadata":{ - "description":"MySQL version" - } - } - }, - "variables":{ - "databaseName":"[concat(parameters('siteName'), 'database')]", - "serverName":"[concat(parameters('siteName'), 'mysqlserver')]", - "hostingPlanName":"[concat(parameters('siteName'), 'serviceplan')]" - }, - "resources":[ - { - "type":"Microsoft.Web/sites", - "name":"[parameters('siteName')]", - "properties":{ - "siteConfig":{ - "linuxFxVersion":"php|7.0", - "connectionStrings":[ - { - "name":"defaultConnection", - "ConnectionString":"[concat('Database=', variables('databaseName'), ';Data Source=', variables('serverName') ,'.mysql.database.azure.com;User Id=',parameters('administratorLogin'),'@',variables('serverName') ,';Password=',parameters('administratorLoginPassword'))]", - "type":"MySql" - } - ] - }, - "name":"[parameters('siteName')]", - "serverFarmId":"[variables('hostingPlanName')]", - "hostingEnvironment":"" - }, - "apiVersion":"2016-08-01", - "location":"[resourceGroup().location]", - "dependsOn":[ - "[variables('hostingPlanName')]" - ] + "kind": "linux" + }, + { + "apiVersion": "2017-12-01-preview", + "location": "[parameters('location')]", + "name": "[variables('serverName')]", + "properties": { + "version": "[parameters('mysqlVersion')]", + "administratorLogin": "[parameters('administratorLogin')]", + "administratorLoginPassword": "[parameters('administratorLoginPassword')]", + "storageProfile": { + "storageMB": "[parameters('databaseSkuSizeMB')]", + "backupRetentionDays": "7", + "geoRedundantBackup": "Disabled" + }, + "sslEnforcement": "Disabled" }, - { - "apiVersion":"2016-09-01", - "name":"[variables('hostingPlanName')]", - "type":"Microsoft.Web/serverfarms", - "location":"[resourceGroup().location]", - "properties":{ - "name":"[variables('hostingPlanName')]", - "workerSizeId":"1", - "reserved":true, - "numberOfWorkers":"1", - "hostingEnvironment":"" - }, - "sku":{ - "Tier":"Standard", - "Name":"S1" - }, - "kind":"linux" + "sku": { + "name": "[parameters('databaseSkuName')]", + "tier": "[parameters('databaseSkuTier')]", + "capacity": "[parameters('databaseDTU')]", + "size": "[parameters('databaseSkuSizeMB')]", + "family": "Gen4" }, - { - "apiVersion":"2017-12-01-preview", - "location":"[resourceGroup().location]", - "name":"[variables('serverName')]", - "properties":{ - "version":"[parameters('mysqlVersion')]", - "administratorLogin":"[parameters('administratorLogin')]", - "administratorLoginPassword":"[parameters('administratorLoginPassword')]", - "storageProfile":{ - "storageMB":"[parameters('databaseSkuSizeMB')]", - "backupRetentionDays":"7", - "geoRedundantBackup":"Disabled" - }, - "sslEnforcement":"Disabled" - }, - "sku":{ - "name":"[parameters('databaseSkuName')]", - "tier":"[parameters('databaseSkuTier')]", - "capacity":"[parameters('databaseDTU')]", - "size":"[parameters('databaseSkuSizeMB')]", - "family":"Gen4" - }, - "type":"Microsoft.DBforMySQL/servers", - "resources":[ - { - "type":"firewallrules", - "apiVersion":"2017-12-01-preview", - "dependsOn":[ - "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'),'/databases/' , variables('databaseName'))]", - "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]" - ], - "location":"[resourceGroup().location]", - "name":"AllowAzureIPs", - "properties":{ - "startIpAddress":"0.0.0.0", - "endIpAddress":"0.0.0.0" - } - }, - { - "name":"[variables('databaseName')]", - "type":"databases", - "apiVersion":"2017-12-01-preview", - "properties":{ - "charset":"utf8", - "collation":"utf8_general_ci" - }, - "dependsOn":[ - "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]" - ] - } - ] - } - ] -} \ No newline at end of file + "type": "Microsoft.DBforMySQL/servers", + "resources": [ + { + "type": "firewallrules", + "apiVersion": "2017-12-01-preview", + "dependsOn": [ + "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'),'/databases/' , variables('databaseName'))]", + "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]" + ], + "location": "[parameters('location')]", + "name": "AllowAzureIPs", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "0.0.0.0" + } + }, + { + "name": "[variables('databaseName')]", + "type": "databases", + "apiVersion": "2017-12-01-preview", + "properties": { + "charset": "utf8", + "collation": "utf8_general_ci" + }, + "dependsOn": [ + "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]" + ] + } + ] + } + ] +} diff --git a/101-webapp-linux-managed-postgresql/azuredeploy.json b/101-webapp-linux-managed-postgresql/azuredeploy.json index 8aad85461b74..ea03b10487ed 100644 --- a/101-webapp-linux-managed-postgresql/azuredeploy.json +++ b/101-webapp-linux-managed-postgresql/azuredeploy.json @@ -1,177 +1,184 @@ -{ - "$schema":"http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "siteName":{ - "type":"string", - "metadata":{ - "description":"Name of azure web app" - } - }, - "administratorLogin":{ - "type":"string", - "minLength":1, - "metadata":{ - "description":"Database administrator login name" - } - }, - "administratorLoginPassword":{ - "type":"securestring", - "minLength":8, - "maxLength":128, - "metadata":{ - "description":"Database administrator password" - } - }, - "databaseDTU":{ - "type":"int", - "allowedValues":[ - 50, - 100 - ], - "defaultValue":50, - "metadata":{ - "description":"Azure database for PostgreSQL pricing tier" - } - }, - "databaseSkuName":{ - "type":"string", - "allowedValues":[ - "PostgreSQLB100", - "PostgreSQLB50" - ], - "defaultValue":"PostgreSQLB100", - "metadata":{ - "description":"Azure database for PostgreSQL sku name : PostgreSQLB100 (Basic 100 DTU tier) and PostgreSQLB50 (Basic 50 DTU tier)" - } +{ + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "siteName": { + "type": "string", + "metadata": { + "description": "Name of azure web app" + } + }, + "administratorLogin": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "Database administrator login name" + } + }, + "administratorLoginPassword": { + "type": "securestring", + "minLength": 8, + "maxLength": 128, + "metadata": { + "description": "Database administrator password" + } + }, + "databaseDTU": { + "type": "int", + "allowedValues": [ + 50, + 100 + ], + "defaultValue": 50, + "metadata": { + "description": "Azure database for PostgreSQL pricing tier" + } + }, + "databaseSkuName": { + "type": "string", + "allowedValues": [ + "PostgreSQLB100", + "PostgreSQLB50" + ], + "defaultValue": "PostgreSQLB100", + "metadata": { + "description": "Azure database for PostgreSQL sku name : PostgreSQLB100 (Basic 100 DTU tier) and PostgreSQLB50 (Basic 50 DTU tier)" + } + }, + "databaseSkuSizeMB": { + "type": "int", + "allowedValues": [ + 102400, + 51200 + ], + "defaultValue": 51200, + "metadata": { + "description": "Azure database for PostgreSQL Sku Size " + } + }, + "databaseSkuTier": { + "type": "string", + "allowedValues": [ + "Basic" + ], + "defaultValue": "Basic", + "metadata": { + "description": "Azure database for PostgreSQL pricing tier" + } + }, + "postgresqlVersion": { + "type": "string", + "allowedValues": [ + "9.5", + "9.6" + ], + "defaultValue": "9.6", + "metadata": { + "description": "PostgreSQL version" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "databaseName": "[concat(parameters('siteName'), 'database')]", + "serverName": "[concat(parameters('siteName'), 'pgserver')]", + "hostingPlanName": "[concat(parameters('siteName'), 'serviceplan')]" + }, + "resources": [ + { + "type": "Microsoft.Web/sites", + "name": "[parameters('siteName')]", + "dependsOn": [ + "[variables('hostingPlanName')]" + ], + "properties": { + "siteConfig": { + "linuxFxVersion": "node|6.10", + "connectionStrings": [ + { + "name": "defaultConnection", + "ConnectionString": "[concat('Database=', variables('databaseName'), ';Server=', variables('serverName') ,'.postgres.database.azure.com;User Id=',parameters('administratorLogin'),'@',variables('serverName') ,';Password=',parameters('administratorLoginPassword'))]", + "type": "PostgreSQL" + } + ] + }, + "name": "[parameters('siteName')]", + "serverFarmId": "[variables('hostingPlanName')]", + "hostingEnvironment": "" }, - "databaseSkuSizeMB":{ - "type":"int", - "allowedValues":[ - 102400, - 51200 - ], - "defaultValue":51200, - "metadata":{ - "description":"Azure database for PostgreSQL Sku Size " - } + "apiVersion": "2016-03-01", + "location": "[parameters('location')]" + }, + { + "apiVersion": "2016-09-01", + "name": "[variables('hostingPlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('location')]", + "properties": { + "name": "[variables('hostingPlanName')]", + "workerSizeId": "1", + "reserved": true, + "numberOfWorkers": "1", + "hostingEnvironment": "" }, - "databaseSkuTier":{ - "type":"string", - "allowedValues":[ - "Basic" - ], - "defaultValue":"Basic", - "metadata":{ - "description":"Azure database for PostgreSQL pricing tier" - } + "sku": { + "Tier": "Standard", + "Name": "S1" }, - "postgresqlVersion":{ - "type":"string", - "allowedValues":[ - "9.5", - "9.6" - ], - "defaultValue":"9.6", - "metadata":{ - "description":"PostgreSQL version" - } - } - }, - "variables":{ - "databaseName":"[concat(parameters('siteName'), 'database')]", - "serverName":"[concat(parameters('siteName'), 'pgserver')]", - "hostingPlanName":"[concat(parameters('siteName'), 'serviceplan')]" - }, - "resources":[ - { - "type":"Microsoft.Web/sites", - "name":"[parameters('siteName')]", - "dependsOn":[ - "[variables('hostingPlanName')]" - ], - "properties":{ - "siteConfig":{ - "linuxFxVersion":"node|6.10", - "connectionStrings":[ - { - "name":"defaultConnection", - "ConnectionString":"[concat('Database=', variables('databaseName'), ';Server=', variables('serverName') ,'.postgres.database.azure.com;User Id=',parameters('administratorLogin'),'@',variables('serverName') ,';Password=',parameters('administratorLoginPassword'))]", - "type":"PostgreSQL" - } - ] - }, - "name":"[parameters('siteName')]", - "serverFarmId":"[variables('hostingPlanName')]", - "hostingEnvironment":"" - }, - "apiVersion":"2016-03-01", - "location":"[resourceGroup().location]" + "kind": "linux" + }, + { + "apiVersion": "2016-02-01-privatepreview", + "kind": "", + "location": "[parameters('location')]", + "name": "[variables('serverName')]", + "properties": { + "version": "[parameters('postgresqlVersion')]", + "administratorLogin": "[parameters('administratorLogin')]", + "administratorLoginPassword": "[parameters('administratorLoginPassword')]", + "storageMB": "[parameters('databaseSkuSizeMB')]" }, - { - "apiVersion":"2016-09-01", - "name":"[variables('hostingPlanName')]", - "type":"Microsoft.Web/serverfarms", - "location":"[resourceGroup().location]", - "properties":{ - "name":"[variables('hostingPlanName')]", - "workerSizeId":"1", - "reserved":true, - "numberOfWorkers":"1", - "hostingEnvironment":"" - }, - "sku":{ - "Tier":"Standard", - "Name":"S1" - }, - "kind":"linux" + "sku": { + "name": "[parameters('databaseSkuName')]", + "tier": "[parameters('databaseSkuTier')]", + "capacity": "[parameters('databaseDTU')]", + "size": "[parameters('databaseSkuSizeMB')]", + "family": "SkuFamily" }, - { - "apiVersion":"2016-02-01-privatepreview", - "kind":"", - "location":"[resourceGroup().location]", - "name":"[variables('serverName')]", - "properties":{ - "version":"[parameters('postgresqlVersion')]", - "administratorLogin":"[parameters('administratorLogin')]", - "administratorLoginPassword":"[parameters('administratorLoginPassword')]", - "storageMB":"[parameters('databaseSkuSizeMB')]" - }, - "sku":{ - "name":"[parameters('databaseSkuName')]", - "tier":"[parameters('databaseSkuTier')]", - "capacity":"[parameters('databaseDTU')]", - "size":"[parameters('databaseSkuSizeMB')]", - "family":"SkuFamily" - }, - "type":"Microsoft.DBforPostgreSQL/servers", - "resources":[ - { - "type":"firewallrules", - "apiVersion":"2016-02-01-privatepreview", - "dependsOn":[ - "[concat('Microsoft.DBforPostgreSQL/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":"2016-02-01-privatepreview", - "properties":{ - "charset":"utf8", - "collation":"English_United States.1252" - }, - "dependsOn":[ - "[concat('Microsoft.DBforPostgreSQL/servers/', variables('serverName'))]" - ] - } - ] - } - ] -} \ No newline at end of file + "type": "Microsoft.DBforPostgreSQL/servers", + "resources": [ + { + "type": "firewallrules", + "apiVersion": "2016-02-01-privatepreview", + "dependsOn": [ + "[concat('Microsoft.DBforPostgreSQL/servers/', variables('serverName'))]" + ], + "location": "[parameters('location')]", + "name": "[concat(variables('serverName'),'firewall')]", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + }, + { + "name": "[variables('databaseName')]", + "type": "databases", + "apiVersion": "2016-02-01-privatepreview", + "properties": { + "charset": "utf8", + "collation": "English_United States.1252" + }, + "dependsOn": [ + "[concat('Microsoft.DBforPostgreSQL/servers/', variables('serverName'))]" + ] + } + ] + } + ] +} diff --git a/101-webapp-managed-mysql/azuredeploy.json b/101-webapp-managed-mysql/azuredeploy.json index b5c0e577122e..147f3fd0ef12 100644 --- a/101-webapp-managed-mysql/azuredeploy.json +++ b/101-webapp-managed-mysql/azuredeploy.json @@ -1,179 +1,186 @@ -{ - "$schema":"http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "siteName":{ - "type":"string", - "metadata":{ - "description":"Name of azure web app" - } - }, - "administratorLogin":{ - "type":"string", - "minLength":1, - "metadata":{ - "description":"Database administrator login name" - } - }, - "administratorLoginPassword":{ - "type":"securestring", - "minLength":8, - "maxLength":128, - "metadata":{ - "description":"Database administrator password" - } - }, - "databaseDTU":{ - "type":"int", - "defaultValue":2, - "metadata":{ - "description":"Azure database for MySQL pricing tier" - } - }, - "databaseSkuName":{ - "type":"string", - "allowedValues":[ - "GP_Gen4_2" - ], - "defaultValue":"GP_Gen4_2", - "metadata":{ - "description":"Azure database for MySQL sku name" - } - }, - "databaseSkuSizeMB":{ - "type":"int", - "defaultValue":5120, - "metadata":{ - "description":"Azure database for MySQL Sku Size " - } - }, - "databaseSkuTier":{ - "type":"string", - "allowedValues":[ - "GeneralPurpose" - ], - "defaultValue":"GeneralPurpose", - "metadata":{ - "description":"Azure database for MySQL pricing tier" - } +{ + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "siteName": { + "type": "string", + "metadata": { + "description": "Name of azure web app" + } + }, + "administratorLogin": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "Database administrator login name" + } + }, + "administratorLoginPassword": { + "type": "securestring", + "minLength": 8, + "maxLength": 128, + "metadata": { + "description": "Database administrator password" + } + }, + "databaseDTU": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "Azure database for MySQL pricing tier" + } + }, + "databaseSkuName": { + "type": "string", + "allowedValues": [ + "GP_Gen4_2" + ], + "defaultValue": "GP_Gen4_2", + "metadata": { + "description": "Azure database for MySQL sku name" + } + }, + "databaseSkuSizeMB": { + "type": "int", + "defaultValue": 5120, + "metadata": { + "description": "Azure database for MySQL Sku Size " + } + }, + "databaseSkuTier": { + "type": "string", + "allowedValues": [ + "GeneralPurpose" + ], + "defaultValue": "GeneralPurpose", + "metadata": { + "description": "Azure database for MySQL pricing tier" + } + }, + "mysqlVersion": { + "type": "string", + "allowedValues": [ + "5.6", + "5.7" + ], + "defaultValue": "5.6", + "metadata": { + "description": "MySQL version" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "databaseName": "[concat(parameters('siteName'), 'database')]", + "serverName": "[concat(parameters('siteName'), 'pgserver')]", + "hostingPlanName": "[concat(parameters('siteName'), 'serviceplan')]" + }, + "resources": [ + { + "apiVersion": "2016-09-01", + "name": "[variables('hostingPlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('location')]", + "properties": { + "name": "[variables('hostingPlanName')]", + "workerSizeId": "1", + "reserved": true, + "numberOfWorkers": 0, + "hostingEnvironment": "" }, - "mysqlVersion":{ - "type":"string", - "allowedValues":[ - "5.6", - "5.7" - ], - "defaultValue":"5.6", - "metadata":{ - "description":"MySQL version" - } + "sku": { + "Tier": "Standard", + "Name": "S1" } - }, - "variables":{ - "databaseName":"[concat(parameters('siteName'), 'database')]", - "serverName":"[concat(parameters('siteName'), 'pgserver')]", - "hostingPlanName":"[concat(parameters('siteName'), 'serviceplan')]" - }, - "resources":[ - { - "apiVersion":"2016-09-01", - "name":"[variables('hostingPlanName')]", - "type":"Microsoft.Web/serverfarms", - "location":"[resourceGroup().location]", - "properties":{ - "name":"[variables('hostingPlanName')]", - "workerSizeId":"1", - "reserved":true, - "numberOfWorkers":0, - "hostingEnvironment":"" - }, - "sku":{ - "Tier":"Standard", - "Name":"S1" - } + }, + { + "apiVersion": "2016-08-01", + "name": "[parameters('siteName')]", + "type": "Microsoft.Web/sites", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]" + ], + "properties": { + "name": "[parameters('siteName')]", + "serverFarmId": "[variables('hostingPlanName')]", + "hostingEnvironment": "" }, - { - "apiVersion":"2016-08-01", - "name":"[parameters('siteName')]", - "type":"Microsoft.Web/sites", - "location":"[resourceGroup().location]", - "dependsOn":[ - "[concat('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]" - ], - "properties":{ - "name":"[parameters('siteName')]", - "serverFarmId":"[variables('hostingPlanName')]", - "hostingEnvironment":"" - }, - "resources":[ - { - "apiVersion":"2016-08-01", - "name":"connectionstrings", - "type":"config", - "dependsOn":[ - "[concat('Microsoft.Web/sites/', parameters('siteName'))]" - ], - "properties":{ - "defaultConnection":{ - "value":"[concat('Database=', variables('databaseName'), ';Data Source=', variables('serverName'), '.mysql.database.azure.com;User Id=', parameters('administratorLogin'),'@', variables('serverName'),';Password=', parameters('administratorLoginPassword'))]", - "type":"MySql" - } - } + "resources": [ + { + "apiVersion": "2016-08-01", + "name": "connectionstrings", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('siteName'))]" + ], + "properties": { + "defaultConnection": { + "value": "[concat('Database=', variables('databaseName'), ';Data Source=', variables('serverName'), '.mysql.database.azure.com;User Id=', parameters('administratorLogin'),'@', variables('serverName'),';Password=', parameters('administratorLoginPassword'))]", + "type": "MySql" } - ] + } + } + ] + }, + { + "apiVersion": "2017-12-01-preview", + "kind": "", + "location": "[parameters('location')]", + "name": "[variables('serverName')]", + "properties": { + "version": "[parameters('mysqlVersion')]", + "administratorLogin": "[parameters('administratorLogin')]", + "administratorLoginPassword": "[parameters('administratorLoginPassword')]", + "storageProfile": { + "storageMB": "[parameters('databaseSkuSizeMB')]", + "backupRetentionDays": "7", + "geoRedundantBackup": "Disabled" + }, + "sslEnforcement": "Disabled" }, - { - "apiVersion":"2017-12-01-preview", - "kind":"", - "location":"[resourceGroup().location]", - "name":"[variables('serverName')]", - "properties":{ - "version":"[parameters('mysqlVersion')]", - "administratorLogin":"[parameters('administratorLogin')]", - "administratorLoginPassword":"[parameters('administratorLoginPassword')]", - "storageProfile":{ - "storageMB":"[parameters('databaseSkuSizeMB')]", - "backupRetentionDays":"7", - "geoRedundantBackup":"Disabled" - }, - "sslEnforcement":"Disabled" - }, - "sku":{ - "name":"[parameters('databaseSkuName')]", - "tier":"[parameters('databaseSkuTier')]", - "capacity":"[parameters('databaseDTU')]", - "size":"[parameters('databaseSkuSizeMB')]", - "family":"Gen4" - }, - "type":"Microsoft.DBforMySQL/servers", - "resources":[ - { - "type":"firewallrules", - "apiVersion":"2017-12-01-preview", - "dependsOn":[ - "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'),'/databases/' , variables('databaseName'))]", - "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]" - ], - "location":"[resourceGroup().location]", - "name":"AllowAzureIPs", - "properties":{ - "startIpAddress":"0.0.0.0", - "endIpAddress":"0.0.0.0" - } - }, - { - "name":"[variables('databaseName')]", - "type":"databases", - "apiVersion":"2017-12-01-preview", - "properties":{ - "charset":"utf8", - "collation":"utf8_general_ci" - }, - "dependsOn":[ - "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]" - ] - } - ] - } - ] -} \ No newline at end of file + "sku": { + "name": "[parameters('databaseSkuName')]", + "tier": "[parameters('databaseSkuTier')]", + "capacity": "[parameters('databaseDTU')]", + "size": "[parameters('databaseSkuSizeMB')]", + "family": "Gen4" + }, + "type": "Microsoft.DBforMySQL/servers", + "resources": [ + { + "type": "firewallrules", + "apiVersion": "2017-12-01-preview", + "dependsOn": [ + "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'),'/databases/' , variables('databaseName'))]", + "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]" + ], + "location": "[parameters('location')]", + "name": "AllowAzureIPs", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "0.0.0.0" + } + }, + { + "name": "[variables('databaseName')]", + "type": "databases", + "apiVersion": "2017-12-01-preview", + "properties": { + "charset": "utf8", + "collation": "utf8_general_ci" + }, + "dependsOn": [ + "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]" + ] + } + ] + } + ] +} diff --git a/101-webapp-managed-postgresql/azuredeploy.json b/101-webapp-managed-postgresql/azuredeploy.json index 668c06904482..5057fa24d1ed 100644 --- a/101-webapp-managed-postgresql/azuredeploy.json +++ b/101-webapp-managed-postgresql/azuredeploy.json @@ -1,181 +1,188 @@ -{ - "$schema":"http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "siteName":{ - "type":"string", - "metadata":{ - "description":"Name of azure web app" - } - }, - "administratorLogin":{ - "type":"string", - "minLength":1, - "metadata":{ - "description":"Database administrator login name" - } - }, - "administratorLoginPassword":{ - "type":"securestring", - "minLength":8, - "maxLength":128, - "metadata":{ - "description":"Database administrator password" - } - }, - "databaseDTU":{ - "type":"int", - "allowedValues":[ - 50, - 100 - ], - "defaultValue":50, - "metadata":{ - "description":"Azure database for PostgreSQL pricing tier" - } - }, - "databaseSkuName":{ - "type":"string", - "allowedValues":[ - "PostgreSQLB100", - "PostgreSQLB50" - ], - "defaultValue":"PostgreSQLB100", - "metadata":{ - "description":"Azure database for PostgreSQL sku name : PostgreSQLB100 (Basic 100 DTU tier) and PostgreSQLB50 (Basic 50 DTU tier)" - } - }, - "databaseSkuSizeMB":{ - "type":"int", - "allowedValues":[ - 102400, - 51200 - ], - "defaultValue":51200, - "metadata":{ - "description":"Azure database for PostgreSQL Sku Size " - } - }, - "databaseSkuTier":{ - "type":"string", - "allowedValues":[ - "Basic" - ], - "defaultValue":"Basic", - "metadata":{ - "description":"Azure database for PostgreSQL pricing tier" - } +{ + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "siteName": { + "type": "string", + "metadata": { + "description": "Name of azure web app" + } + }, + "administratorLogin": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "Database administrator login name" + } + }, + "administratorLoginPassword": { + "type": "securestring", + "minLength": 8, + "maxLength": 128, + "metadata": { + "description": "Database administrator password" + } + }, + "databaseDTU": { + "type": "int", + "allowedValues": [ + 50, + 100 + ], + "defaultValue": 50, + "metadata": { + "description": "Azure database for PostgreSQL pricing tier" + } + }, + "databaseSkuName": { + "type": "string", + "allowedValues": [ + "PostgreSQLB100", + "PostgreSQLB50" + ], + "defaultValue": "PostgreSQLB100", + "metadata": { + "description": "Azure database for PostgreSQL sku name : PostgreSQLB100 (Basic 100 DTU tier) and PostgreSQLB50 (Basic 50 DTU tier)" + } + }, + "databaseSkuSizeMB": { + "type": "int", + "allowedValues": [ + 102400, + 51200 + ], + "defaultValue": 51200, + "metadata": { + "description": "Azure database for PostgreSQL Sku Size " + } + }, + "databaseSkuTier": { + "type": "string", + "allowedValues": [ + "Basic" + ], + "defaultValue": "Basic", + "metadata": { + "description": "Azure database for PostgreSQL pricing tier" + } + }, + "postgresqlVersion": { + "type": "string", + "allowedValues": [ + "9.5", + "9.6" + ], + "defaultValue": "9.6", + "metadata": { + "description": "PostgreSQL version" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "databaseName": "[concat(parameters('siteName'), 'database')]", + "serverName": "[concat(parameters('siteName'), 'pgserver')]", + "hostingPlanName": "[concat(parameters('siteName'), 'serviceplan')]" + }, + "resources": [ + { + "apiVersion": "2016-09-01", + "name": "[variables('hostingPlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('location')]", + "properties": { + "name": "[variables('hostingPlanName')]", + "workerSize": "1", + "hostingEnvironment": "", + "numberOfWorkers": 0 }, - "postgresqlVersion":{ - "type":"string", - "allowedValues":[ - "9.5", - "9.6" - ], - "defaultValue":"9.6", - "metadata":{ - "description":"PostgreSQL version" - } + "sku": { + "Tier": "Standard", + "Name": "S1" } - }, - "variables":{ - "databaseName":"[concat(parameters('siteName'), 'database')]", - "serverName":"[concat(parameters('siteName'), 'pgserver')]", - "hostingPlanName":"[concat(parameters('siteName'), 'serviceplan')]" - }, - "resources":[ - { - "apiVersion":"2016-09-01", - "name":"[variables('hostingPlanName')]", - "type":"Microsoft.Web/serverfarms", - "location":"[resourceGroup().location]", - "properties":{ - "name":"[variables('hostingPlanName')]", - "workerSize":"1", - "hostingEnvironment":"", - "numberOfWorkers":0 - }, - "sku":{ - "Tier":"Standard", - "Name":"S1" - } + }, + { + "apiVersion": "2016-03-01", + "name": "[parameters('siteName')]", + "type": "Microsoft.Web/sites", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]" + ], + "properties": { + "name": "[parameters('siteName')]", + "serverFarmId": "[variables('hostingPlanName')]", + "hostingEnvironment": "" }, - { - "apiVersion":"2016-03-01", - "name":"[parameters('siteName')]", - "type":"Microsoft.Web/sites", - "location":"[resourceGroup().location]", - "dependsOn":[ - "[concat('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]" - ], - "properties":{ - "name":"[parameters('siteName')]", - "serverFarmId":"[variables('hostingPlanName')]", - "hostingEnvironment":"" - }, - "resources":[ - { - "apiVersion":"2015-04-01", - "name":"connectionstrings", - "type":"config", - "dependsOn":[ - "[concat('Microsoft.Web/sites/', parameters('siteName'))]" - ], - "properties":{ - "defaultConnection":{ - "value":"[concat('Database=', variables('databaseName'), ';Server=', variables('serverName'), '.postgres.database.azure.com;User Id=', parameters('administratorLogin'),'@', variables('serverName'),';Password=', parameters('administratorLoginPassword'))]", - "type":"PostgreSQL" - } - } + "resources": [ + { + "apiVersion": "2015-04-01", + "name": "connectionstrings", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('siteName'))]" + ], + "properties": { + "defaultConnection": { + "value": "[concat('Database=', variables('databaseName'), ';Server=', variables('serverName'), '.postgres.database.azure.com;User Id=', parameters('administratorLogin'),'@', variables('serverName'),';Password=', parameters('administratorLoginPassword'))]", + "type": "PostgreSQL" } - ] + } + } + ] + }, + { + "apiVersion": "2016-02-01-privatepreview", + "kind": "", + "location": "[parameters('location')]", + "name": "[variables('serverName')]", + "properties": { + "version": "[parameters('postgresqlVersion')]", + "administratorLogin": "[parameters('administratorLogin')]", + "administratorLoginPassword": "[parameters('administratorLoginPassword')]", + "storageMB": "[parameters('databaseSkuSizeMB')]" }, - { - "apiVersion":"2016-02-01-privatepreview", - "kind":"", - "location":"[resourceGroup().location]", - "name":"[variables('serverName')]", - "properties":{ - "version":"[parameters('postgresqlVersion')]", - "administratorLogin":"[parameters('administratorLogin')]", - "administratorLoginPassword":"[parameters('administratorLoginPassword')]", - "storageMB":"[parameters('databaseSkuSizeMB')]" - }, - "sku":{ - "name":"[parameters('databaseSkuName')]", - "tier":"[parameters('databaseSkuTier')]", - "capacity":"[parameters('databaseDTU')]", - "size":"[parameters('databaseSkuSizeMB')]", - "family":"SkuFamily" - }, - "type":"Microsoft.DBforPostgreSQL/servers", - "resources":[ - { - "type":"firewallrules", - "apiVersion":"2016-02-01-privatepreview", - "dependsOn":[ - "[concat('Microsoft.DBforPostgreSQL/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":"2016-02-01-privatepreview", - "properties":{ - "charset":"utf8", - "collation":"English_United States.1252" - }, - "dependsOn":[ - "[concat('Microsoft.DBforPostgreSQL/servers/', variables('serverName'))]" - ] - } - ] - } - ] -} \ No newline at end of file + "sku": { + "name": "[parameters('databaseSkuName')]", + "tier": "[parameters('databaseSkuTier')]", + "capacity": "[parameters('databaseDTU')]", + "size": "[parameters('databaseSkuSizeMB')]", + "family": "SkuFamily" + }, + "type": "Microsoft.DBforPostgreSQL/servers", + "resources": [ + { + "type": "firewallrules", + "apiVersion": "2016-02-01-privatepreview", + "dependsOn": [ + "[concat('Microsoft.DBforPostgreSQL/servers/', variables('serverName'))]" + ], + "location": "[parameters('location')]", + "name": "[concat(variables('serverName'),'firewall')]", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + }, + { + "name": "[variables('databaseName')]", + "type": "databases", + "apiVersion": "2016-02-01-privatepreview", + "properties": { + "charset": "utf8", + "collation": "English_United States.1252" + }, + "dependsOn": [ + "[concat('Microsoft.DBforPostgreSQL/servers/', variables('serverName'))]" + ] + } + ] + } + ] +} diff --git a/101-webapp-with-golang/azuredeploy.json b/101-webapp-with-golang/azuredeploy.json index c2f35d8b7d11..16eb2c99aec9 100644 --- a/101-webapp-with-golang/azuredeploy.json +++ b/101-webapp-with-golang/azuredeploy.json @@ -47,6 +47,13 @@ "metadata": { "description": "SKU Name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -54,7 +61,7 @@ "apiVersion": "2015-08-01", "name": "[parameters('appServicePlanName')]", "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "name": "[parameters('appServicePlanName')]" }, @@ -68,7 +75,7 @@ "apiVersion": "2015-08-01", "name": "[parameters('siteName')]", "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Web/serverfarms', parameters('appServicePlanName'))]" ], @@ -119,4 +126,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/101-webappazure-oms-monitoring/azuredeploy.json b/101-webappazure-oms-monitoring/azuredeploy.json index 56a768ead68c..c3052e0f0d39 100644 --- a/101-webappazure-oms-monitoring/azuredeploy.json +++ b/101-webappazure-oms-monitoring/azuredeploy.json @@ -43,9 +43,7 @@ } }, "variables": { - "laApiVersion": "2015-11-01-preview", "aaApiVersion": "2015-10-31", - "omsModuleName": "OMSIngestionAPI", "i-runbookDescription": "Authenticates to Azure and ingests all the SQL Database metrics into an OMS wokrspace specified", "s-runbookDescription": "Creates the schedules for the ingestion runbook to run every ten minutes on the hour", "ingestionRunbookName": "webappazureIngestion", @@ -299,4 +297,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/201-2-vms-internal-load-balancer/azuredeploy.json b/201-2-vms-internal-load-balancer/azuredeploy.json index da6f6d7291d6..2262eb7cc206 100644 --- a/201-2-vms-internal-load-balancer/azuredeploy.json +++ b/201-2-vms-internal-load-balancer/azuredeploy.json @@ -85,6 +85,13 @@ "metadata": { "description": "This is the allowed list of VM sizes" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -101,7 +108,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -110,7 +117,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": 2, "platformUpdateDomainCount": 2, @@ -121,7 +128,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -142,7 +149,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('networkInterfaceName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[variables('numberOfInstances')]" @@ -174,7 +181,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/loadBalancers", "name": "[parameters('loadBalancerName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('vnetID')]" ], @@ -237,7 +244,7 @@ "name": "virtualMachineLoop", "count": "[variables('numberOfInstances')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'), copyindex())]", diff --git a/201-aci-linuxcontainer-volume-emptydir/azuredeploy.json b/201-aci-linuxcontainer-volume-emptydir/azuredeploy.json index 6b7d3dece186..2d89cc63eefb 100644 --- a/201-aci-linuxcontainer-volume-emptydir/azuredeploy.json +++ b/201-aci-linuxcontainer-volume-emptydir/azuredeploy.json @@ -53,6 +53,13 @@ "description": "The amount of memory to allocate to the container in gigabytes." }, "defaultValue": "1.5" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -61,7 +68,7 @@ "name": "[parameters('containergroupname')]", "type": "Microsoft.ContainerInstance/containerGroups", "apiVersion": "2017-10-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "containers": [ { diff --git a/201-aci-linuxcontainer-volume-gitrepo/azuredeploy.json b/201-aci-linuxcontainer-volume-gitrepo/azuredeploy.json index dd28c9503539..1d428bdf7020 100644 --- a/201-aci-linuxcontainer-volume-gitrepo/azuredeploy.json +++ b/201-aci-linuxcontainer-volume-gitrepo/azuredeploy.json @@ -40,6 +40,13 @@ "description": "The amount of memory to allocate to the container in gigabytes." }, "defaultValue": "1.5" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -48,7 +55,7 @@ "name": "[parameters('containergroupname')]", "type": "Microsoft.ContainerInstance/containerGroups", "apiVersion": "2017-12-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "containers": [ { diff --git a/201-aci-linuxcontainer-volume-secret/azuredeploy.json b/201-aci-linuxcontainer-volume-secret/azuredeploy.json index b8246bf29112..4f82f198456b 100644 --- a/201-aci-linuxcontainer-volume-secret/azuredeploy.json +++ b/201-aci-linuxcontainer-volume-secret/azuredeploy.json @@ -67,6 +67,13 @@ "description": "The amount of memory to allocate to the container in gigabytes." }, "defaultValue": "1.5" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -75,7 +82,7 @@ "name": "[parameters('containergroupname')]", "type": "Microsoft.ContainerInstance/containerGroups", "apiVersion": "2018-02-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [], "properties": { "containers": [ diff --git a/201-aci-udp/azuredeploy.json b/201-aci-udp/azuredeploy.json index d4c1ac0d2c94..b93cf3c13392 100644 --- a/201-aci-udp/azuredeploy.json +++ b/201-aci-udp/azuredeploy.json @@ -1,108 +1,115 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "containerName": { - "type": "string", - "metadata": { - "description": "Name for the container group" - } - }, - "containerURI": { - "defaultValue": "annonator/aciudptest:latest", - "type": "string", - "metadata": { - "description": "Container image to deploy. Should be of the form accountName/imagename:tag for images stored in Docker Hub or a fully qualified URI for a private registry like the Azure Container Registry." - } - }, - "osType": { - "defaultValue": "Linux", - "allowedValues": [ - "Linux", - "Windows" - ], - "type": "string", - "metadata": { - "description": "The host OS needed for your container" - } - }, - "numberCores": { - "defaultValue": "1", - "type": "string", - "metadata": { - "description": "The number of CPU cores to allocate to the container. Must be an integer." - } - }, - "memory": { - "defaultValue": "1.5", - "type": "string", - "metadata": { - "description": "The amount of memory to allocate to the container in gigabytes." - } - }, - "ports": { - "defaultValue": "1234", - "type": "string", - "metadata": { - "description": "The Ports that should be exposed." - } - }, - "portProtocol": { - "defaultValue": "udp", - "type": "string", - "metadata": { - "description": "The Protocol used to expose the Port." - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "containerName": { + "type": "string", + "metadata": { + "description": "Name for the container group" + } }, - "variables": { - "containerName": "[parameters('containerName')]", - "containerURI": "[parameters('containerURI')]", - "osType": "[parameters('osType')]", - "numberCores": "[int(parameters('numberCores'))]", - "memory": "[float(parameters('memory'))]", - "port": "[parameters('ports')]", - "randomName": "[concat('-',substring(parameters('containerName'),0,3))]" + "containerURI": { + "defaultValue": "annonator/aciudptest:latest", + "type": "string", + "metadata": { + "description": "Container image to deploy. Should be of the form accountName/imagename:tag for images stored in Docker Hub or a fully qualified URI for a private registry like the Azure Container Registry." + } }, - "resources": [ - { - "type": "Microsoft.ContainerInstance/containerGroups", - "name": "[concat(variables('containerName'),variables('randomName'),'1')]", - "apiVersion": "2017-10-01-preview", - "location": "[resourceGroup().location]", + "osType": { + "defaultValue": "Linux", + "allowedValues": [ + "Linux", + "Windows" + ], + "type": "string", + "metadata": { + "description": "The host OS needed for your container" + } + }, + "numberCores": { + "defaultValue": "1", + "type": "string", + "metadata": { + "description": "The number of CPU cores to allocate to the container. Must be an integer." + } + }, + "memory": { + "defaultValue": "1.5", + "type": "string", + "metadata": { + "description": "The amount of memory to allocate to the container in gigabytes." + } + }, + "ports": { + "defaultValue": "1234", + "type": "string", + "metadata": { + "description": "The Ports that should be exposed." + } + }, + "portProtocol": { + "defaultValue": "udp", + "type": "string", + "metadata": { + "description": "The Protocol used to expose the Port." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "containerName": "[parameters('containerName')]", + "containerURI": "[parameters('containerURI')]", + "osType": "[parameters('osType')]", + "numberCores": "[int(parameters('numberCores'))]", + "memory": "[float(parameters('memory'))]", + "port": "[parameters('ports')]", + "randomName": "[concat('-',substring(parameters('containerName'),0,3))]" + }, + "resources": [ + { + "type": "Microsoft.ContainerInstance/containerGroups", + "name": "[concat(variables('containerName'),variables('randomName'),'1')]", + "apiVersion": "2017-10-01-preview", + "location": "[parameters('location')]", + "properties": { + "containers": [ + { + "name": "[variables('containerName')]", "properties": { - "containers": [ - { - "name": "[variables('containerName')]", - "properties": { - "image": "[variables('containerURI')]", - "ports": [ - { - "protocol": "[parameters('portProtocol')]", - "port": "[variables('port')]" - } - ], - "resources": { - "requests": { - "cpu": "[variables('numberCores')]", - "memoryInGb": "[variables('memory')]" - } - } - } - } - ], - "osType": "[variables('osType')]", - "ipAddress": { - "type": "Public", - "ports": [ - { - "protocol": "[parameters('portProtocol')]", - "port": "[variables('port')]" - } - ] + "image": "[variables('containerURI')]", + "ports": [ + { + "protocol": "[parameters('portProtocol')]", + "port": "[variables('port')]" + } + ], + "resources": { + "requests": { + "cpu": "[variables('numberCores')]", + "memoryInGb": "[variables('memory')]" } + } + } + } + ], + "osType": "[variables('osType')]", + "ipAddress": { + "type": "Public", + "ports": [ + { + "protocol": "[parameters('portProtocol')]", + "port": "[variables('port')]" } + ] } - ], - "outputs": {} -} \ No newline at end of file + } + } + ], + "outputs": {} +} diff --git a/201-aci-wordpress/azuredeploy.json b/201-aci-wordpress/azuredeploy.json index 578b3eec64f0..2fb50361547f 100644 --- a/201-aci-wordpress/azuredeploy.json +++ b/201-aci-wordpress/azuredeploy.json @@ -1,247 +1,254 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "storageAccountType": { - "type": "string", - "defaultValue": "Standard_LRS", - "allowedValues": [ - "Standard_LRS", - "Standard_GRS", - "Standard_ZRS" - ], - "metadata": { - "description": "Storage Account type" - } - }, - "storageAccountName": { - "type": "string", - "defaultValue": "[uniquestring(resourceGroup().id)]", - "metadata": { - "description": "Storage Account Name" - } - }, - "siteName": { - "type": "string", - "defaultValue": "[uniquestring(resourceGroup().id)]", - "metadata": { - "description": "WordPress Site Name" - } - }, - "mysqlPassword": { - "type": "securestring", - "metadata": { - "description": "MySQL database password" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "storageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_ZRS" + ], + "metadata": { + "description": "Storage Account type" + } }, - "variables": { - "image": "microsoft/azure-cli", - "cpuCores": "0.5", - "memoryInGb": "0.7", - "shareContainerGroupName": "createshare-containerinstance", - "wordpressContainerGroupName": "wordpress-containerinstance", - "wordpressShareName": "wordpress-share", - "mysqlShareName": "mysql-share" + "storageAccountName": { + "type": "string", + "defaultValue": "[uniquestring(resourceGroup().id)]", + "metadata": { + "description": "Storage Account Name" + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('storageAccountName')]", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "[parameters('storageAccountType')]" - }, - "kind": "Storage", - "properties": {} - }, - { - "name": "[variables('shareContainerGroupName')]", - "type": "Microsoft.ContainerInstance/containerGroups", - "apiVersion": "2018-02-01-preview", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]" - ], + "siteName": { + "type": "string", + "defaultValue": "[uniquestring(resourceGroup().id)]", + "metadata": { + "description": "WordPress Site Name" + } + }, + "mysqlPassword": { + "type": "securestring", + "metadata": { + "description": "MySQL database password" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "image": "microsoft/azure-cli", + "cpuCores": "0.5", + "memoryInGb": "0.7", + "shareContainerGroupName": "createshare-containerinstance", + "wordpressContainerGroupName": "wordpress-containerinstance", + "wordpressShareName": "wordpress-share", + "mysqlShareName": "mysql-share" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('storageAccountName')]", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "kind": "Storage", + "properties": {} + }, + { + "name": "[variables('shareContainerGroupName')]", + "type": "Microsoft.ContainerInstance/containerGroups", + "apiVersion": "2018-02-01-preview", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]" + ], + "properties": { + "containers": [ + { + "name": "[variables('wordpressShareName')]", "properties": { - "containers": [ - { - "name": "[variables('wordpressShareName')]", - "properties": { - "image": "[variables('image')]", - "command": [ - "az", - "storage", - "share", - "create", - "--name", - "[variables('wordpressShareName')]" - ], - "environmentVariables": [ - { - "name": "AZURE_STORAGE_KEY", - "value": "[listKeys(parameters('storageAccountName'),'2017-10-01').keys[0].value]" - }, - { - "name": "AZURE_STORAGE_ACCOUNT", - "value": "[parameters('storageAccountName')]" - } - ], - "resources": { - "requests": { - "cpu": "[variables('cpuCores')]", - "memoryInGb": "[variables('memoryInGb')]" - } - } - } - }, - { - "name": "[variables('mysqlShareName')]", - "properties": { - "image": "[variables('image')]", - "command": [ - "az", - "storage", - "share", - "create", - "--name", - "[variables('mysqlShareName')]" - ], - "environmentVariables": [ - { - "name": "AZURE_STORAGE_KEY", - "value": "[listKeys(parameters('storageAccountName'),'2017-10-01').keys[0].value]" - }, - { - "name": "AZURE_STORAGE_ACCOUNT", - "value": "[parameters('storageAccountName')]" - } - ], - "resources": { - "requests": { - "cpu": "[variables('cpuCores')]", - "memoryInGb": "[variables('memoryInGb')]" - } - } - } - } - ], - "restartPolicy": "OnFailure", - "osType": "Linux" + "image": "[variables('image')]", + "command": [ + "az", + "storage", + "share", + "create", + "--name", + "[variables('wordpressShareName')]" + ], + "environmentVariables": [ + { + "name": "AZURE_STORAGE_KEY", + "value": "[listKeys(parameters('storageAccountName'),'2017-10-01').keys[0].value]" + }, + { + "name": "AZURE_STORAGE_ACCOUNT", + "value": "[parameters('storageAccountName')]" + } + ], + "resources": { + "requests": { + "cpu": "[variables('cpuCores')]", + "memoryInGb": "[variables('memoryInGb')]" + } + } } - }, - { - "name": "[variables('wordpresscontainerGroupName')]", - "type": "Microsoft.ContainerInstance/containerGroups", - "apiVersion": "2018-02-01-preview", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.ContainerInstance/containerGroups/', variables('shareContainerGroupName'))]" - ], + }, + { + "name": "[variables('mysqlShareName')]", + "properties": { + "image": "[variables('image')]", + "command": [ + "az", + "storage", + "share", + "create", + "--name", + "[variables('mysqlShareName')]" + ], + "environmentVariables": [ + { + "name": "AZURE_STORAGE_KEY", + "value": "[listKeys(parameters('storageAccountName'),'2017-10-01').keys[0].value]" + }, + { + "name": "AZURE_STORAGE_ACCOUNT", + "value": "[parameters('storageAccountName')]" + } + ], + "resources": { + "requests": { + "cpu": "[variables('cpuCores')]", + "memoryInGb": "[variables('memoryInGb')]" + } + } + } + } + ], + "restartPolicy": "OnFailure", + "osType": "Linux" + } + }, + { + "name": "[variables('wordpresscontainerGroupName')]", + "type": "Microsoft.ContainerInstance/containerGroups", + "apiVersion": "2018-02-01-preview", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.ContainerInstance/containerGroups/', variables('shareContainerGroupName'))]" + ], + "properties": { + "containers": [ + { + "name": "wordpress", "properties": { - "containers": [ - { - "name": "wordpress", - "properties": { - "image": "wordpress:4.9-apache", - "ports": [ - { - "protocol": "tcp", - "port": 80 - } - ], - "environmentVariables": [ - { - "name": "WORDPRESS_DB_HOST", - "value": "127.0.0.1:3306" - }, - { - "name": "WORDPRESS_DB_PASSWORD", - "value": "[parameters('mysqlPassword')]" - } - ], - "volumeMounts": [ - { - "mountPath": "/var/www/html", - "name": "wordpressfile" - } - ], - "resources": { - "requests": { - "cpu": "[variables('cpuCores')]", - "memoryInGb": "[variables('memoryInGb')]" - } - } - } - }, - { - "name": "mysql", - "properties": { - "image": "mysql:5.6", - "ports": [ - { - "protocol": "tcp", - "port": 3306 - } - ], - "environmentVariables": [ - { - "name": "MYSQL_ROOT_PASSWORD", - "value": "[parameters('mysqlPassword')]" - } - ], - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql", - "name": "mysqlfile" - } - ], - "resources": { - "requests": { - "cpu": "[variables('cpuCores')]", - "memoryInGb": "[variables('memoryInGb')]" - } - } - } - } - ], - "volumes": [ - { - "azureFile": { - "shareName": "[variables('wordpressShareName')]", - "storageAccountKey": "[listKeys(parameters('storageAccountName'),'2017-10-01').keys[0].value]", - "storageAccountName": "[parameters('storageAccountName')]" - }, - "name": "wordpressfile" - }, - { - "azureFile": { - "shareName": "[variables('mysqlShareName')]", - "storageAccountKey": "[listKeys(parameters('storageAccountName'),'2017-10-01').keys[0].value]", - "storageAccountName": "[parameters('storageAccountName')]" - }, - "name": "mysqlfile" - } - ], - "ipAddress": { - "ports": [ - { - "protocol": "tcp", - "port": 80 - } - ], - "type": "Public", - "dnsNameLabel": "[parameters('siteName')]" + "image": "wordpress:4.9-apache", + "ports": [ + { + "protocol": "tcp", + "port": 80 + } + ], + "environmentVariables": [ + { + "name": "WORDPRESS_DB_HOST", + "value": "127.0.0.1:3306" }, - "osType": "Linux" + { + "name": "WORDPRESS_DB_PASSWORD", + "value": "[parameters('mysqlPassword')]" + } + ], + "volumeMounts": [ + { + "mountPath": "/var/www/html", + "name": "wordpressfile" + } + ], + "resources": { + "requests": { + "cpu": "[variables('cpuCores')]", + "memoryInGb": "[variables('memoryInGb')]" + } + } } - } - ], - "outputs": { - "siteFQDN":{ - "type": "string", - "value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', variables('wordpresscontainerGroupName'))).ipAddress.fqdn]" - } - } -} \ No newline at end of file + }, + { + "name": "mysql", + "properties": { + "image": "mysql:5.6", + "ports": [ + { + "protocol": "tcp", + "port": 3306 + } + ], + "environmentVariables": [ + { + "name": "MYSQL_ROOT_PASSWORD", + "value": "[parameters('mysqlPassword')]" + } + ], + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql", + "name": "mysqlfile" + } + ], + "resources": { + "requests": { + "cpu": "[variables('cpuCores')]", + "memoryInGb": "[variables('memoryInGb')]" + } + } + } + } + ], + "volumes": [ + { + "azureFile": { + "shareName": "[variables('wordpressShareName')]", + "storageAccountKey": "[listKeys(parameters('storageAccountName'),'2017-10-01').keys[0].value]", + "storageAccountName": "[parameters('storageAccountName')]" + }, + "name": "wordpressfile" + }, + { + "azureFile": { + "shareName": "[variables('mysqlShareName')]", + "storageAccountKey": "[listKeys(parameters('storageAccountName'),'2017-10-01').keys[0].value]", + "storageAccountName": "[parameters('storageAccountName')]" + }, + "name": "mysqlfile" + } + ], + "ipAddress": { + "ports": [ + { + "protocol": "tcp", + "port": 80 + } + ], + "type": "Public", + "dnsNameLabel": "[parameters('siteName')]" + }, + "osType": "Linux" + } + } + ], + "outputs": { + "siteFQDN": { + "type": "string", + "value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', variables('wordpresscontainerGroupName'))).ipAddress.fqdn]" + } + } +} diff --git a/201-alert-to-queue-with-logic-app/azuredeploy.json b/201-alert-to-queue-with-logic-app/azuredeploy.json index c430d2e25796..c8e0851c37cb 100644 --- a/201-alert-to-queue-with-logic-app/azuredeploy.json +++ b/201-alert-to-queue-with-logic-app/azuredeploy.json @@ -25,20 +25,27 @@ "metadata": { "description": "The name of the queue to add a message to." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "$singleQuote":"'" + "$singleQuote": "'" }, "resources": [ { "type": "Microsoft.Web/connections", "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[parameters('serviceBusConnectionName')]", "properties": { "api": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/servicebus')]" + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/servicebus')]" }, "displayName": "servicebus", "parameterValues": { @@ -50,7 +57,7 @@ "type": "Microsoft.Logic/workflows", "apiVersion": "2016-06-01", "name": "[parameters('logicAppName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnectionName'))]" ], @@ -60,7 +67,7 @@ "contentVersion": "1.0.0.0", "parameters": { "$connections": { - "defaultValue": { }, + "defaultValue": {}, "type": "Object" } }, @@ -97,7 +104,7 @@ "$connections": { "value": { "servicebus": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/servicebus')]", + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/servicebus')]", "connectionId": "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnectionName'))]" } } @@ -107,9 +114,9 @@ } ], "outputs": { - "WebHookURI": { - "type": "string", - "value": "[listCallbackURL(concat(resourceId('Microsoft.Logic/workflows/', parameters('logicAppName')), '/triggers/manual'), '2016-06-01').value]" - } + "WebHookURI": { + "type": "string", + "value": "[listCallbackURL(concat(resourceId('Microsoft.Logic/workflows/', parameters('logicAppName')), '/triggers/manual'), '2016-06-01').value]" + } } } diff --git a/201-alert-to-slack-with-logic-app/azuredeploy.json b/201-alert-to-slack-with-logic-app/azuredeploy.json index b84dbc34de9d..5c8b88902515 100644 --- a/201-alert-to-slack-with-logic-app/azuredeploy.json +++ b/201-alert-to-slack-with-logic-app/azuredeploy.json @@ -1,202 +1,209 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "logicAppName": { - "type": "string", - "metadata": { - "description": "The name for the logic app." - } - }, - "slackConnectionName": { - "type": "string", - "defaultValue": "SlackConnection", - "metadata": { - "description": "The name for the Slack connection." - } - }, - "slackChannel": { - "type": "string", - "defaultValue": "#general", - "metadata": { - "description": "The Slack channel to post to." - } - }, - "svcPlanName": { - "type": "string", - "defaultValue": "SlackLogicAppsPlan", - "metadata": { - "description": "The name of the App Service plan to create for hosting the logic app." - } - }, - "sku": { - "type": "string", - "defaultValue": "Standard", - "allowedValues": [ - "Free", - "Basic", - "Standard", - "Premium" - ], - "metadata": { - "description": "The pricing tier for the App Service plan." - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "logicAppName": { + "type": "string", + "metadata": { + "description": "The name for the logic app." + } + }, + "slackConnectionName": { + "type": "string", + "defaultValue": "SlackConnection", + "metadata": { + "description": "The name for the Slack connection." + } + }, + "slackChannel": { + "type": "string", + "defaultValue": "#general", + "metadata": { + "description": "The Slack channel to post to." + } + }, + "svcPlanName": { + "type": "string", + "defaultValue": "SlackLogicAppsPlan", + "metadata": { + "description": "The name of the App Service plan to create for hosting the logic app." + } + }, + "sku": { + "type": "string", + "defaultValue": "Standard", + "allowedValues": [ + "Free", + "Basic", + "Standard", + "Premium" + ], + "metadata": { + "description": "The pricing tier for the App Service plan." + } + }, + "svcPlanSize": { + "defaultValue": "S1", + "type": "string", + "metadata": { + "description": "The instance size of the app." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2015-08-01", + "name": "[parameters('svcPlanName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('svcPlanSize')]", + "tier": "[parameters('sku')]", + "capacity": 1 + } + }, + { + "type": "Microsoft.Web/connections", + "apiVersion": "2016-06-01", + "location": "[parameters('location')]", + "name": "[parameters('slackConnectionName')]", + "properties": { + "api": { + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/slack')]" }, - "svcPlanSize": { - "defaultValue": "S1", - "type": "string", - "metadata": { - "description": "The instance size of the app." - } - } + "displayName": "slack", + "parameterValues": {} + } }, - "variables": {}, - "resources": [ - { - "type": "Microsoft.Web/serverfarms", - "apiVersion": "2015-08-01", - "name": "[parameters('svcPlanName')]", - "location": "[resourceGroup().location]", - "sku": { - "name": "[parameters('svcPlanSize')]", - "tier": "[parameters('sku')]", - "capacity": 1 - } + { + "type": "Microsoft.Logic/workflows", + "apiVersion": "2015-02-01-preview", + "name": "[parameters('logicAppName')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/connections', parameters('slackConnectionName'))]", + "[resourceId('Microsoft.Web/serverfarms', parameters('svcPlanName'))]" + ], + "location": "[parameters('location')]", + "properties": { + "sku": { + "name": "[parameters('sku')]", + "plan": { + "id": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/',parameters('svcPlanName'))]" + } }, - { - "type": "Microsoft.Web/connections", - "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", - "name": "[parameters('slackConnectionName')]", - "properties": { - "api": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/slack')]" - }, - "displayName": "slack", - "parameterValues": {} + "definition": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "$connections": { + "defaultValue": {}, + "type": "Object" } - }, - { - "type": "Microsoft.Logic/workflows", - "apiVersion": "2015-02-01-preview", - "name": "[parameters('logicAppName')]", - "dependsOn": [ - "[resourceId('Microsoft.Web/connections', parameters('slackConnectionName'))]", - "[resourceId('Microsoft.Web/serverfarms', parameters('svcPlanName'))]" - ], - "location": "[resourceGroup().location]", - "properties": { - "sku": { - "name": "[parameters('sku')]", - "plan": { - "id": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/',parameters('svcPlanName'))]" - } - }, - "definition": { - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "$connections": { - "defaultValue": {}, - "type": "Object" - } - }, - "triggers": { - "manual": { - "type": "request", - "kind": "Http", - "inputs": { - "schema": { - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "context": { - "properties": { - "name": { - "type": "string" - }, - "portalLink": { - "type": "string" - }, - "resourceName": { - "type": "string" - } - }, - "required": [ - "name", - "portalLink", - "resourceName" - ], - "type": "object" - }, - "status": { - "type": "string" - } - }, - "required": [ - "status", - "context" - ], - "type": "object" - } - } - } - }, - "actions": { - "Http": { - "type": "Http", - "inputs": { - "body": { - "longUrl": "@{triggerBody()['context']['portalLink']}" - }, - "headers": { - "Content-Type": "application/json" - }, - "method": "POST", - "uri": "https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyBkT1BRbA-uULHz8HMUAi0ywJtpNLXHShI" - }, - "runAfter": {} + }, + "triggers": { + "manual": { + "type": "request", + "kind": "Http", + "inputs": { + "schema": { + "$schema": "http://json-schema.org/draft-04/schema#", + "properties": { + "context": { + "properties": { + "name": { + "type": "string" }, - "Post_Message": { - "type": "ApiConnection", - "inputs": { - "host": { - "connection": { - "name": "@parameters('$connections')['slack']['connectionId']" - } - }, - "method": "post", - "path": "/chat.postMessage", - "queries": { - "channel": "[parameters('slackChannel')]", - "text": "Azure Alert - '@{triggerBody()['context']['name']}' @{triggerBody()['status']} on '@{triggerBody()['context']['resourceName']}'. Details: @{body('Http')['id']}" - } - }, - "runAfter": { - "Http": [ - "Succeeded" - ] - } + "portalLink": { + "type": "string" + }, + "resourceName": { + "type": "string" } + }, + "required": [ + "name", + "portalLink", + "resourceName" + ], + "type": "object" }, - "outputs": {} - }, - "parameters": { - "$connections": { - "value": { - "slack": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/slack')]", - "connectionId": "[resourceId('Microsoft.Web/connections', parameters('slackConnectionName'))]" - } - } + "status": { + "type": "string" } + }, + "required": [ + "status", + "context" + ], + "type": "object" } + } } + }, + "actions": { + "Http": { + "type": "Http", + "inputs": { + "body": { + "longUrl": "@{triggerBody()['context']['portalLink']}" + }, + "headers": { + "Content-Type": "application/json" + }, + "method": "POST", + "uri": "https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyBkT1BRbA-uULHz8HMUAi0ywJtpNLXHShI" + }, + "runAfter": {} + }, + "Post_Message": { + "type": "ApiConnection", + "inputs": { + "host": { + "connection": { + "name": "@parameters('$connections')['slack']['connectionId']" + } + }, + "method": "post", + "path": "/chat.postMessage", + "queries": { + "channel": "[parameters('slackChannel')]", + "text": "Azure Alert - '@{triggerBody()['context']['name']}' @{triggerBody()['status']} on '@{triggerBody()['context']['resourceName']}'. Details: @{body('Http')['id']}" + } + }, + "runAfter": { + "Http": [ + "Succeeded" + ] + } + } + }, + "outputs": {} + }, + "parameters": { + "$connections": { + "value": { + "slack": { + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/slack')]", + "connectionId": "[resourceId('Microsoft.Web/connections', parameters('slackConnectionName'))]" + } + } + } } - ], - "outputs": { - "WebHookURI": { - "type": "string", - "value": "[listCallbackURL(concat(resourceId('Microsoft.Logic/workflows/', parameters('logicAppName')), '/triggers/manual'), '2016-06-01').value]" - } + } + } + ], + "outputs": { + "WebHookURI": { + "type": "string", + "value": "[listCallbackURL(concat(resourceId('Microsoft.Logic/workflows/', parameters('logicAppName')), '/triggers/manual'), '2016-06-01').value]" } -} \ No newline at end of file + } +} diff --git a/201-alert-to-text-message-with-logic-app/azuredeploy.json b/201-alert-to-text-message-with-logic-app/azuredeploy.json index f4e713e714bd..89a2b4f325ed 100644 --- a/201-alert-to-text-message-with-logic-app/azuredeploy.json +++ b/201-alert-to-text-message-with-logic-app/azuredeploy.json @@ -1,179 +1,185 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "logicAppName": { - "type": "string", - "metadata": { - "description": "The name for the logic app." - } - }, - "twilioSid": { - "type": "securestring", - "metadata": { - "description": "Your Twilio SID." - } - }, - "twilioToken": { - "type": "securestring", - "metadata": { - "description": "Your Twilio AuthToken." - } - }, - "twilioConnectionName": { - "type": "string", - "defaultValue": "TwilioConnection", - "metadata": { - "description": "The name for the Twilio connection." - } - }, - "twilioAccountNumber": { - "type":"string", - "metadata": { - "description": "The Twilio number the message will send from." - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "logicAppName": { + "type": "string", + "metadata": { + "description": "The name for the logic app." + } + }, + "twilioSid": { + "type": "securestring", + "metadata": { + "description": "Your Twilio SID." + } + }, + "twilioToken": { + "type": "securestring", + "metadata": { + "description": "Your Twilio AuthToken." + } + }, + "twilioConnectionName": { + "type": "string", + "defaultValue": "TwilioConnection", + "metadata": { + "description": "The name for the Twilio connection." + } + }, + "twilioAccountNumber": { + "type": "string", + "metadata": { + "description": "The Twilio number the message will send from." + } + }, + "toPhoneNumber": { + "type": "string", + "metadata": { + "description": "The phone number the message will send to." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Web/connections", + "apiVersion": "2016-06-01", + "location": "[parameters('location')]", + "name": "[parameters('twilioConnectionName')]", + "properties": { + "api": { + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/twilio')]" }, - "toPhoneNumber":{ - "type":"string", - "metadata": { - "description": "The phone number the message will send to." - } + "displayName": "twilio", + "parameterValues": { + "sid": "[parameters('twilioSid')]", + "token": "[parameters('twilioToken')]" } + } }, - "variables": {}, - "resources": [ - - { - "type": "Microsoft.Web/connections", - "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", - "name": "[parameters('twilioConnectionName')]", - "properties": { - "api": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/twilio')]" - }, - "displayName": "twilio", - "parameterValues": { - "sid": "[parameters('twilioSid')]", - "token": "[parameters('twilioToken')]" - } + { + "type": "Microsoft.Logic/workflows", + "apiVersion": "2016-06-01", + "name": "[parameters('logicAppName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/connections', parameters('twilioConnectionName'))]" + ], + "properties": { + "definition": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "$connections": { + "defaultValue": {}, + "type": "Object" } - }, - { - "type": "Microsoft.Logic/workflows", - "apiVersion": "2016-06-01", - "name": "[parameters('logicAppName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Web/connections', parameters('twilioConnectionName'))]" - ], - "properties": { - "definition": { - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "$connections": { - "defaultValue": {}, - "type": "Object" - } - }, - "triggers": { - "manual": { - "type": "request", - "kind": "Http", - "inputs": { - "schema": { - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "context": { - "properties": { - "name": { - "type": "string" - }, - "portalLink": { - "type": "string" - }, - "resourceName": { - "type": "string" - } - }, - "required": [ - "name", - "portalLink", - "resourceName" - ], - "type": "object" - }, - "status": { - "type": "string" - } - }, - "required": [ - "status", - "context" - ], - "type": "object" - } - } - } - }, - "actions": { - "Http": { - "type": "Http", - "inputs": { - "body": { - "longUrl": "@{triggerBody()['context']['portalLink']}" - }, - "headers": { - "Content-Type": "application/json" - }, - "method": "POST", - "uri": "https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyBkT1BRbA-uULHz8HMUAi0ywJtpNLXHShI" - }, - "runAfter": {} + }, + "triggers": { + "manual": { + "type": "request", + "kind": "Http", + "inputs": { + "schema": { + "$schema": "http://json-schema.org/draft-04/schema#", + "properties": { + "context": { + "properties": { + "name": { + "type": "string" + }, + "portalLink": { + "type": "string" }, - "Send_Message": { - "type": "ApiConnection", - "inputs": { - "body": { - "body": "Azure Alert - '@{triggerBody()['context']['name']}' @{triggerBody()['status']} on '@{triggerBody()['context']['resourceName']}'. Details: @{body('Http')['id']}", - "from": "[parameters('twilioAccountNumber')]", - "to": "[parameters('toPhoneNumber')]" - }, - "host": { - "connection": { - "name": "@parameters('$connections')['twilio']['connectionId']" - } - }, - "method": "post", - "path": "/Messages.json" - }, - "runAfter": - { - "Http": ["Succeeded"] - } - + "resourceName": { + "type": "string" } + }, + "required": [ + "name", + "portalLink", + "resourceName" + ], + "type": "object" }, - "outputs": {} - }, - "parameters": { - "$connections": { - "value": { - "twilio": { - "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/twilio')]", - "connectionId": "[resourceId('Microsoft.Web/connections', parameters('twilioConnectionName'))]" - } - } + "status": { + "type": "string" } + }, + "required": [ + "status", + "context" + ], + "type": "object" } + } } + }, + "actions": { + "Http": { + "type": "Http", + "inputs": { + "body": { + "longUrl": "@{triggerBody()['context']['portalLink']}" + }, + "headers": { + "Content-Type": "application/json" + }, + "method": "POST", + "uri": "https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyBkT1BRbA-uULHz8HMUAi0ywJtpNLXHShI" + }, + "runAfter": {} + }, + "Send_Message": { + "type": "ApiConnection", + "inputs": { + "body": { + "body": "Azure Alert - '@{triggerBody()['context']['name']}' @{triggerBody()['status']} on '@{triggerBody()['context']['resourceName']}'. Details: @{body('Http')['id']}", + "from": "[parameters('twilioAccountNumber')]", + "to": "[parameters('toPhoneNumber')]" + }, + "host": { + "connection": { + "name": "@parameters('$connections')['twilio']['connectionId']" + } + }, + "method": "post", + "path": "/Messages.json" + }, + "runAfter": { + "Http": [ + "Succeeded" + ] + } + } + }, + "outputs": {} + }, + "parameters": { + "$connections": { + "value": { + "twilio": { + "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/twilio')]", + "connectionId": "[resourceId('Microsoft.Web/connections', parameters('twilioConnectionName'))]" + } + } + } } - ], - "outputs": { - "WebHookURI": { - "type": "string", - "value": "[listCallbackURL(concat(resourceId('Microsoft.Logic/workflows/', parameters('logicAppName')), '/triggers/manual'), '2016-06-01').value]" - } + } + } + ], + "outputs": { + "WebHookURI": { + "type": "string", + "value": "[listCallbackURL(concat(resourceId('Microsoft.Logic/workflows/', parameters('logicAppName')), '/triggers/manual'), '2016-06-01').value]" } -} \ No newline at end of file + } +} diff --git a/201-api-management-create-all-resources/azuredeploy.json b/201-api-management-create-all-resources/azuredeploy.json index 325cd07df73a..f06ccef739e1 100644 --- a/201-api-management-create-all-resources/azuredeploy.json +++ b/201-api-management-create-all-resources/azuredeploy.json @@ -1,440 +1,447 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "publisherEmail": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The email address of the owner of the service" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "publisherEmail": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The email address of the owner of the service" + } + }, + "publisherName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The name of the owner of the service" + } + }, + "sku": { + "type": "string", + "allowedValues": [ + "Developer", + "Standard", + "Premium" + ], + "defaultValue": "Standard", + "metadata": { + "description": "The pricing tier of this API Management service" + } + }, + "skuCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance size of this API Management service." + } + }, + "mutualAuthenticationCertificate": { + "type": "securestring", + "metadata": { + "description": "Base-64 encoded Mutual authentication PFX certificate." + } + }, + "certificatePassword": { + "type": "securestring", + "metadata": { + "description": "Mutual authentication certificate password." + } + }, + "eventHubNamespaceConnectionString": { + "type": "securestring", + "metadata": { + "description": "EventHub connection string for logger." + } + }, + "googleClientSecret": { + "type": "securestring", + "metadata": { + "description": "Google client secret to configure google identity." + } + }, + "openIdConnectClientSecret": { + "type": "securestring", + "metadata": { + "description": "OpenId connect client secret." + } + }, + "tenantPolicy": { + "type": "string", + "metadata": { + "description": "Tenant policy XML." + } + }, + "apiPolicy": { + "type": "string", + "metadata": { + "description": "API policy XML." + } + }, + "operationPolicy": { + "type": "string", + "metadata": { + "description": "Operation policy XML." + } + }, + "productPolicy": { + "type": "string", + "metadata": { + "description": "Product policy XML." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "name": "[variables('apiManagementServiceName')]", + "type": "Microsoft.ApiManagement/service", + "location": "[parameters('location')]", + "tags": {}, + "sku": { + "name": "[parameters('sku')]", + "capacity": "[parameters('skuCount')]" + }, + "properties": { + "publisherEmail": "[parameters('publisherEmail')]", + "publisherName": "[parameters('publisherName')]" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "type": "policies", + "name": "policy", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "policyContent": "[parameters('tenantPolicy')]" + } }, - "publisherName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The name of the owner of the service" - } + { + "apiVersion": "2017-03-01", + "type": "apis", + "name": "PetStoreSwaggerImportExample", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "contentFormat": "SwaggerLinkJson", + "contentValue": "http://petstore.swagger.io/v2/swagger.json", + "path": "examplepetstore" + } }, - "sku": { - "type": "string", - "allowedValues": [ - "Developer", - "Standard", - "Premium" - ], - "defaultValue": "Standard", - "metadata": { - "description": "The pricing tier of this API Management service" + { + "apiVersion": "2017-03-01", + "type": "apis", + "name": "exampleApi", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "displayName": "Example API Name", + "description": "Description for example API", + "serviceUrl": "https://example.net", + "path": "exampleapipath", + "protocols": [ + "HTTPS" + ] + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "type": "operations", + "name": "exampleOperationsDELETE", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/apis/exampleApi')]" + ], + "properties": { + "displayName": "DELETE resource", + "method": "DELETE", + "urlTemplate": "/resource", + "description": "A demonstration of a DELETE call" + } + }, + { + "apiVersion": "2017-03-01", + "type": "operations", + "name": "exampleOperationsGET", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/apis/exampleApi')]" + ], + "properties": { + "displayName": "GET resource", + "method": "GET", + "urlTemplate": "/resource", + "description": "A demonstration of a GET call" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "type": "policies", + "name": "policy", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/apis/exampleApi')]", + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/apis/exampleApi/operations/exampleOperationsGET')]" + ], + "properties": { + "policyContent": "[parameters('operationPolicy')]" + } + } + ] } + ] }, - "skuCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance size of this API Management service." + { + "apiVersion": "2017-03-01", + "type": "apis", + "name": "exampleApiWithPolicy", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "displayName": "Example API Name with Policy", + "description": "Description for example API with policy", + "serviceUrl": "https://exampleapiwithpolicy.net", + "path": "exampleapiwithpolicypath", + "protocols": [ + "HTTPS" + ] + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "type": "policies", + "name": "policy", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/apis/exampleApiWithPolicy')]" + ], + "properties": { + "policyContent": "[parameters('apiPolicy')]" + } } + ] }, - "mutualAuthenticationCertificate": { - "type": "securestring", - "metadata": { - "description": "Base-64 encoded Mutual authentication PFX certificate." + { + "apiVersion": "2017-03-01", + "type": "products", + "name": "exampleProduct", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "displayName": "Example Product Name", + "description": "Description for example product", + "terms": "Terms for example product", + "subscriptionRequired": true, + "approvalRequired": false, + "subscriptionsLimit": 1, + "state": "published" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "type": "apis", + "name": "exampleApi", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/apis/exampleApi')]", + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/products/exampleProduct')]" + ] + }, + { + "apiVersion": "2017-03-01", + "type": "policies", + "name": "policy", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/products/exampleProduct')]" + ], + "properties": { + "policyContent": "[parameters('productPolicy')]" + } } + ] }, - "certificatePassword": { - "type": "securestring", - "metadata": { - "description": "Mutual authentication certificate password." - } + { + "apiVersion": "2017-03-01", + "type": "users", + "name": "exampleUser1", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "firstName": "ExampleFirstName1", + "lastName": "ExampleLastName1", + "email": "ExampleFirst1@example.com", + "state": "active", + "note": "note for example user 1" + } }, - "eventHubNamespaceConnectionString": { - "type": "securestring", - "metadata": { - "description": "EventHub connection string for logger." - } + { + "apiVersion": "2017-03-01", + "type": "users", + "name": "exampleUser2", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "firstName": "ExampleFirstName2", + "lastName": "ExampleLastName2", + "email": "ExampleFirst2@example.com", + "state": "active", + "note": "note for example user 2" + } }, - "googleClientSecret": { - "type": "securestring", - "metadata": { - "description": "Google client secret to configure google identity." - } + { + "apiVersion": "2017-03-01", + "type": "users", + "name": "exampleUser3", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "firstName": "ExampleFirstName3", + "lastName": "ExampleLastName3", + "email": "ExampleFirst3@example.com", + "state": "active", + "note": "note for example user 3" + } }, - "openIdConnectClientSecret": { - "type": "securestring", - "metadata": { - "description": "OpenId connect client secret." - } + { + "apiVersion": "2017-03-01", + "type": "properties", + "name": "exampleproperties", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "displayName": "propertyExampleName", + "value": "propertyExampleValue", + "tags": [ + "exampleTag" + ] + } }, - "tenantPolicy": { - "type": "string", - "metadata": { - "description": "Tenant policy XML." - } + { + "apiVersion": "2017-03-01", + "type": "subscriptions", + "name": "examplesubscription1", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/products/exampleProduct')]", + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/users/exampleUser1')]" + ], + "properties": { + "productId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/exampleServiceName/products/exampleProduct", + "userId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/exampleServiceName/users/exampleUser1" + } }, - "apiPolicy": { - "type": "string", - "metadata": { - "description": "API policy XML." - } + { + "apiVersion": "2017-03-01", + "type": "subscriptions", + "name": "examplesubscription2", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/products/exampleProduct')]", + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/users/exampleUser3')]", + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/subscriptions/examplesubscription1')]" + ], + "properties": { + "productId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/exampleServiceName/products/exampleProduct", + "userId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/exampleServiceName/users/exampleUser3" + } }, - "operationPolicy": { - "type": "string", - "metadata": { - "description": "Operation policy XML." + { + "apiVersion": "2017-03-01", + "type": "certificates", + "name": "exampleCertificate", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "data": "[parameters('mutualAuthenticationCertificate')]", + "password": "[parameters('certificatePassword')]" + } + }, + { + "apiVersion": "2017-03-01", + "type": "groups", + "name": "exampleGroup", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "displayName": "Example Group Name", + "description": "Example group description" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "type": "users", + "name": "exampleUser3", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/groups/exampleGroup')]" + ] } + ] + }, + { + "apiVersion": "2017-03-01", + "type": "openidConnectProviders", + "name": "exampleOpenIdConnectProvider", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "displayName": "exampleOpenIdConnectProviderName", + "description": "Description for example OpenId Connect provider", + "metadataEndpoint": "https://example-openIdConnect-url.net", + "clientId": "exampleClientId", + "clientSecret": "[parameters('openIdConnectClientSecret')]" + } }, - "productPolicy": { - "type": "string", - "metadata": { - "description": "Product policy XML." + { + "apiVersion": "2017-03-01", + "type": "loggers", + "name": "exampleLogger", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "loggerType": "azureEventHub", + "description": "Description for example logger", + "credentials": { + "name": "exampleEventHubName", + "connectionString": "[parameters('eventHubNamespaceConnectionString')]" } - } - }, - "variables": { - "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" - }, - "resources": [ + } + }, { - "apiVersion": "2017-03-01", - "name": "[variables('apiManagementServiceName')]", - "type": "Microsoft.ApiManagement/service", - "location": "[resourceGroup().location]", - "tags": {}, - "sku": { - "name": "[parameters('sku')]", - "capacity": "[parameters('skuCount')]" - }, - "properties": { - "publisherEmail": "[parameters('publisherEmail')]", - "publisherName": "[parameters('publisherName')]" - }, - "resources": [ - { - "apiVersion": "2017-03-01", - "type": "policies", - "name": "policy", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "policyContent": "[parameters('tenantPolicy')]" - } - }, - { - "apiVersion": "2017-03-01", - "type": "apis", - "name": "PetStoreSwaggerImportExample", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "contentFormat": "SwaggerLinkJson", - "contentValue": "http://petstore.swagger.io/v2/swagger.json", - "path": "examplepetstore" - } - }, - { - "apiVersion": "2017-03-01", - "type": "apis", - "name": "exampleApi", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "displayName": "Example API Name", - "description": "Description for example API", - "serviceUrl": "https://example.net", - "path": "exampleapipath", - "protocols": [ - "HTTPS" - ] - }, - "resources": [ - { - "apiVersion": "2017-03-01", - "type": "operations", - "name": "exampleOperationsDELETE", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/apis/exampleApi')]" - ], - "properties": { - "displayName": "DELETE resource", - "method": "DELETE", - "urlTemplate": "/resource", - "description": "A demonstration of a DELETE call" - } - }, - { - "apiVersion": "2017-03-01", - "type": "operations", - "name": "exampleOperationsGET", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/apis/exampleApi')]" - ], - "properties": { - "displayName": "GET resource", - "method": "GET", - "urlTemplate": "/resource", - "description": "A demonstration of a GET call" - }, - "resources": [ - { - "apiVersion": "2017-03-01", - "type": "policies", - "name": "policy", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/apis/exampleApi')]", - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/apis/exampleApi/operations/exampleOperationsGET')]" - ], - "properties": { - "policyContent": "[parameters('operationPolicy')]" - } - } - ] - } - ] - }, - { - "apiVersion": "2017-03-01", - "type": "apis", - "name": "exampleApiWithPolicy", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "displayName": "Example API Name with Policy", - "description": "Description for example API with policy", - "serviceUrl": "https://exampleapiwithpolicy.net", - "path": "exampleapiwithpolicypath", - "protocols": [ - "HTTPS" - ] - }, - "resources": [ - { - "apiVersion": "2017-03-01", - "type": "policies", - "name": "policy", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/apis/exampleApiWithPolicy')]" - ], - "properties": { - "policyContent": "[parameters('apiPolicy')]" - } - } - ] - }, - { - "apiVersion": "2017-03-01", - "type": "products", - "name": "exampleProduct", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "displayName": "Example Product Name", - "description": "Description for example product", - "terms": "Terms for example product", - "subscriptionRequired": true, - "approvalRequired": false, - "subscriptionsLimit": 1, - "state": "published" - }, - "resources": [ - { - "apiVersion": "2017-03-01", - "type": "apis", - "name": "exampleApi", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/apis/exampleApi')]", - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/products/exampleProduct')]" - ] - }, - { - "apiVersion": "2017-03-01", - "type": "policies", - "name": "policy", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/products/exampleProduct')]" - ], - "properties": { - "policyContent": "[parameters('productPolicy')]" - } - } - ] - }, - { - "apiVersion": "2017-03-01", - "type": "users", - "name": "exampleUser1", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "firstName": "ExampleFirstName1", - "lastName": "ExampleLastName1", - "email": "ExampleFirst1@example.com", - "state": "active", - "note": "note for example user 1" - } - }, - { - "apiVersion": "2017-03-01", - "type": "users", - "name": "exampleUser2", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "firstName": "ExampleFirstName2", - "lastName": "ExampleLastName2", - "email": "ExampleFirst2@example.com", - "state": "active", - "note": "note for example user 2" - } - }, - { - "apiVersion": "2017-03-01", - "type": "users", - "name": "exampleUser3", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "firstName": "ExampleFirstName3", - "lastName": "ExampleLastName3", - "email": "ExampleFirst3@example.com", - "state": "active", - "note": "note for example user 3" - } - }, - { - "apiVersion": "2017-03-01", - "type": "properties", - "name": "exampleproperties", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "displayName": "propertyExampleName", - "value": "propertyExampleValue", - "tags": [ - "exampleTag" - ] - } - }, - { - "apiVersion": "2017-03-01", - "type": "subscriptions", - "name": "examplesubscription1", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/products/exampleProduct')]", - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/users/exampleUser1')]" - ], - "properties": { - "productId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/exampleServiceName/products/exampleProduct", - "userId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/exampleServiceName/users/exampleUser1" - } - }, - { - "apiVersion": "2017-03-01", - "type": "subscriptions", - "name": "examplesubscription2", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/products/exampleProduct')]", - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/users/exampleUser3')]", - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/subscriptions/examplesubscription1')]" - ], - "properties": { - "productId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/exampleServiceName/products/exampleProduct", - "userId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/exampleServiceName/users/exampleUser3" - } - }, - { - "apiVersion": "2017-03-01", - "type": "certificates", - "name": "exampleCertificate", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "data": "[parameters('mutualAuthenticationCertificate')]", - "password": "[parameters('certificatePassword')]" - } - }, - { - "apiVersion": "2017-03-01", - "type": "groups", - "name": "exampleGroup", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "displayName": "Example Group Name", - "description": "Example group description" - }, - "resources": [ - { - "apiVersion": "2017-03-01", - "type": "users", - "name": "exampleUser3", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'), '/groups/exampleGroup')]" - ] - } - ] - }, - { - "apiVersion": "2017-03-01", - "type": "openidConnectProviders", - "name": "exampleOpenIdConnectProvider", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "displayName": "exampleOpenIdConnectProviderName", - "description": "Description for example OpenId Connect provider", - "metadataEndpoint": "https://example-openIdConnect-url.net", - "clientId": "exampleClientId", - "clientSecret": "[parameters('openIdConnectClientSecret')]" - } - }, - { - "apiVersion": "2017-03-01", - "type": "loggers", - "name": "exampleLogger", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "loggerType": "azureEventHub", - "description": "Description for example logger", - "credentials": { - "name": "exampleEventHubName", - "connectionString": "[parameters('eventHubNamespaceConnectionString')]" - } - } - }, - { - "apiVersion": "2017-03-01", - "type": "identityProviders", - "name": "google", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" - ], - "properties": { - "clientId": "googleClientId", - "clientSecret": "[parameters('googleClientSecret')]" - } - } - ] + "apiVersion": "2017-03-01", + "type": "identityProviders", + "name": "google", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]" + ], + "properties": { + "clientId": "googleClientId", + "clientSecret": "[parameters('googleClientSecret')]" + } } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/201-api-management-create-with-hostname/azuredeploy.json b/201-api-management-create-with-hostname/azuredeploy.json index 9a0d598a821b..1137140c6f5d 100644 --- a/201-api-management-create-with-hostname/azuredeploy.json +++ b/201-api-management-create-with-hostname/azuredeploy.json @@ -1,136 +1,143 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "publisherEmail": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The email address of the owner of the service" - } - }, - "publisherName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The name of the owner of the service" - } - }, - "sku": { - "type": "string", - "allowedValues": [ - "Developer", - "Standard", - "Premium" - ], - "defaultValue": "Premium", - "metadata": { - "description": "The pricing tier of this API Management service" - } - }, - "skuCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance size of this API Management service." - } - }, - "proxyCustomHostname1": { - "type": "string", - "metadata": { - "description": "Proxy Custom hostname 1." - } - }, - "proxyCustomHostnameBase64EncodedPfxCertificate1": { - "type": "securestring", - "metadata": { - "description": "Base-64 encoded SSL .pfx Certificate for proxy custom hostname." - } - }, - "proxySSLCertificatePassword1": { - "type": "securestring", - "metadata": { - "description": "Proxy SSL certificate password." - } - }, - "proxyCustomHostname2": { - "type": "string", - "metadata": { - "description": "Proxy Custom hostname." - } - }, - "proxyCustomHostnameBase64EncodedPfxCertificate2": { - "type": "securestring", - "metadata": { - "description": "Base-64 encoded SSL .pfx Certificate for proxy custom hostname." - } - }, - "proxySSLCertificatePassword2": { - "type": "securestring", - "metadata": { - "description": "Proxy SSL certificate password." - } - }, - "portalCustomHostname": { - "type": "string", - "metadata": { - "description": "Portal Custom hostname." - } - }, - "portalCustomHostnameBase64EncodedPfxCertificate": { - "type": "securestring", - "metadata": { - "description": "Base-64 encoded SSL .pfx Certificate for portal custom hostname." - } - }, - "portalSSLCertificatePassword": { - "type": "securestring", - "metadata": { - "description": "Portal SSL certificate password." - } - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "publisherEmail": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The email address of the owner of the service" + } }, - "variables": { - "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + "publisherName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The name of the owner of the service" + } }, - "resources": [ - { - "apiVersion": "2017-03-01", - "name": "[variables('apiManagementServiceName')]", - "type": "Microsoft.ApiManagement/service", - "location": "[resourceGroup().location]", - "tags": {}, - "sku": { - "name": "[parameters('sku')]", - "capacity": "[parameters('skuCount')]" - }, - "properties": { - "publisherEmail": "[parameters('publisherEmail')]", - "publisherName": "[parameters('publisherName')]", - "hostnameConfigurations": [ - { - "type": "Proxy", - "hostName": "[parameters('proxyCustomHostname1')]", - "encodedCertificate": "[parameters('proxyCustomHostnameBase64EncodedPfxCertificate1')]", - "certificatePassword": "[parameters('proxySSLCertificatePassword1')]", - "negotiateClientCertificate": false - }, - { - "type": "Proxy", - "hostName": "[parameters('proxyCustomHostname2')]", - "encodedCertificate": "[parameters('proxyCustomHostnameBase64EncodedPfxCertificate2')]", - "certificatePassword": "[parameters('proxySSLCertificatePassword2')]", - "negotiateClientCertificate": false - }, - { - "type": "Portal", - "hostName": "[parameters('portalCustomHostname')]", - "encodedCertificate": "[parameters('portalCustomHostnameBase64EncodedPfxCertificate')]", - "certificatePassword": "[parameters('portalSSLCertificatePassword')]", - "negotiateClientCertificate": false - } - ] - } - } - ] -} \ No newline at end of file + "sku": { + "type": "string", + "allowedValues": [ + "Developer", + "Standard", + "Premium" + ], + "defaultValue": "Premium", + "metadata": { + "description": "The pricing tier of this API Management service" + } + }, + "skuCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance size of this API Management service." + } + }, + "proxyCustomHostname1": { + "type": "string", + "metadata": { + "description": "Proxy Custom hostname 1." + } + }, + "proxyCustomHostnameBase64EncodedPfxCertificate1": { + "type": "securestring", + "metadata": { + "description": "Base-64 encoded SSL .pfx Certificate for proxy custom hostname." + } + }, + "proxySSLCertificatePassword1": { + "type": "securestring", + "metadata": { + "description": "Proxy SSL certificate password." + } + }, + "proxyCustomHostname2": { + "type": "string", + "metadata": { + "description": "Proxy Custom hostname." + } + }, + "proxyCustomHostnameBase64EncodedPfxCertificate2": { + "type": "securestring", + "metadata": { + "description": "Base-64 encoded SSL .pfx Certificate for proxy custom hostname." + } + }, + "proxySSLCertificatePassword2": { + "type": "securestring", + "metadata": { + "description": "Proxy SSL certificate password." + } + }, + "portalCustomHostname": { + "type": "string", + "metadata": { + "description": "Portal Custom hostname." + } + }, + "portalCustomHostnameBase64EncodedPfxCertificate": { + "type": "securestring", + "metadata": { + "description": "Base-64 encoded SSL .pfx Certificate for portal custom hostname." + } + }, + "portalSSLCertificatePassword": { + "type": "securestring", + "metadata": { + "description": "Portal SSL certificate password." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "name": "[variables('apiManagementServiceName')]", + "type": "Microsoft.ApiManagement/service", + "location": "[parameters('location')]", + "tags": {}, + "sku": { + "name": "[parameters('sku')]", + "capacity": "[parameters('skuCount')]" + }, + "properties": { + "publisherEmail": "[parameters('publisherEmail')]", + "publisherName": "[parameters('publisherName')]", + "hostnameConfigurations": [ + { + "type": "Proxy", + "hostName": "[parameters('proxyCustomHostname1')]", + "encodedCertificate": "[parameters('proxyCustomHostnameBase64EncodedPfxCertificate1')]", + "certificatePassword": "[parameters('proxySSLCertificatePassword1')]", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "hostName": "[parameters('proxyCustomHostname2')]", + "encodedCertificate": "[parameters('proxyCustomHostnameBase64EncodedPfxCertificate2')]", + "certificatePassword": "[parameters('proxySSLCertificatePassword2')]", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "hostName": "[parameters('portalCustomHostname')]", + "encodedCertificate": "[parameters('portalCustomHostnameBase64EncodedPfxCertificate')]", + "certificatePassword": "[parameters('portalSSLCertificatePassword')]", + "negotiateClientCertificate": false + } + ] + } + } + ] +} diff --git a/201-api-management-create-with-keyvault-ssl/azuredeploy.json b/201-api-management-create-with-keyvault-ssl/azuredeploy.json index 4eb663764d4c..ec651a95602b 100644 --- a/201-api-management-create-with-keyvault-ssl/azuredeploy.json +++ b/201-api-management-create-with-keyvault-ssl/azuredeploy.json @@ -1,154 +1,161 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "publisherEmail": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The email address of the owner of the service" - } - }, - "publisherName": { - "type": "string", - "defaultValue": "Contoso", - "minLength": 1, - "metadata": { - "description": "The name of the owner of the service" - } - }, - "sku": { - "type": "string", - "allowedValues": [ - "Developer", - "Standard", - "Premium" - ], - "defaultValue": "Developer", - "metadata": { - "description": "The pricing tier of this API Management service" - } - }, - "skuCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance size of this API Management service." - } - }, - "keyVaultName": { - "type": "string", - "metadata": { - "description": "Name of the vault" - } - }, - "proxyCustomHostname": { - "type": "string", - "metadata": { - "description": "Proxy Custom hostname." - } - }, - "keyVaultSecretsIdToCertificate": { - "type": "string", - "metadata": { - "description": "Reference to the KeyVault Secret storing the Certificate used to bind for SSL." - } - }, - "_artifactsLocation": { - "type": "string", - "defaultValue": "https://apimtemplates.blob.core.windows.net", - "metadata": { - "description": "Change this value to your repo name if deploying from a fork" - } - }, - "_artifactsLocationSasToken": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Auto-generated token to access _artifactsLocation" - } - } - }, - "variables": { - "nestedTemplatesFolderName": "nestedtemplate", - "masterTemplateFileName": "update-apim-with-keyvaultssl.json", - "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]", - "apimServiceIdentityResourceId": "[concat(resourceId('Microsoft.ApiManagement/service', variables('apiManagementServiceName')),'/providers/Microsoft.ManagedIdentity/Identities/default')]" - }, - "resources": [ - { - "apiVersion": "2017-03-01", - "name": "[variables('apiManagementServiceName')]", - "type": "Microsoft.ApiManagement/service", - "location": "[resourceGroup().location]", - "tags": {}, - "sku": { - "name": "[parameters('sku')]", - "capacity": "[parameters('skuCount')]" - }, - "properties": { - "publisherEmail": "[parameters('publisherEmail')]", - "publisherName": "[parameters('publisherName')]" - }, - "identity": { - "type": "systemAssigned" - } - }, - { - "type": "Microsoft.KeyVault/vaults/accessPolicies", - "name": "[concat(parameters('keyVaultName'), '/add')]", - "apiVersion": "2015-06-01", - "dependsOn": [ - "[resourceId('Microsoft.ApiManagement/service', variables('apiManagementServiceName'))]" - ], - "properties": { - "accessPolicies": [ - { - "tenantId": "[reference(variables('apimServiceIdentityResourceId'), '2015-08-31-PREVIEW').tenantId]", - "objectId": "[reference(variables('apimServiceIdentityResourceId'), '2015-08-31-PREVIEW').principalId]", - "permissions": { - "secrets": [ - "get" - ] - } - } - ] - } - }, - { - "apiVersion": "2017-05-10", - "name": "apimWithKeyVault", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[resourceId('Microsoft.ApiManagement/service', variables('apiManagementServiceName'))]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', variables('masterTemplateFileName'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "publisherEmail": { - "value": "[parameters('publisherEmail')]" - }, - "publisherName": { - "value": "[parameters('publisherName')]" - }, - "sku": { - "value": "[parameters('sku')]" - }, - "skuCount": { - "value": "[parameters('skuCount')]" - }, - "proxyCustomHostname": { - "value": "[parameters('proxyCustomHostname')]" - }, - "keyVaultSecretsIdToCertificate": { - "value": "[parameters('keyVaultSecretsIdToCertificate')]" - } - } - } - } - ] -} \ No newline at end of file + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "publisherEmail": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The email address of the owner of the service" + } + }, + "publisherName": { + "type": "string", + "defaultValue": "Contoso", + "minLength": 1, + "metadata": { + "description": "The name of the owner of the service" + } + }, + "sku": { + "type": "string", + "allowedValues": [ + "Developer", + "Standard", + "Premium" + ], + "defaultValue": "Developer", + "metadata": { + "description": "The pricing tier of this API Management service" + } + }, + "skuCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance size of this API Management service." + } + }, + "keyVaultName": { + "type": "string", + "metadata": { + "description": "Name of the vault" + } + }, + "proxyCustomHostname": { + "type": "string", + "metadata": { + "description": "Proxy Custom hostname." + } + }, + "keyVaultSecretsIdToCertificate": { + "type": "string", + "metadata": { + "description": "Reference to the KeyVault Secret storing the Certificate used to bind for SSL." + } + }, + "_artifactsLocation": { + "type": "string", + "defaultValue": "https://apimtemplates.blob.core.windows.net", + "metadata": { + "description": "Change this value to your repo name if deploying from a fork" + } + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "Auto-generated token to access _artifactsLocation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "nestedTemplatesFolderName": "nestedtemplate", + "masterTemplateFileName": "update-apim-with-keyvaultssl.json", + "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]", + "apimServiceIdentityResourceId": "[concat(resourceId('Microsoft.ApiManagement/service', variables('apiManagementServiceName')),'/providers/Microsoft.ManagedIdentity/Identities/default')]" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "name": "[variables('apiManagementServiceName')]", + "type": "Microsoft.ApiManagement/service", + "location": "[parameters('location')]", + "tags": {}, + "sku": { + "name": "[parameters('sku')]", + "capacity": "[parameters('skuCount')]" + }, + "properties": { + "publisherEmail": "[parameters('publisherEmail')]", + "publisherName": "[parameters('publisherName')]" + }, + "identity": { + "type": "systemAssigned" + } + }, + { + "type": "Microsoft.KeyVault/vaults/accessPolicies", + "name": "[concat(parameters('keyVaultName'), '/add')]", + "apiVersion": "2015-06-01", + "dependsOn": [ + "[resourceId('Microsoft.ApiManagement/service', variables('apiManagementServiceName'))]" + ], + "properties": { + "accessPolicies": [ + { + "tenantId": "[reference(variables('apimServiceIdentityResourceId'), '2015-08-31-PREVIEW').tenantId]", + "objectId": "[reference(variables('apimServiceIdentityResourceId'), '2015-08-31-PREVIEW').principalId]", + "permissions": { + "secrets": [ + "get" + ] + } + } + ] + } + }, + { + "apiVersion": "2017-05-10", + "name": "apimWithKeyVault", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[resourceId('Microsoft.ApiManagement/service', variables('apiManagementServiceName'))]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', variables('masterTemplateFileName'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "publisherEmail": { + "value": "[parameters('publisherEmail')]" + }, + "publisherName": { + "value": "[parameters('publisherName')]" + }, + "sku": { + "value": "[parameters('sku')]" + }, + "skuCount": { + "value": "[parameters('skuCount')]" + }, + "proxyCustomHostname": { + "value": "[parameters('proxyCustomHostname')]" + }, + "keyVaultSecretsIdToCertificate": { + "value": "[parameters('keyVaultSecretsIdToCertificate')]" + } + } + } + } + ] +} diff --git a/201-api-management-create-with-keyvault-ssl/nestedtemplate/update-apim-with-keyvaultssl.json b/201-api-management-create-with-keyvault-ssl/nestedtemplate/update-apim-with-keyvaultssl.json index 39a5a3a7f507..4122a4ad015d 100644 --- a/201-api-management-create-with-keyvault-ssl/nestedtemplate/update-apim-with-keyvaultssl.json +++ b/201-api-management-create-with-keyvault-ssl/nestedtemplate/update-apim-with-keyvaultssl.json @@ -1,81 +1,88 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "publisherEmail": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The email address of the owner of the service" - } - }, - "publisherName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The name of the owner of the service" - } - }, - "sku": { - "type": "string", - "allowedValues": [ - "Developer", - "Standard", - "Premium" - ], - "defaultValue": "Developer", - "metadata": { - "description": "The pricing tier of this API Management service" - } - }, - "skuCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance size of this API Management service." - } - }, - "proxyCustomHostname": { - "type": "string", - "metadata": { - "description": "Proxy Custom hostname." - } - }, - "keyVaultSecretsIdToCertificate": { - "type": "string", - "metadata": { - "description": "Reference to the KeyVault Certificate used to bind for SSL." - } - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "publisherEmail": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The email address of the owner of the service" + } }, - "variables": { - "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + "publisherName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The name of the owner of the service" + } }, - "resources": [ - { - "apiVersion": "2017-03-01", - "name": "[variables('apiManagementServiceName')]", - "type": "Microsoft.ApiManagement/service", - "location": "[resourceGroup().location]", - "tags": {}, - "sku": { - "name": "[parameters('sku')]", - "capacity": "[parameters('skuCount')]" - }, - "properties": { - "publisherEmail": "[parameters('publisherEmail')]", - "publisherName": "[parameters('publisherName')]", - "hostnameConfigurations": [ - { - "type": "Proxy", - "hostName": "[parameters('proxyCustomHostname')]", - "keyVaultId": "[parameters('keyVaultSecretsIdToCertificate')]" - } - ] - }, - "identity": { - "type": "systemAssigned" - } - } - ] -} \ No newline at end of file + "sku": { + "type": "string", + "allowedValues": [ + "Developer", + "Standard", + "Premium" + ], + "defaultValue": "Developer", + "metadata": { + "description": "The pricing tier of this API Management service" + } + }, + "skuCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance size of this API Management service." + } + }, + "proxyCustomHostname": { + "type": "string", + "metadata": { + "description": "Proxy Custom hostname." + } + }, + "keyVaultSecretsIdToCertificate": { + "type": "string", + "metadata": { + "description": "Reference to the KeyVault Certificate used to bind for SSL." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "name": "[variables('apiManagementServiceName')]", + "type": "Microsoft.ApiManagement/service", + "location": "[parameters('location')]", + "tags": {}, + "sku": { + "name": "[parameters('sku')]", + "capacity": "[parameters('skuCount')]" + }, + "properties": { + "publisherEmail": "[parameters('publisherEmail')]", + "publisherName": "[parameters('publisherName')]", + "hostnameConfigurations": [ + { + "type": "Proxy", + "hostName": "[parameters('proxyCustomHostname')]", + "keyVaultId": "[parameters('keyVaultSecretsIdToCertificate')]" + } + ] + }, + "identity": { + "type": "systemAssigned" + } + } + ] +} diff --git a/201-api-management-create-with-multiregion/azuredeploy.json b/201-api-management-create-with-multiregion/azuredeploy.json index c8445245a495..0e4d99df5f2e 100644 --- a/201-api-management-create-with-multiregion/azuredeploy.json +++ b/201-api-management-create-with-multiregion/azuredeploy.json @@ -1,82 +1,89 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "publisherEmail": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The email address of the owner of the service" - } - }, - "publisherName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The name of the owner of the service" - } - }, - "sku": { - "type": "string", - "defaultValue": "Premium", - "metadata": { - "description": "The pricing tier of this API Management service" - } - }, - "skuCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance size of this API Management service." - } - }, - "additionalLocation1": { - "type": "string", - "metadata": { - "description": "Azure location name where additional API Management gateways need to be deployed." - } - }, - "additionalLocation2": { - "type": "string", - "metadata": { - "description": "Azure location name where additional API Management gateways need to be deployed." - } - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "publisherEmail": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The email address of the owner of the service" + } }, - "variables": { - "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + "publisherName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The name of the owner of the service" + } }, - "resources": [ - { - "apiVersion": "2017-03-01", - "name": "[variables('apiManagementServiceName')]", - "type": "Microsoft.ApiManagement/service", - "location": "[resourceGroup().location]", - "tags": {}, + "sku": { + "type": "string", + "defaultValue": "Premium", + "metadata": { + "description": "The pricing tier of this API Management service" + } + }, + "skuCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance size of this API Management service." + } + }, + "additionalLocation1": { + "type": "string", + "metadata": { + "description": "Azure location name where additional API Management gateways need to be deployed." + } + }, + "additionalLocation2": { + "type": "string", + "metadata": { + "description": "Azure location name where additional API Management gateways need to be deployed." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "name": "[variables('apiManagementServiceName')]", + "type": "Microsoft.ApiManagement/service", + "location": "[parameters('location')]", + "tags": {}, + "sku": { + "name": "[parameters('sku')]", + "capacity": "[parameters('skuCount')]" + }, + "properties": { + "publisherEmail": "[parameters('publisherEmail')]", + "publisherName": "[parameters('publisherName')]", + "additionalLocations": [ + { + "location": "[parameters('additionalLocation1')]", + "sku": { + "name": "[parameters('sku')]", + "capacity": "[parameters('skuCount')]" + } + }, + { + "location": "[parameters('additionalLocation2')]", "sku": { - "name": "[parameters('sku')]", - "capacity": "[parameters('skuCount')]" - }, - "properties": { - "publisherEmail": "[parameters('publisherEmail')]", - "publisherName": "[parameters('publisherName')]", - "additionalLocations": [ - { - "location": "[parameters('additionalLocation1')]", - "sku": { - "name": "[parameters('sku')]", - "capacity": "[parameters('skuCount')]" - } - }, - { - "location": "[parameters('additionalLocation2')]", - "sku": { - "name": "[parameters('sku')]", - "capacity": "[parameters('skuCount')]" - } - } - ] + "name": "[parameters('sku')]", + "capacity": "[parameters('skuCount')]" } - } - ] -} \ No newline at end of file + } + ] + } + } + ] +} diff --git a/201-api-management-create-with-reference-keyvault/azuredeploy.json b/201-api-management-create-with-reference-keyvault/azuredeploy.json index eab471bafcaa..59d0d3559299 100644 --- a/201-api-management-create-with-reference-keyvault/azuredeploy.json +++ b/201-api-management-create-with-reference-keyvault/azuredeploy.json @@ -1,88 +1,95 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "publisherEmail": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The email address of the owner of the service" - } - }, - "publisherName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The name of the owner of the service" - } - }, - "sku": { - "type": "string", - "allowedValues": [ - "Developer", - "Basic", - "Standard", - "Premium" - ], - "defaultValue": "Developer", - "metadata": { - "description": "The pricing tier of this API Management service" - } - }, - "skuCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance size of this API Management service." - } - }, - "proxyCustomHostname": { - "type": "string", - "metadata": { - "description": "Proxy Custom hostname." - } - }, - "proxyCustomHostnameBase64EncodedPfxCertificate": { - "type": "string", - "metadata": { - "description": "The base 64 encoded certificate issued to domain of the proxy custom hostname." - } - }, - "proxySSLCertificatePassword": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Certificate Password." - } - } - }, - "variables": { - "apiManagementServiceName": "[concat('apiservice1', uniqueString(resourceGroup().id))]" - }, - "resources": [ - { - "apiVersion": "2017-03-01", - "name": "[variables('apiManagementServiceName')]", - "type": "Microsoft.ApiManagement/service", - "location": "[resourceGroup().location]", - "tags": {}, - "sku": { - "name": "[parameters('sku')]", - "capacity": "[parameters('skuCount')]" - }, - "properties": { - "publisherEmail": "[parameters('publisherEmail')]", - "publisherName": "[parameters('publisherName')]", - "hostnameConfigurations": [ - { - "type": "Proxy", - "hostName": "[parameters('proxyCustomHostname')]", - "encodedCertificate": "[parameters('proxyCustomHostnameBase64EncodedPfxCertificate')]", - "certificatePassword": "[parameters('proxySSLCertificatePassword')]", - "negotiateClientCertificate": false - } - ] - } - } - ] -} \ No newline at end of file + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "publisherEmail": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The email address of the owner of the service" + } + }, + "publisherName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The name of the owner of the service" + } + }, + "sku": { + "type": "string", + "allowedValues": [ + "Developer", + "Basic", + "Standard", + "Premium" + ], + "defaultValue": "Developer", + "metadata": { + "description": "The pricing tier of this API Management service" + } + }, + "skuCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance size of this API Management service." + } + }, + "proxyCustomHostname": { + "type": "string", + "metadata": { + "description": "Proxy Custom hostname." + } + }, + "proxyCustomHostnameBase64EncodedPfxCertificate": { + "type": "string", + "metadata": { + "description": "The base 64 encoded certificate issued to domain of the proxy custom hostname." + } + }, + "proxySSLCertificatePassword": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Certificate Password." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "apiManagementServiceName": "[concat('apiservice1', uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "name": "[variables('apiManagementServiceName')]", + "type": "Microsoft.ApiManagement/service", + "location": "[parameters('location')]", + "tags": {}, + "sku": { + "name": "[parameters('sku')]", + "capacity": "[parameters('skuCount')]" + }, + "properties": { + "publisherEmail": "[parameters('publisherEmail')]", + "publisherName": "[parameters('publisherName')]", + "hostnameConfigurations": [ + { + "type": "Proxy", + "hostName": "[parameters('proxyCustomHostname')]", + "encodedCertificate": "[parameters('proxyCustomHostnameBase64EncodedPfxCertificate')]", + "certificatePassword": "[parameters('proxySSLCertificatePassword')]", + "negotiateClientCertificate": false + } + ] + } + } + ] +} diff --git a/201-api-management-create-with-vnet/azuredeploy.json b/201-api-management-create-with-vnet/azuredeploy.json index 6eb013524341..563b0f05c8f0 100644 --- a/201-api-management-create-with-vnet/azuredeploy.json +++ b/201-api-management-create-with-vnet/azuredeploy.json @@ -1,168 +1,175 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "publisherEmail": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The email address of the owner of the service" - } - }, - "publisherName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The name of the owner of the service" - } - }, - "sku": { - "type": "string", - "allowedValues": [ - "Developer", - "Standard", - "Premium" - ], - "defaultValue": "Developer", - "metadata": { - "description": "The pricing tier of this API Management service" - } - }, - "skuCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance size of this API Management service." - } - }, - "proxyCustomHostname": { - "type": "string", - "metadata": { - "description": "Proxy Custom hostname." - } - }, - "proxyCustomHostnameBase64EncodedPfxCertificate": { - "type": "securestring", - "metadata": { - "description": "Base-64 encoded SSL .pfx Certificate for proxy custom hostname." - } - }, - "proxySSLCertificatePassword": { - "type": "securestring", - "metadata": { - "description": "Proxy SSL certificate password." - } - }, - "portalCustomHostname": { - "type": "string", - "metadata": { - "description": "Portal Custom hostname." - } - }, - "portalCustomHostnameBase64EncodedPfxCertificate": { - "type": "securestring", - "metadata": { - "description": "Base-64 encoded SSL .pfx Certificate for portal custom hostname." - } - }, - "portalSSLCertificatePassword": { - "type": "securestring", - "metadata": { - "description": "Portal SSL certificate password." - } - }, - "virtualNetworkName": { - "type": "string", - "metadata": { - "description": "Virtual Network name" - } - }, - "virtualNetworkAddressPrefix": { - "type": "string", - "defaultValue": "10.0.0.0/16", - "metadata": { - "description": "Address prefix" - } - }, - "subnetPrefix": { - "type": "string", - "defaultValue": "10.0.0.0/24", - "metadata": { - "description": "Subnet Prefix" - } - }, - "subnetName": { - "type": "string", - "metadata": { - "description": "Subnet Name" - } - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "publisherEmail": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The email address of the owner of the service" + } }, - "variables": { - "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]", - "virtualNetworkID": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", - "subnetRef": "[concat(variables('virtualNetworkID'),'/subnets/',parameters('subnetName'))]" + "publisherName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The name of the owner of the service" + } }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[parameters('virtualNetworkAddressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[parameters('subnetName')]", - "properties": { - "addressPrefix": "[parameters('subnetPrefix')]" - } - } - ] - } + "sku": { + "type": "string", + "allowedValues": [ + "Developer", + "Standard", + "Premium" + ], + "defaultValue": "Developer", + "metadata": { + "description": "The pricing tier of this API Management service" + } + }, + "skuCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance size of this API Management service." + } + }, + "proxyCustomHostname": { + "type": "string", + "metadata": { + "description": "Proxy Custom hostname." + } + }, + "proxyCustomHostnameBase64EncodedPfxCertificate": { + "type": "securestring", + "metadata": { + "description": "Base-64 encoded SSL .pfx Certificate for proxy custom hostname." + } + }, + "proxySSLCertificatePassword": { + "type": "securestring", + "metadata": { + "description": "Proxy SSL certificate password." + } + }, + "portalCustomHostname": { + "type": "string", + "metadata": { + "description": "Portal Custom hostname." + } + }, + "portalCustomHostnameBase64EncodedPfxCertificate": { + "type": "securestring", + "metadata": { + "description": "Base-64 encoded SSL .pfx Certificate for portal custom hostname." + } + }, + "portalSSLCertificatePassword": { + "type": "securestring", + "metadata": { + "description": "Portal SSL certificate password." + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "Virtual Network name" + } + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/16", + "metadata": { + "description": "Address prefix" + } + }, + "subnetPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/24", + "metadata": { + "description": "Subnet Prefix" + } + }, + "subnetName": { + "type": "string", + "metadata": { + "description": "Subnet Name" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]", + "virtualNetworkID": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "subnetRef": "[concat(variables('virtualNetworkID'),'/subnets/',parameters('subnetName'))]" + }, + "resources": [ + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] }, - { - "apiVersion": "2017-03-01", - "name": "[variables('apiManagementServiceName')]", - "type": "Microsoft.ApiManagement/service", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" - ], - "tags": {}, - "sku": { - "name": "[parameters('sku')]", - "capacity": "[parameters('skuCount')]" - }, + "subnets": [ + { + "name": "[parameters('subnetName')]", "properties": { - "publisherEmail": "[parameters('publisherEmail')]", - "publisherName": "[parameters('publisherName')]", - "hostnameConfigurations": [ - { - "type": "Proxy", - "hostName": "[parameters('proxyCustomHostname')]", - "encodedCertificate": "[parameters('proxyCustomHostnameBase64EncodedPfxCertificate')]", - "certificatePassword": "[parameters('proxySSLCertificatePassword')]", - "negotiateClientCertificate": false - }, - { - "type": "Portal", - "hostName": "[parameters('portalCustomHostname')]", - "encodedCertificate": "[parameters('portalCustomHostnameBase64EncodedPfxCertificate')]", - "certificatePassword": "[parameters('portalSSLCertificatePassword')]", - "negotiateClientCertificate": false - } - ], - "virtualNetworkType": "External", - "virtualNetworkConfiguration": { - "subnetResourceId": "[variables('subnetRef')]", - "location": "[resourceGroup().location]" - } + "addressPrefix": "[parameters('subnetPrefix')]" } + } + ] + } + }, + { + "apiVersion": "2017-03-01", + "name": "[variables('apiManagementServiceName')]", + "type": "Microsoft.ApiManagement/service", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" + ], + "tags": {}, + "sku": { + "name": "[parameters('sku')]", + "capacity": "[parameters('skuCount')]" + }, + "properties": { + "publisherEmail": "[parameters('publisherEmail')]", + "publisherName": "[parameters('publisherName')]", + "hostnameConfigurations": [ + { + "type": "Proxy", + "hostName": "[parameters('proxyCustomHostname')]", + "encodedCertificate": "[parameters('proxyCustomHostnameBase64EncodedPfxCertificate')]", + "certificatePassword": "[parameters('proxySSLCertificatePassword')]", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "hostName": "[parameters('portalCustomHostname')]", + "encodedCertificate": "[parameters('portalCustomHostnameBase64EncodedPfxCertificate')]", + "certificatePassword": "[parameters('portalSSLCertificatePassword')]", + "negotiateClientCertificate": false + } + ], + "virtualNetworkType": "External", + "virtualNetworkConfiguration": { + "subnetResourceId": "[variables('subnetRef')]", + "location": "[parameters('location')]" } - ] -} \ No newline at end of file + } + } + ] +} diff --git a/201-api-management-create/azuredeploy.json b/201-api-management-create/azuredeploy.json index 333c1eb8d880..0fa5f255bb6d 100644 --- a/201-api-management-create/azuredeploy.json +++ b/201-api-management-create/azuredeploy.json @@ -1,59 +1,66 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "publisherEmail": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The email address of the owner of the service" - } - }, - "publisherName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The name of the owner of the service" - } - }, - "sku": { - "type": "string", - "allowedValues": [ - "Developer", - "Standard", - "Premium" - ], - "defaultValue": "Developer", - "metadata": { - "description": "The pricing tier of this API Management service" - } - }, - "skuCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance size of this API Management service." - } - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "publisherEmail": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The email address of the owner of the service" + } }, - "variables": { - "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + "publisherName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The name of the owner of the service" + } }, - "resources": [ - { - "apiVersion": "2017-03-01", - "name": "[variables('apiManagementServiceName')]", - "type": "Microsoft.ApiManagement/service", - "location": "[resourceGroup().location]", - "tags": {}, - "sku": { - "name": "[parameters('sku')]", - "capacity": "[parameters('skuCount')]" - }, - "properties": { - "publisherEmail": "[parameters('publisherEmail')]", - "publisherName": "[parameters('publisherName')]" - } - } - ] -} \ No newline at end of file + "sku": { + "type": "string", + "allowedValues": [ + "Developer", + "Standard", + "Premium" + ], + "defaultValue": "Developer", + "metadata": { + "description": "The pricing tier of this API Management service" + } + }, + "skuCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance size of this API Management service." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "name": "[variables('apiManagementServiceName')]", + "type": "Microsoft.ApiManagement/service", + "location": "[parameters('location')]", + "tags": {}, + "sku": { + "name": "[parameters('sku')]", + "capacity": "[parameters('skuCount')]" + }, + "properties": { + "publisherEmail": "[parameters('publisherEmail')]", + "publisherName": "[parameters('publisherName')]" + } + } + ] +} diff --git a/201-api-management-logs-oms-integration/azuredeploy.json b/201-api-management-logs-oms-integration/azuredeploy.json index 5f3aac44b94d..ace0ac685c23 100644 --- a/201-api-management-logs-oms-integration/azuredeploy.json +++ b/201-api-management-logs-oms-integration/azuredeploy.json @@ -1,114 +1,121 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "apiManagementPublisherEmail": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The email address of the owner of the service" - } - }, - "apiManagementPublisherName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The name of the owner of the service" - } - }, - "apiManagementSku": { - "type": "string", - "allowedValues": [ - "Developer", - "Standard", - "Premium" - ], - "defaultValue": "Developer", - "metadata": { - "description": "The pricing tiers of this API Management service" - } - }, - "apiManagementSkuCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance size of this API Management service." - } - }, - "workspaceRegion": { - "type": "string", - "defaultValue": "East US", - "allowedValues": [ - "Southeast Asia", - "Australia Southeast", - "West Europe", - "East US" - ], - "metadata": { - "description": "Specify the region for your OMS workspace" - } - }, - "omsSku": { - "type": "string", - "defaultValue": "free", - "allowedValues": [ - "free", - "standalone", - "pernode" - ], - "metadata": { - "description": "Select the SKU for your workspace" - } - } - }, - "variables": { - "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]", - "omsWorkspaceName": "[concat('omsworkspace', uniqueString(resourceGroup().id))]" - }, - "resources": [ - { - "apiVersion": "2017-03-01", - "name": "[variables('apiManagementServiceName')]", - "type": "Microsoft.ApiManagement/service", - "location": "[resourceGroup().location]", - "tags": {}, - "sku": { - "name": "[parameters('apiManagementSku')]", - "capacity": "[parameters('apiManagementSkuCount')]" - }, - "properties": { - "publisherEmail": "[parameters('apiManagementPublisherEmail')]", - "publisherName": "[parameters('apiManagementPublisherName')]" - } - }, - { - "name": "[variables('omsWorkspaceName')]", - "type": "Microsoft.OperationalInsights/workspaces", - "apiVersion": "2015-11-01-preview", - "location": "[parameters('workspaceRegion')]", - "properties": { - "sku": { - "name": "[parameters('omsSku')]" - } - } - }, - { - "name": "[concat(variables('apiManagementServiceName'), '/', 'Microsoft.Insights/service')]", - "type": "Microsoft.ApiManagement/service/providers/diagnosticSettings", - "apiVersion": "2015-07-01", - "dependsOn": [ - "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", - "[concat('Microsoft.OperationalInsights/workspaces/', variables('omsWorkspaceName'))]" - ], - "properties": { - "workspaceId": "[resourceId('Microsoft.OperationalInsights/workspaces', variables('omsWorkspaceName'))]", - "logs": [ - { - "category": "GatewayLogs", - "enabled": true - } - ] - } - } - ] -} \ No newline at end of file + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "apiManagementPublisherEmail": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The email address of the owner of the service" + } + }, + "apiManagementPublisherName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "The name of the owner of the service" + } + }, + "apiManagementSku": { + "type": "string", + "allowedValues": [ + "Developer", + "Standard", + "Premium" + ], + "defaultValue": "Developer", + "metadata": { + "description": "The pricing tiers of this API Management service" + } + }, + "apiManagementSkuCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance size of this API Management service." + } + }, + "workspaceRegion": { + "type": "string", + "defaultValue": "East US", + "allowedValues": [ + "Southeast Asia", + "Australia Southeast", + "West Europe", + "East US" + ], + "metadata": { + "description": "Specify the region for your OMS workspace" + } + }, + "omsSku": { + "type": "string", + "defaultValue": "free", + "allowedValues": [ + "free", + "standalone", + "pernode" + ], + "metadata": { + "description": "Select the SKU for your workspace" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "apiManagementServiceName": "[concat('apiservice', uniqueString(resourceGroup().id))]", + "omsWorkspaceName": "[concat('omsworkspace', uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "apiVersion": "2017-03-01", + "name": "[variables('apiManagementServiceName')]", + "type": "Microsoft.ApiManagement/service", + "location": "[parameters('location')]", + "tags": {}, + "sku": { + "name": "[parameters('apiManagementSku')]", + "capacity": "[parameters('apiManagementSkuCount')]" + }, + "properties": { + "publisherEmail": "[parameters('apiManagementPublisherEmail')]", + "publisherName": "[parameters('apiManagementPublisherName')]" + } + }, + { + "name": "[variables('omsWorkspaceName')]", + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "2015-11-01-preview", + "location": "[parameters('workspaceRegion')]", + "properties": { + "sku": { + "name": "[parameters('omsSku')]" + } + } + }, + { + "name": "[concat(variables('apiManagementServiceName'), '/', 'Microsoft.Insights/service')]", + "type": "Microsoft.ApiManagement/service/providers/diagnosticSettings", + "apiVersion": "2015-07-01", + "dependsOn": [ + "[concat('Microsoft.ApiManagement/service/', variables('apiManagementServiceName'))]", + "[concat('Microsoft.OperationalInsights/workspaces/', variables('omsWorkspaceName'))]" + ], + "properties": { + "workspaceId": "[resourceId('Microsoft.OperationalInsights/workspaces', variables('omsWorkspaceName'))]", + "logs": [ + { + "category": "GatewayLogs", + "enabled": true + } + ] + } + } + ] +} diff --git a/201-application-gateway-2vms-iis-ssl/azuredeploy.json b/201-application-gateway-2vms-iis-ssl/azuredeploy.json index e99d4d8f2766..dfcac83e647f 100644 --- a/201-application-gateway-2vms-iis-ssl/azuredeploy.json +++ b/201-application-gateway-2vms-iis-ssl/azuredeploy.json @@ -131,6 +131,13 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. If your artifacts are stored on a public repo or public storage account you can leave this blank." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -181,7 +188,7 @@ }, "name": "[variables('webAvailabilitySetName')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformUpdateDomainCount": 5, "platformFaultDomainCount": 2, @@ -203,7 +210,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('vm1PublicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('vm1PublicIPAddressType')]" } @@ -212,7 +219,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('vm2PublicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('vm2PublicIPAddressType')]" } @@ -221,7 +228,7 @@ "apiVersion": "2017-03-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('appGwPublicIpName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -230,7 +237,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('webNsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -282,7 +289,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('appGwNsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -334,7 +341,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('webNsgName'))]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('appGwNsgName'))]" @@ -371,7 +378,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('vm1NicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('vm1PublicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -398,7 +405,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('vm2NicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('vm2PublicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -425,7 +432,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vm1Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('vm1NicName'))]" ], @@ -466,7 +473,7 @@ { "name": "Microsoft.Powershell.DSC", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-04-30-preview", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vm1Name'))]" @@ -493,8 +500,7 @@ "defaultHtmPath": "[variables('vm1DefaultHtmFullPath')]" } }, - "protectedSettings": { - } + "protectedSettings": {} } } ] @@ -503,7 +509,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vm2Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('vm2NicName'))]" ], @@ -544,7 +550,7 @@ { "name": "Microsoft.Powershell.DSC", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-04-30-preview", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vm2Name'))]" @@ -569,11 +575,9 @@ "backendCertDnsName": "[parameters('backendCertDnsName')]", "webConfigPath": "[variables('webConfigFullPath')]", "defaultHtmPath": "[variables('vm2DefaultHtmFullPath')]" - } }, - "protectedSettings": { - } + "protectedSettings": {} } } ] @@ -582,7 +586,7 @@ "apiVersion": "2017-06-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[resourceId('Microsoft.Network/publicIPAddresses/', variables('appGwPublicIpName'))]" diff --git a/201-application-gateway-multihosting/azuredeploy.json b/201-application-gateway-multihosting/azuredeploy.json index a12cd5d05f69..d2b9de87889f 100644 --- a/201-application-gateway-multihosting/azuredeploy.json +++ b/201-application-gateway-multihosting/azuredeploy.json @@ -82,6 +82,13 @@ "metadata": { "description": "Password for .pfx certificate" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -100,7 +107,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -109,7 +116,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -130,7 +137,7 @@ "apiVersion": "2017-06-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -288,4 +295,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-application-gateway-path-override/azuredeploy.json b/201-application-gateway-path-override/azuredeploy.json index 3abd7a07ec90..12456bac0350 100644 --- a/201-application-gateway-path-override/azuredeploy.json +++ b/201-application-gateway-path-override/azuredeploy.json @@ -41,7 +41,7 @@ 8, 9, 10 - ], + ], "defaultValue": 2, "metadata": { "description": "Number of instances" @@ -64,7 +64,14 @@ "metadata": { "description": "Path match string for Path Rule 1" } - } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } }, "variables": { "applicationGatewayName": "applicationGateway1", @@ -81,7 +88,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -90,7 +97,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -111,7 +118,7 @@ "apiVersion": "2017-06-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -169,7 +176,7 @@ "Port": 80, "Protocol": "Http", "CookieBasedAffinity": "Disabled", - "Path":"[parameters('backendPath')]" + "Path": "[parameters('backendPath')]" } } ], @@ -234,4 +241,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-application-gateway-probe/azuredeploy.json b/201-application-gateway-probe/azuredeploy.json index f1de7dc40878..b765cd42d4b6 100644 --- a/201-application-gateway-probe/azuredeploy.json +++ b/201-application-gateway-probe/azuredeploy.json @@ -41,7 +41,7 @@ 8, 9, 10 - ], + ], "defaultValue": 2, "metadata": { "description": "Number of instances" @@ -118,6 +118,13 @@ "metadata": { "description": "Minimum number of servers that are kept in healthy state regardless of probe results." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -135,7 +142,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -144,7 +151,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -165,7 +172,7 @@ "apiVersion": "2017-06-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -223,7 +230,7 @@ "Port": 80, "Protocol": "Http", "CookieBasedAffinity": "Disabled", - "ProbeEnabled":"[parameters('probeEnabled')]", + "ProbeEnabled": "[parameters('probeEnabled')]", "Probe": { "id": "[concat(variables('applicationGatewayID'), '/probes/Probe1')]" } @@ -274,13 +281,15 @@ "UnhealthyThreshold": "[parameters('probeUnhealthyThreshold')]", "MinServers": "[parameters('probeMinServersAvailable')]", "Match": { - "StatusCodes": ["[parameters('healthyStatusCodes')]"] + "StatusCodes": [ + "[parameters('healthyStatusCodes')]" + ] }, - "PickHostNameFromBackendHttpSettings":"[parameters('probePickHostNameFromBackendHttpSettings')]" + "PickHostNameFromBackendHttpSettings": "[parameters('probePickHostNameFromBackendHttpSettings')]" } } ] } } ] -} \ No newline at end of file +} diff --git a/201-application-gateway-sslpolicy-custom/azuredeploy.json b/201-application-gateway-sslpolicy-custom/azuredeploy.json index d91ee1d6ecd8..02b69865a58c 100644 --- a/201-application-gateway-sslpolicy-custom/azuredeploy.json +++ b/201-application-gateway-sslpolicy-custom/azuredeploy.json @@ -58,6 +58,13 @@ "metadata": { "description": "Password for .pfx certificate" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -76,7 +83,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -85,7 +92,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -106,7 +113,7 @@ "apiVersion": "2017-06-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -238,4 +245,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-application-gateway-sslpolicy-predefined/azuredeploy.json b/201-application-gateway-sslpolicy-predefined/azuredeploy.json index 06e55a34a438..e31c718fa54d 100644 --- a/201-application-gateway-sslpolicy-predefined/azuredeploy.json +++ b/201-application-gateway-sslpolicy-predefined/azuredeploy.json @@ -58,6 +58,13 @@ "metadata": { "description": "Password for .pfx certificate" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -76,7 +83,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -85,7 +92,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -106,7 +113,7 @@ "apiVersion": "2017-06-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -220,4 +227,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-application-gateway-url-path-based-routing/azuredeploy.json b/201-application-gateway-url-path-based-routing/azuredeploy.json index 63969ec3153c..439360e9ea83 100644 --- a/201-application-gateway-url-path-based-routing/azuredeploy.json +++ b/201-application-gateway-url-path-based-routing/azuredeploy.json @@ -66,6 +66,13 @@ "metadata": { "description": "Path match string for Path Rule 2" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -84,7 +91,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -93,7 +100,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -114,7 +121,7 @@ "apiVersion": "2017-06-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -270,4 +277,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-application-gateway-webapp-iprestriction/azuredeploy.json b/201-application-gateway-webapp-iprestriction/azuredeploy.json index 6bbabde9ba19..cecf352ab99f 100644 --- a/201-application-gateway-webapp-iprestriction/azuredeploy.json +++ b/201-application-gateway-webapp-iprestriction/azuredeploy.json @@ -104,6 +104,13 @@ "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": { @@ -123,7 +130,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -132,7 +139,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -153,7 +160,7 @@ "apiVersion": "2017-10-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", @@ -292,7 +299,7 @@ "apiVersion": "2016-03-01", "name": "[variables('hostingPlanName')]", "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "HostingPlan" }, @@ -308,7 +315,7 @@ "apiVersion": "2016-08-01", "name": "[parameters('siteName')]", "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('hostingPlanName')]" ], @@ -352,7 +359,7 @@ }, { "apiVersion": "2017-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[variables('serverName')]", "properties": { "version": "[parameters('mysqlVersion')]", @@ -375,7 +382,7 @@ "dependsOn": [ "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[concat(variables('serverName'),'firewall')]", "properties": { "startIpAddress": "0.0.0.0", diff --git a/201-application-gateway-webapps/azuredeploy.json b/201-application-gateway-webapps/azuredeploy.json index 3d2c8f956c69..8774d13d760d 100644 --- a/201-application-gateway-webapps/azuredeploy.json +++ b/201-application-gateway-webapps/azuredeploy.json @@ -41,7 +41,7 @@ 8, 9, 10 - ], + ], "defaultValue": 2, "metadata": { "description": "Number of instances" @@ -65,6 +65,13 @@ "metadata": { "description": "Probe Enabled" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -82,7 +89,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -91,7 +98,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -112,7 +119,7 @@ "apiVersion": "2017-06-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -173,8 +180,8 @@ "Port": 80, "Protocol": "Http", "CookieBasedAffinity": "Disabled", - "PickHostNameFromBackendAddress":true, - "ProbeEnabled":"[parameters('probeEnabled')]", + "PickHostNameFromBackendAddress": true, + "ProbeEnabled": "[parameters('probeEnabled')]", "Probe": { "id": "[concat(variables('applicationGatewayID'), '/probes/Probe1')]" } @@ -217,17 +224,17 @@ { "Name": "Probe1", "properties": { - "Protocol": "Http", - "Path": "/", - "Interval": 30, - "Timeout": 10, - "UnhealthyThreshold": 3, - "MinServers": 0, - "PickHostNameFromBackendHttpSettings":true + "Protocol": "Http", + "Path": "/", + "Interval": 30, + "Timeout": 10, + "UnhealthyThreshold": 3, + "MinServers": 0, + "PickHostNameFromBackendHttpSettings": true } } ] } } ] -} \ No newline at end of file +} diff --git a/201-application-security-group/azuredeploy.json b/201-application-security-group/azuredeploy.json index 29c0806bc76b..5339541a4ac9 100644 --- a/201-application-security-group/azuredeploy.json +++ b/201-application-security-group/azuredeploy.json @@ -1,257 +1,264 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "_artifactsLocation": { - "type": "string", - "metadata": { - "description": "The base URI where artifacts required by this template are located." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-application-security-group" - }, - "_artifactsLocationSasToken": { - "type": "securestring", - "metadata": { - "description": "The sasToken required to access _artifactsLocation when they're located in a storage account with private access." - }, - "defaultValue": "" - }, - "vmName": { - "type": "string", - "defaultValue": "VM", - "metadata": { - "description": "VM Name" - } - }, - "vmSize": { - "type": "string", - "defaultValue": "Standard_D1_v2", - "metadata": { - "description": "VM Size" - } - }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "Administrator name" - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Administrator pasword" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-application-security-group" }, - "variables": { - "vnetName": "vnet", - "vNetAddressSpace": "10.0.0.0/16", - "subnetName": "subnet01", - "subnetAdressPrefix": "10.0.0.0/24", - "subnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets',variables('vnetName'),variables('subnetName'))]", - "asgName": "webServersAsg", - "asgId": "[resourceId('Microsoft.Network/applicationSecurityGroups',variables('asgName'))]", - "nsgName": "webNsg", - "nsgId": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]", - "pipName": "webServerPip", - "pipId": "[resourceId('Microsoft.Network/publicIPAddresses',variables('pipName'))]", - "imageInfo": { - "publisher": "OpenLogic", - "offer": "CentOS", - "sku": "6.9", - "version": "latest" - }, - "vmStorageType": "Standard_LRS", - "scriptUrl": "[concat(parameters('_artifactsLocation'),'/','install_nginx.sh',parameters('_artifactsLocationSasToken'))]" + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation when they're located in a storage account with private access." + }, + "defaultValue": "" }, - "resources": [ - { - "comments": "Application Security Group", - "name": "[variables('asgName')]", - "type": "Microsoft.Network/applicationSecurityGroups", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "comments": "Network Security Group", - "name": "[variables('nsgName')]", - "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2017-09-01", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[variables('asgName')]" - ], + "vmName": { + "type": "string", + "defaultValue": "VM", + "metadata": { + "description": "VM Name" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D1_v2", + "metadata": { + "description": "VM Size" + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "Administrator name" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator pasword" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "vnetName": "vnet", + "vNetAddressSpace": "10.0.0.0/16", + "subnetName": "subnet01", + "subnetAdressPrefix": "10.0.0.0/24", + "subnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets',variables('vnetName'),variables('subnetName'))]", + "asgName": "webServersAsg", + "asgId": "[resourceId('Microsoft.Network/applicationSecurityGroups',variables('asgName'))]", + "nsgName": "webNsg", + "nsgId": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]", + "pipName": "webServerPip", + "pipId": "[resourceId('Microsoft.Network/publicIPAddresses',variables('pipName'))]", + "imageInfo": { + "publisher": "OpenLogic", + "offer": "CentOS", + "sku": "6.9", + "version": "latest" + }, + "vmStorageType": "Standard_LRS", + "scriptUrl": "[concat(parameters('_artifactsLocation'),'/','install_nginx.sh',parameters('_artifactsLocationSasToken'))]" + }, + "resources": [ + { + "comments": "Application Security Group", + "name": "[variables('asgName')]", + "type": "Microsoft.Network/applicationSecurityGroups", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "properties": {} + }, + { + "comments": "Network Security Group", + "name": "[variables('nsgName')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2017-09-01", + "location": "[parameters('location')]", + "dependsOn": [ + "[variables('asgName')]" + ], + "properties": { + "securityRules": [ + { + "name": "AllowHttpAll", "properties": { - "securityRules": [ - { - "name": "AllowHttpAll", - "properties": { - "description": "Allow http traffic to web servers", - "sourceAddressPrefix": "*", - "sourcePortRange": "*", - "direction": "Inbound", - "access": "Allow", - "priority": 100, - "protocol": "Tcp", - "destinationPortRange": "80", - "destinationApplicationSecurityGroups": [ - { - "id": "[variables('asgId')]" - } - ] - } - }, - { - "name": "AllowSshAll", - "properties": { - "description": "Allow SSH traffic to web servers", - "sourceAddressPrefix": "*", - "sourcePortRange": "*", - "direction": "Inbound", - "access": "Allow", - "priority": 200, - "protocol": "Tcp", - "destinationPortRange": "22", - "destinationApplicationSecurityGroups": [ - { - "id": "[variables('asgId')]" - } - ] - } - } - ] + "description": "Allow http traffic to web servers", + "sourceAddressPrefix": "*", + "sourcePortRange": "*", + "direction": "Inbound", + "access": "Allow", + "priority": 100, + "protocol": "Tcp", + "destinationPortRange": "80", + "destinationApplicationSecurityGroups": [ + { + "id": "[variables('asgId')]" + } + ] } - }, - { - "comments": "Virtual Network", - "name": "[variables('vNetName')]", - "type": "Microsoft.Network/virtualNetworks", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[variables('nsgName')]" - ], + }, + { + "name": "AllowSshAll", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('vNetAddressSpace')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetAdressPrefix')]", - "networkSecurityGroup": { - "id": "[variables('nsgId')]" - } - } - } - ] + "description": "Allow SSH traffic to web servers", + "sourceAddressPrefix": "*", + "sourcePortRange": "*", + "direction": "Inbound", + "access": "Allow", + "priority": 200, + "protocol": "Tcp", + "destinationPortRange": "22", + "destinationApplicationSecurityGroups": [ + { + "id": "[variables('asgId')]" + } + ] } + } + ] + } + }, + { + "comments": "Virtual Network", + "name": "[variables('vNetName')]", + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[variables('nsgName')]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vNetAddressSpace')]" + ] }, - { - "comments": "Public Ip Address", - "name": "[variables('pipName')]", - "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "2017-11-01", - "location": "[resourceGroup().location]", + "subnets": [ + { + "name": "[variables('subnetName')]", "properties": { - "publicIPAllocationMethod": "Dynamic" + "addressPrefix": "[variables('subnetAdressPrefix')]", + "networkSecurityGroup": { + "id": "[variables('nsgId')]" + } } - }, - { - "comments": "Web Server Network Interface", - "name": "[concat(parameters('vmName'),'-NIC')]", - "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", - "apiVersion": "2017-09-01", - "dependsOn": [ - "[variables('vNetName')]", - "[variables('pipName')]" - ], + } + ] + } + }, + { + "comments": "Public Ip Address", + "name": "[variables('pipName')]", + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2017-11-01", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Dynamic" + } + }, + { + "comments": "Web Server Network Interface", + "name": "[concat(parameters('vmName'),'-NIC')]", + "type": "Microsoft.Network/networkInterfaces", + "location": "[parameters('location')]", + "apiVersion": "2017-09-01", + "dependsOn": [ + "[variables('vNetName')]", + "[variables('pipName')]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[variables('pipId')]" - }, - "subnet": { - "id": "[variables('subnetId')]" - }, - "applicationSecurityGroups": [ - { - "id": "[variables('asgId')]" - } - ] - } - } - ] + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[variables('pipId')]" + }, + "subnet": { + "id": "[variables('subnetId')]" + }, + "applicationSecurityGroups": [ + { + "id": "[variables('asgId')]" + } + ] } + } + ] + } + }, + { + "comments": "Linux Web Server", + "name": "[parameters('vmName')]", + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat(parameters('vmName'),'-NIC')]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" }, - { - "comments": "Linux Web Server", - "name": "[parameters('vmName')]", - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat(parameters('vmName'),'-NIC')]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" - }, - "osProfile": { - "computerName": "[parameters('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": "[variables('imageInfo')]", - "osDisk": { - "name": "[concat(parameters('vmName'),'-osdisk')]", - "caching": "ReadWrite", - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "[variables('vmStorageType')]" - } - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('vmName'),'-NIC'))]" - } - ] - } + "osProfile": { + "computerName": "[parameters('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": "[variables('imageInfo')]", + "osDisk": { + "name": "[concat(parameters('vmName'),'-osdisk')]", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[variables('vmStorageType')]" } + } }, - { - "comments": "Installs NGNIX", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('vmName'),'/linuxconfig')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[parameters('vmName')]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[variables('scriptUrl')]" - ], - "commandToExecute": "sh install_nginx.sh" - } + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('vmName'),'-NIC'))]" } + ] + } + } + }, + { + "comments": "Installs NGNIX", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('vmName'),'/linuxconfig')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[parameters('vmName')]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[variables('scriptUrl')]" + ], + "commandToExecute": "sh install_nginx.sh" } - ] -} \ No newline at end of file + } + } + ] +} diff --git a/201-azure-relay-create-all-resources/azuredeploy.json b/201-azure-relay-create-all-resources/azuredeploy.json index a375b35d666f..2be313289001 100644 --- a/201-azure-relay-create-all-resources/azuredeploy.json +++ b/201-azure-relay-create-all-resources/azuredeploy.json @@ -29,10 +29,17 @@ "metadata": { "description": "Name of the HybridConnection" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-04-01", "defaultSASKeyName": "RootManageSharedAccessKey", "defaultAuthRuleResourceId": "[resourceId('Microsoft.Relay/namespaces/authorizationRules', parameters('namespaceName'), variables('defaultSASKeyName'))]" @@ -46,7 +53,7 @@ "sku": { "name": "Standard" }, - "properties": { }, + "properties": {}, "resources": [ { "apiVersion": "[variables('apiVersion')]", @@ -87,4 +94,4 @@ "value": "[listkeys(variables('defaultAuthRuleResourceId'), variables('apiVersion')).primaryKey]" } } -} \ No newline at end of file +} diff --git a/201-azure-relay-create-hybridconnection/azuredeploy.json b/201-azure-relay-create-hybridconnection/azuredeploy.json index 01468c6b2aff..87acc164b658 100644 --- a/201-azure-relay-create-hybridconnection/azuredeploy.json +++ b/201-azure-relay-create-hybridconnection/azuredeploy.json @@ -13,10 +13,17 @@ "metadata": { "description": "Name of the HybridConnection" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-04-01", "defaultSASKeyName": "RootManageSharedAccessKey", "defaultAuthRuleResourceId": "[resourceId('Microsoft.Relay/namespaces/authorizationRules', parameters('namespaceName'), variables('defaultSASKeyName'))]" @@ -30,7 +37,7 @@ "sku": { "name": "Standard" }, - "properties": { }, + "properties": {}, "resources": [ { "apiVersion": "[variables('apiVersion')]", @@ -57,4 +64,4 @@ "value": "[listkeys(variables('defaultAuthRuleResourceId'), variables('apiVersion')).primaryKey]" } } -} \ No newline at end of file +} diff --git a/201-azure-relay-create-wcfrelay/azuredeploy.json b/201-azure-relay-create-wcfrelay/azuredeploy.json index 65fe49183514..ade8f7281edf 100644 --- a/201-azure-relay-create-wcfrelay/azuredeploy.json +++ b/201-azure-relay-create-wcfrelay/azuredeploy.json @@ -23,10 +23,17 @@ "metadata": { "description": "WCF Relay Type. It could be any of the types: NetTcp/Http" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-04-01", "defaultSASKeyName": "RootManageSharedAccessKey", "defaultAuthRuleResourceId": "[resourceId('Microsoft.Relay/namespaces/authorizationRules', parameters('namespaceName'), variables('defaultSASKeyName'))]" @@ -40,7 +47,7 @@ "sku": { "name": "Standard" }, - "properties": { }, + "properties": {}, "resources": [ { "apiVersion": "[variables('apiVersion')]", @@ -69,4 +76,4 @@ "value": "[listkeys(variables('defaultAuthRuleResourceId'), variables('apiVersion')).primaryKey]" } } -} \ No newline at end of file +} diff --git a/201-cdn-customize/azuredeploy.json b/201-cdn-customize/azuredeploy.json index 9ba2f8c96882..b3e44c6fffe4 100644 --- a/201-cdn-customize/azuredeploy.json +++ b/201-cdn-customize/azuredeploy.json @@ -85,13 +85,20 @@ "metadata": { "description": "Url of the origin" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "name": "[parameters('profileName')]", "type": "Microsoft.Cdn/profiles", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-01", "properties": { "sku": { @@ -104,7 +111,7 @@ "dependsOn": [ "[concat('Microsoft.Cdn/profiles/', parameters('profileName'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[concat(parameters('profileName'),'/',parameters('endpointName'))]", "type": "Microsoft.Cdn/profiles/endpoints", "properties": { @@ -125,4 +132,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-cdn-with-storage-account/azuredeploy.json b/201-cdn-with-storage-account/azuredeploy.json index a8fc00a80d49..e0d1ef74bf8d 100644 --- a/201-cdn-with-storage-account/azuredeploy.json +++ b/201-cdn-with-storage-account/azuredeploy.json @@ -1,7 +1,15 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": {}, + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, "variables": { "storageAccountName": "[concat('storage', uniqueString(resourceGroup().id))]", "endpointName": "[concat('endpoint-', uniqueString(resourceGroup().id))]", @@ -12,7 +20,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "[variables('storageAccountName')]" }, @@ -25,7 +33,7 @@ { "name": "[variables('profileName')]", "type": "Microsoft.Cdn/profiles", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-04-02", "tags": { "displayName": "[variables('profileName')]" @@ -43,7 +51,7 @@ "[variables('profileName')]", "[variables('storageAccountName')]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "[variables('endpointName')]" }, @@ -52,7 +60,13 @@ "isHttpAllowed": true, "isHttpsAllowed": true, "queryStringCachingBehavior": "IgnoreQueryString", - "contentTypesToCompress": [ "text/plain", "text/html", "text/css", "application/x-javascript", "text/javascript" ], + "contentTypesToCompress": [ + "text/plain", + "text/html", + "text/css", + "application/x-javascript", + "text/javascript" + ], "isCompressionEnabled": true, "origins": [ { @@ -77,4 +91,4 @@ "value": "[reference(variables('endpointName')).originHostHeader]" } } -} \ No newline at end of file +} diff --git a/201-cdn-with-web-app/azuredeploy.json b/201-cdn-with-web-app/azuredeploy.json index 0d52c64be9de..ad6841eac897 100644 --- a/201-cdn-with-web-app/azuredeploy.json +++ b/201-cdn-with-web-app/azuredeploy.json @@ -1,7 +1,15 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": {}, + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, "variables": { "endpointName": "[concat('endpoint-', uniqueString(resourceGroup().id))]", "serverFarmName": "ServerFarm1", @@ -12,7 +20,7 @@ { "name": "[variables('serverFarmName')]", "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-01", "tags": { "displayName": "[variables('serverFarmName')]" @@ -28,7 +36,7 @@ { "name": "[variables('webAppName')]", "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-01", "dependsOn": [ "[variables('serverFarmName')]" @@ -44,7 +52,7 @@ { "name": "[variables('profileName')]", "type": "Microsoft.Cdn/profiles", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-04-02", "tags": { "displayName": "[variables('profileName')]" @@ -57,7 +65,7 @@ { "name": "[variables('endpointName')]", "type": "endpoints", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-04-02", "dependsOn": [ "[variables('profileName')]", @@ -102,4 +110,4 @@ "value": "[reference(variables('endpointName')).originHostHeader]" } } -} \ No newline at end of file +} diff --git a/201-create-encrypted-managed-disk/CreateEncryptedManagedDisk-kek.json b/201-create-encrypted-managed-disk/CreateEncryptedManagedDisk-kek.json index b4cf2c7f6fe3..d62da533c17f 100644 --- a/201-create-encrypted-managed-disk/CreateEncryptedManagedDisk-kek.json +++ b/201-create-encrypted-managed-disk/CreateEncryptedManagedDisk-kek.json @@ -39,11 +39,17 @@ "metadata": { "description": "KekVault resource id. Ex: /subscriptions/subscriptionid/resourceGroups/contosorg/providers/Microsoft.KeyVault/vaults/contosovault" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", - "computeResouresApiVersion": "2016-04-30-preview", + "location": "[parameters('location')]", "storageAccountType": "Standard_LRS", "diskSzie": "128" }, @@ -78,4 +84,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-create-encrypted-managed-disk/CreateEncryptedManagedDisk-nokek.json b/201-create-encrypted-managed-disk/CreateEncryptedManagedDisk-nokek.json index 4c8bb672f86f..19bb0bcaa893 100644 --- a/201-create-encrypted-managed-disk/CreateEncryptedManagedDisk-nokek.json +++ b/201-create-encrypted-managed-disk/CreateEncryptedManagedDisk-nokek.json @@ -39,11 +39,17 @@ "metadata": { "description": "Ignore this. Not consumed" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", - "computeResouresApiVersion": "2016-04-30-preview", + "location": "[parameters('location')]", "storageAccountType": "Standard_LRS", "diskSzie": "128" }, @@ -72,4 +78,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-customscript-extension-azure-storage-on-ubuntu/azuredeploy.json b/201-customscript-extension-azure-storage-on-ubuntu/azuredeploy.json index e686a1f3fed6..c00c829a0b64 100644 --- a/201-customscript-extension-azure-storage-on-ubuntu/azuredeploy.json +++ b/201-customscript-extension-azure-storage-on-ubuntu/azuredeploy.json @@ -62,13 +62,19 @@ "metadata": { "description": "The access key of storage account." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "extensionName": "CustomScript", "scenarioPrefix": "customscriptLinux", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "ubuntuOSVersion": "14.04.2-LTS", @@ -91,7 +97,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -100,7 +106,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -112,7 +118,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -133,7 +139,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -159,7 +165,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -202,7 +208,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('extensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -222,4 +228,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-customscript-extension-public-storage-on-ubuntu/azuredeploy.json b/201-customscript-extension-public-storage-on-ubuntu/azuredeploy.json index a37212513b9d..5cf72d49b76a 100644 --- a/201-customscript-extension-public-storage-on-ubuntu/azuredeploy.json +++ b/201-customscript-extension-public-storage-on-ubuntu/azuredeploy.json @@ -55,24 +55,26 @@ "metadata": { "description": "The command to execute." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "extensionName": "CustomScript", "scenarioPrefix": "customscriptLinux", - "apiVersion": "2015-05-01-preview", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "ubuntuOSVersion": "14.04.2-LTS", - "OSDiskName": "[concat(variables('scenarioPrefix'),'OSDisk')]", "nicName": "[concat(variables('scenarioPrefix'),'Nic')]", "vnetAddressPrefix": "10.0.0.0/16", "subnetName": "[concat(variables('scenarioPrefix'),'Subnet')]", "subnetPrefix": "10.0.0.0/24", - "storageAccountType": "Standard_LRS", "publicIPAddressName": "[concat(variables('scenarioPrefix'),'PublicIp')]", "publicIPAddressType": "Dynamic", - "vmStorageAccountContainerName": "vhds", "vmName": "[concat(variables('scenarioPrefix'),'VM')]", "virtualNetworkName": "[concat(variables('scenarioPrefix'),'Vnet')]", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", @@ -83,7 +85,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -95,7 +97,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -116,7 +118,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -142,7 +144,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -180,7 +182,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/installcustomscript')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -198,4 +200,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-data-factory-v2-azure-sql-database-to-sql-data-warehouse-copy/azuredeploy.json b/201-data-factory-v2-azure-sql-database-to-sql-data-warehouse-copy/azuredeploy.json index eaae919ac607..3d6f384ffedb 100644 --- a/201-data-factory-v2-azure-sql-database-to-sql-data-warehouse-copy/azuredeploy.json +++ b/201-data-factory-v2-azure-sql-database-to-sql-data-warehouse-copy/azuredeploy.json @@ -1,295 +1,298 @@ { - "contentVersion": "1.0.0.0", - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "parameters": { - "dataFactoryName": { - "type": "string", - "metadata": { - "description": "Name of the data factory. Must be globally unique." - } - }, - "dataFactoryLocation": { - "type": "string", - "allowedValues": [ - "East US", - "East US 2", - "West Europe", - "Southeast Asia" - ], - "metadata": { - "description": "Location of the data factory." - } - }, - "azureStorageConnectionString": { - "type": "securestring", - "metadata": { - "description": "Connection string for the Azure Storage account." - } - }, - "azureSqlDatabaseConnectionString": { - "type": "string", - "metadata": { - "description": "Connnection string for the Azure SQL database." - } - }, - "azureSqllDataWarehouseConnectionString": { - "type": "string", - "metadata": { - "description": "Connection string for the Azure SQL Data Warehouse" - } - } - }, - "variables": { - "azureStorageLinkedServiceName": "Tutorial4_AzureStorageLinkedService", - "azureSqlDatabaseLinkedServiceName": "Tutorial4_AzureSqlDatabaseLinkedService", - "azureSqlDataWareHouseLinkedServiceName": "Tutorial4_AzureSqlDataWarehouseLinkedService", - "inputDatasetName": "Tutorial4_InputSqlDataset", - "outputDatasetName": "Tutorial4_OutputSqlDataWarehouseDataset", - "pipelineName": "Tutorial2-CopyFromSqlToSqlDwPipeline", - "pipelineName2": "Tutorial2-TriggerCopyPipeline", - "leftBracket": "[" - }, - "resources": [{ - "name": "[parameters('dataFactoryName')]", - "apiVersion": "2017-09-01-preview", - "type": "Microsoft.DataFactory/factories", - "location": "[parameters('dataFactoryLocation')]", - "properties": {}, - "resources": [{ - "type": "linkedservices", - "name": "[variables('azureStorageLinkedServiceName')]", - "dependsOn": [ - "[parameters('dataFactoryName')]" - ], - "apiVersion": "2017-09-01-preview", - "properties": { - "type": "AzureStorage", - "description": "Azure Storage linked service", - "typeProperties": { - "connectionString": { - "value": "[parameters('azureStorageConnectionString')]", - "type": "SecureString" - } - } - } - }, - { - "type": "linkedservices", - "name": "[variables('azureSqlDatabaseLinkedServiceName')]", - "dependsOn": [ - "[parameters('dataFactoryName')]" - ], - "apiVersion": "2017-09-01-preview", - "properties": { - "type": "AzureSqlDatabase", - "description": "Azure SQL Database linked service", - "typeProperties": { - "connectionString": { - "value": "[parameters('azureSqlDatabaseConnectionString')]", - "type": "SecureString" - } - } - } - }, - { - "type": "linkedservices", - "name": "[variables('azureSqlDataWarehouseLinkedServiceName')]", - "dependsOn": [ - "[parameters('dataFactoryName')]" - ], - "apiVersion": "2017-09-01-preview", - "properties": { - "type": "AzureSqlDW", - "description": "Azure SQL Data Warehouse linked service", - "typeProperties": { - "connectionString": { - "value": "[parameters('azureSqllDataWarehouseConnectionString')]", - "type": "SecureString" - } - } - } - }, - { - "name": "[variables('inputDatasetName')]", - "type": "datasets", - "apiVersion": "2017-09-01-preview", - "properties": { - "linkedServiceName": { - "referenceName": "[variables('azureSqlDatabaseLinkedServiceName')]", - "type": "LinkedServiceReference" - }, - "type": "AzureSqlTable", - "typeProperties": { - "tableName": "'dummy'" - } - }, - "dependsOn": [ - "[parameters('dataFactoryName')]", - "[variables('azureSqlDatabaseLinkedServiceName')]" - ] - }, - { - "name": "[variables('outputDatasetName')]", - "type": "datasets", - "apiVersion": "2017-09-01-preview", - "properties": { - "linkedServiceName": { - "referenceName": "[variables('azureSqlDataWareHouseLinkedServiceName')]", - "type": "LinkedServiceReference" - }, - "parameters": { - "DWTableName": { - "type": "String" - } - }, - "type": "AzureSqlDWTable", - "typeProperties": { - "tableName": { - "value": "@{dataset().DWTableName}", - "type": "Expression" - } - } - }, - "dependsOn": [ - "[parameters('dataFactoryName')]", - "[variables('azureSqlDataWarehouseLinkedServiceName')]" - ] - }, - { - "type": "pipelines", - "name": "[variables('pipelineName')]", - "dependsOn": [ - "[parameters('dataFactoryName')]", - "[variables('inputDatasetName')]", - "[variables('outputDatasetName')]" - ], - "apiVersion": "2017-09-01-preview", - "properties": { - "activities": [ - { - "name": "IterateSQLTables", - "description": "", - "type": "ForEach", - "dependsOn": [], - "typeProperties": { - "items": { - "value": "@pipeline().parameters.tableList", - "type": "Expression" - }, - "activities": [ - { - "name": "CopyData", - "type": "Copy", - "dependsOn": [], - "policy": {}, - "typeProperties": { - "source": { - "type": "SqlSource", - "sqlReaderQuery": "SELECT * FROM [@{item().TABLE_SCHEMA}].[@{item().TABLE_NAME}]" - }, - "sink": { - "type": "SqlDWSink", - "allowPolyBase": true, - "writeBatchSize": 10000, - "preCopyScript": "TRUNCATE TABLE [@{item().TABLE_SCHEMA}].[@{item().TABLE_NAME}]", - "polyBaseSettings": { - "rejectValue": 0, - "rejectType": "value", - "useTypeDefault": false - } - }, - "enableStaging": true, - "stagingSettings": { - "linkedServiceName": { - "referenceName": "[variables('azureStorageLinkedServiceName')]", - "type": "LinkedServiceReference" - } - }, - "cloudDataMovementUnits": 0 - }, - "inputs": [ - { - "referenceName": "[variables('inputDatasetName')]", - "type": "DatasetReference", - "parameters": {} - } - ], - "outputs": [ - { - "referenceName": "[variables('outputDatasetName')]", - "type": "DatasetReference", - "parameters": { - "DWTableName": "[concat(variables('leftBracket'), '@{item().TABLE_SCHEMA}].[@{item().TABLE_NAME}]')]" - } - } - ] - } - ] - } - } - ], - "parameters": { - "tableList": { - "type": "Array" - } - } - } - }, - { - "name": "[variables('pipelineName2')]", - "type": "pipelines", - "apiVersion": "2017-09-01-preview", - "properties": { - "activities": [ - { - "name": "LookupTableList", - "description": " Retrieve the table list from Azure SQL database", - "type": "Lookup", - "dependsOn": [], - "policy": {}, - "typeProperties": { - "source": { - "type": "SqlSource", - "sqlReaderQuery": "SELECT TABLE_SCHEMA, TABLE_NAME FROM information_schema.TABLES WHERE TABLE_TYPE = 'BASE TABLE' and TABLE_SCHEMA = 'SalesLT' and TABLE_NAME <> 'ProductModel'" - }, - "dataset": { - "referenceName": "[variables('inputDatasetName')]", - "type": "DatasetReference", - "parameters": {} - }, - "firstRowOnly": false - } - }, - { - "name": "TriggerCopy", - "type": "ExecutePipeline", - "dependsOn": [ - { - "activity": "LookupTableList", - "dependencyConditions": [ - "Succeeded" - ] - } - ], - "typeProperties": { - "pipeline": { - "referenceName": "[variables('pipelineName')]", - "type": "PipelineReference" - }, - "parameters": { - "tableList": "@activity('LookupTableList').output.value" - } - } - } - ] - }, - "dependsOn": [ - "[parameters('dataFactoryName')]", - "[variables('inputDatasetName')]", - "[variables('outputDatasetName')]", - "[variables('pipelineName')]" - ] - } - ] - }] -} \ No newline at end of file + "contentVersion": "1.0.0.0", + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "parameters": { + "dataFactoryName": { + "type": "string", + "metadata": { + "description": "Name of the data factory. Must be globally unique." + } + }, + "dataFactoryLocation": { + "type": "string", + "allowedValues": [ + "East US", + "East US 2", + "West Europe", + "Southeast Asia" + ], + "metadata": { + "description": "Location of the data factory." + } + }, + "azureStorageConnectionString": { + "type": "securestring", + "metadata": { + "description": "Connection string for the Azure Storage account." + } + }, + "azureSqlDatabaseConnectionString": { + "type": "string", + "metadata": { + "description": "Connnection string for the Azure SQL database." + } + }, + "azureSqllDataWarehouseConnectionString": { + "type": "string", + "metadata": { + "description": "Connection string for the Azure SQL Data Warehouse" + } + } + }, + "variables": { + "azureStorageLinkedServiceName": "Tutorial4_AzureStorageLinkedService", + "azureSqlDatabaseLinkedServiceName": "Tutorial4_AzureSqlDatabaseLinkedService", + "azureSqlDataWareHouseLinkedServiceName": "Tutorial4_AzureSqlDataWarehouseLinkedService", + "inputDatasetName": "Tutorial4_InputSqlDataset", + "outputDatasetName": "Tutorial4_OutputSqlDataWarehouseDataset", + "pipelineName": "Tutorial2-CopyFromSqlToSqlDwPipeline", + "pipelineName2": "Tutorial2-TriggerCopyPipeline", + "leftBracket": "[" + }, + "resources": [ + { + "name": "[parameters('dataFactoryName')]", + "apiVersion": "2017-09-01-preview", + "type": "Microsoft.DataFactory/factories", + "location": "[parameters('dataFactoryLocation')]", + "properties": {}, + "resources": [ + { + "type": "linkedservices", + "name": "[variables('azureStorageLinkedServiceName')]", + "dependsOn": [ + "[parameters('dataFactoryName')]" + ], + "apiVersion": "2017-09-01-preview", + "properties": { + "type": "AzureStorage", + "description": "Azure Storage linked service", + "typeProperties": { + "connectionString": { + "value": "[parameters('azureStorageConnectionString')]", + "type": "SecureString" + } + } + } + }, + { + "type": "linkedservices", + "name": "[variables('azureSqlDatabaseLinkedServiceName')]", + "dependsOn": [ + "[parameters('dataFactoryName')]" + ], + "apiVersion": "2017-09-01-preview", + "properties": { + "type": "AzureSqlDatabase", + "description": "Azure SQL Database linked service", + "typeProperties": { + "connectionString": { + "value": "[parameters('azureSqlDatabaseConnectionString')]", + "type": "SecureString" + } + } + } + }, + { + "type": "linkedservices", + "name": "[variables('azureSqlDataWarehouseLinkedServiceName')]", + "dependsOn": [ + "[parameters('dataFactoryName')]" + ], + "apiVersion": "2017-09-01-preview", + "properties": { + "type": "AzureSqlDW", + "description": "Azure SQL Data Warehouse linked service", + "typeProperties": { + "connectionString": { + "value": "[parameters('azureSqllDataWarehouseConnectionString')]", + "type": "SecureString" + } + } + } + }, + { + "name": "[variables('inputDatasetName')]", + "type": "datasets", + "apiVersion": "2017-09-01-preview", + "properties": { + "linkedServiceName": { + "referenceName": "[variables('azureSqlDatabaseLinkedServiceName')]", + "type": "LinkedServiceReference" + }, + "type": "AzureSqlTable", + "typeProperties": { + "tableName": "'dummy'" + } + }, + "dependsOn": [ + "[parameters('dataFactoryName')]", + "[variables('azureSqlDatabaseLinkedServiceName')]" + ] + }, + { + "name": "[variables('outputDatasetName')]", + "type": "datasets", + "apiVersion": "2017-09-01-preview", + "properties": { + "linkedServiceName": { + "referenceName": "[variables('azureSqlDataWareHouseLinkedServiceName')]", + "type": "LinkedServiceReference" + }, + "parameters": { + "DWTableName": { + "type": "String" + } + }, + "type": "AzureSqlDWTable", + "typeProperties": { + "tableName": { + "value": "@{dataset().DWTableName}", + "type": "Expression" + } + } + }, + "dependsOn": [ + "[parameters('dataFactoryName')]", + "[variables('azureSqlDataWarehouseLinkedServiceName')]" + ] + }, + { + "type": "pipelines", + "name": "[variables('pipelineName')]", + "dependsOn": [ + "[parameters('dataFactoryName')]", + "[variables('inputDatasetName')]", + "[variables('outputDatasetName')]" + ], + "apiVersion": "2017-09-01-preview", + "properties": { + "activities": [ + { + "name": "IterateSQLTables", + "description": "", + "type": "ForEach", + "dependsOn": [], + "typeProperties": { + "items": { + "value": "@pipeline().parameters.tableList", + "type": "Expression" + }, + "activities": [ + { + "name": "CopyData", + "type": "Copy", + "dependsOn": [], + "policy": {}, + "typeProperties": { + "source": { + "type": "SqlSource", + "sqlReaderQuery": "SELECT * FROM [@{item().TABLE_SCHEMA}].[@{item().TABLE_NAME}]" + }, + "sink": { + "type": "SqlDWSink", + "allowPolyBase": true, + "writeBatchSize": 10000, + "preCopyScript": "TRUNCATE TABLE [@{item().TABLE_SCHEMA}].[@{item().TABLE_NAME}]", + "polyBaseSettings": { + "rejectValue": 0, + "rejectType": "value", + "useTypeDefault": false + } + }, + "enableStaging": true, + "stagingSettings": { + "linkedServiceName": { + "referenceName": "[variables('azureStorageLinkedServiceName')]", + "type": "LinkedServiceReference" + } + }, + "cloudDataMovementUnits": 0 + }, + "inputs": [ + { + "referenceName": "[variables('inputDatasetName')]", + "type": "DatasetReference", + "parameters": {} + } + ], + "outputs": [ + { + "referenceName": "[variables('outputDatasetName')]", + "type": "DatasetReference", + "parameters": { + "DWTableName": "[concat(variables('leftBracket'), '@{item().TABLE_SCHEMA}].[@{item().TABLE_NAME}]')]" + } + } + ] + } + ] + } + } + ], + "parameters": { + "tableList": { + "type": "Array" + } + } + } + }, + { + "name": "[variables('pipelineName2')]", + "type": "pipelines", + "apiVersion": "2017-09-01-preview", + "properties": { + "activities": [ + { + "name": "LookupTableList", + "description": " Retrieve the table list from Azure SQL database", + "type": "Lookup", + "dependsOn": [], + "policy": {}, + "typeProperties": { + "source": { + "type": "SqlSource", + "sqlReaderQuery": "SELECT TABLE_SCHEMA, TABLE_NAME FROM information_schema.TABLES WHERE TABLE_TYPE = 'BASE TABLE' and TABLE_SCHEMA = 'SalesLT' and TABLE_NAME <> 'ProductModel'" + }, + "dataset": { + "referenceName": "[variables('inputDatasetName')]", + "type": "DatasetReference", + "parameters": {} + }, + "firstRowOnly": false + } + }, + { + "name": "TriggerCopy", + "type": "ExecutePipeline", + "dependsOn": [ + { + "activity": "LookupTableList", + "dependencyConditions": [ + "Succeeded" + ] + } + ], + "typeProperties": { + "pipeline": { + "referenceName": "[variables('pipelineName')]", + "type": "PipelineReference" + }, + "parameters": { + "tableList": "@activity('LookupTableList').output.value" + } + } + } + ] + }, + "dependsOn": [ + "[parameters('dataFactoryName')]", + "[variables('inputDatasetName')]", + "[variables('outputDatasetName')]", + "[variables('pipelineName')]" + ] + } + ] + } + ] +} diff --git a/201-data-factory-v2-azure-sql-database-to-sql-data-warehouse-copy/prereqs/prereq.azuredeploy.json b/201-data-factory-v2-azure-sql-database-to-sql-data-warehouse-copy/prereqs/prereq.azuredeploy.json index 50c65c84c96d..88e232bfd4f6 100644 --- a/201-data-factory-v2-azure-sql-database-to-sql-data-warehouse-copy/prereqs/prereq.azuredeploy.json +++ b/201-data-factory-v2-azure-sql-database-to-sql-data-warehouse-copy/prereqs/prereq.azuredeploy.json @@ -1,128 +1,134 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "databaseAdminUsername": { - "type": "string", - "metadata": { - "description": "Username for DB Admin" - } - }, - "databaseAdminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for DB Admin" - } - } - }, - "variables": { - "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]", - "serverName": "[concat('server', uniqueString(resourceGroup().id))]", - "databaseName": "SourceDB", - "databaseEdition": "Standard", - "databaseCollation": "SQL_Latin1_General_CP1_CI_AS", - "databaseRequestedServiceObjectiveName": "S3", - "dataWarehouseName": "SinkDW", - "dataWarehouseEdition": "DataWarehouse", - "dataWarehouseCollation": "SQL_Latin1_General_CP1_CI_AS", - "dataWarehouseServiceObjectiveName": "DW400" - }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "East US", - "comments": "Storage account ", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": { - - } - }, - { - "name": "[variables('serverName')]", - "type": "Microsoft.Sql/servers", - "location": "[resourceGroup().location]", - "apiVersion": "2015-05-01-preview", - "dependsOn": [], - "tags": { - "displayName": "server" - }, - "properties": { - "administratorLogin": "[parameters('databaseAdminUsername')]", - "administratorLoginPassword": "[parameters('databaseAdminPassword')]" - }, - "resources": [ - { - "name": "AllowAllWindowsAzureIps", - "type": "firewallrules", - "location": "East US", - "apiVersion": "2014-04-01-preview", - "dependsOn": [ - "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" - ], - "properties": { - "startIpAddress": "0.0.0.0", - "endIpAddress": "0.0.0.0" - } - }, - { - "name": "[variables('databaseName')]", - "type": "databases", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01-preview", - "dependsOn": [ - "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" - ], - "tags": { - "displayName": "database" - }, - "properties": { - "collation": "[variables('databaseCollation')]", - "edition": "[variables('databaseEdition')]", - "maxSizeBytes": "268435456000", - "requestedServiceObjectiveName": "[variables('databaseRequestedServiceObjectiveName')]", - "sampleName": "AdventureWorksLT" - } - }, - { - "name": "[variables('dataWarehouseName')]", - "type": "databases", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01-preview", - "dependsOn": [ - "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" - ], - "tags": { - "displayName": "data warehouse" - }, - "properties": { - "collation": "[variables('dataWarehouseCollation')]", - "edition": "[variables('dataWarehouseEdition')]", - "maxSizeBytes": "263882790666240", - "requestedServiceObjectiveName": "[variables('dataWarehouseServiceObjectiveName')]" - } - } - ] - } - ], - "outputs": { - "AzureStorage_connectionString": { - "type": "securestring", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value)]" - }, - "AzureSqlDatabase_connectionString": { - "type": "securestring", - "value": "[concat('Server=tcp:', variables('serverName'),'.database.windows.net,1433;Initial Catalog=',variables('databaseName'), ';Persist Security Info=False;User ID=', parameters('databaseAdminUsername'), ';Password=', parameters('databaseAdminPassword'), ';Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;'" - }, - "AzureSqlDataWarehouse_connectionString": { - "type": "securestring", - "value": "[concat('Server=tcp:', variables('serverName'),'.database.windows.net,1433;Initial Catalog=',variables('dataWarehouseName'), ';Persist Security Info=False;User ID=', parameters('databaseAdminUsername'), ';Password=', parameters('databaseAdminPassword'), ';Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;'" - } - } -} \ No newline at end of file + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "databaseAdminUsername": { + "type": "string", + "metadata": { + "description": "Username for DB Admin" + } + }, + "databaseAdminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for DB Admin" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]", + "serverName": "[concat('server', uniqueString(resourceGroup().id))]", + "databaseName": "SourceDB", + "databaseEdition": "Standard", + "databaseCollation": "SQL_Latin1_General_CP1_CI_AS", + "databaseRequestedServiceObjectiveName": "S3", + "dataWarehouseName": "SinkDW", + "dataWarehouseEdition": "DataWarehouse", + "dataWarehouseCollation": "SQL_Latin1_General_CP1_CI_AS", + "dataWarehouseServiceObjectiveName": "DW400" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "East US", + "comments": "Storage account ", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "name": "[variables('serverName')]", + "type": "Microsoft.Sql/servers", + "location": "[parameters('location')]", + "apiVersion": "2015-05-01-preview", + "dependsOn": [], + "tags": { + "displayName": "server" + }, + "properties": { + "administratorLogin": "[parameters('databaseAdminUsername')]", + "administratorLoginPassword": "[parameters('databaseAdminPassword')]" + }, + "resources": [ + { + "name": "AllowAllWindowsAzureIps", + "type": "firewallrules", + "location": "East US", + "apiVersion": "2014-04-01-preview", + "dependsOn": [ + "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" + ], + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "0.0.0.0" + } + }, + { + "name": "[variables('databaseName')]", + "type": "databases", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01-preview", + "dependsOn": [ + "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" + ], + "tags": { + "displayName": "database" + }, + "properties": { + "collation": "[variables('databaseCollation')]", + "edition": "[variables('databaseEdition')]", + "maxSizeBytes": "268435456000", + "requestedServiceObjectiveName": "[variables('databaseRequestedServiceObjectiveName')]", + "sampleName": "AdventureWorksLT" + } + }, + { + "name": "[variables('dataWarehouseName')]", + "type": "databases", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01-preview", + "dependsOn": [ + "[resourceId('Microsoft.Sql/servers', variables('serverName'))]" + ], + "tags": { + "displayName": "data warehouse" + }, + "properties": { + "collation": "[variables('dataWarehouseCollation')]", + "edition": "[variables('dataWarehouseEdition')]", + "maxSizeBytes": "263882790666240", + "requestedServiceObjectiveName": "[variables('dataWarehouseServiceObjectiveName')]" + } + } + ] + } + ], + "outputs": { + "AzureStorage_connectionString": { + "type": "securestring", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value)]" + }, + "AzureSqlDatabase_connectionString": { + "type": "securestring", + "value": "[concat('Server=tcp:', variables('serverName'),'.database.windows.net,1433;Initial Catalog=',variables('databaseName'), ';Persist Security Info=False;User ID=', parameters('databaseAdminUsername'), ';Password=', parameters('databaseAdminPassword'), ';Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;'" + }, + "AzureSqlDataWarehouse_connectionString": { + "type": "securestring", + "value": "[concat('Server=tcp:', variables('serverName'),'.database.windows.net,1433;Initial Catalog=',variables('dataWarehouseName'), ';Persist Security Info=False;User ID=', parameters('databaseAdminUsername'), ';Password=', parameters('databaseAdminPassword'), ';Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;'" + } + } +} diff --git a/201-decrypt-running-linux-vm/azuredeploy.json b/201-decrypt-running-linux-vm/azuredeploy.json index 29f75333d56e..50030028936e 100644 --- a/201-decrypt-running-linux-vm/azuredeploy.json +++ b/201-decrypt-running-linux-vm/azuredeploy.json @@ -24,6 +24,13 @@ "metadata": { "description": "Pass in an unique value like a GUID everytime the operation needs to be force run" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -37,7 +44,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/', variables('extensionName'))]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.Azure.Security", "type": "AzureDiskEncryptionForLinux", @@ -68,7 +75,7 @@ "vmName": { "value": "[parameters('vmName')]" } - } + } } } ] diff --git a/201-decrypt-running-linux-vm/updateEncryptionSettings.json b/201-decrypt-running-linux-vm/updateEncryptionSettings.json index f9613d9e50d0..66d858892a0c 100644 --- a/201-decrypt-running-linux-vm/updateEncryptionSettings.json +++ b/201-decrypt-running-linux-vm/updateEncryptionSettings.json @@ -1,29 +1,36 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", - "properties": { - "storageProfile": { - "osDisk": { - "encryptionSettings": { - "enabled": false - } - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "encryptionSettings": { + "enabled": false } + } } - ] + } + } + ] } diff --git a/201-decrypt-running-windows-vm-without-aad/azuredeploy.json b/201-decrypt-running-windows-vm-without-aad/azuredeploy.json index 324d5af7e7c6..39233055bae6 100644 --- a/201-decrypt-running-windows-vm-without-aad/azuredeploy.json +++ b/201-decrypt-running-windows-vm-without-aad/azuredeploy.json @@ -21,13 +21,20 @@ "metadata": { "description": "Pass in an unique value like a GUID everytime the operation needs to be force run" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/','AzureDiskEncryption')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-03-30", "properties": { "publisher": "Microsoft.Azure.Security", @@ -36,8 +43,8 @@ "autoUpgradeMinorVersion": true, "forceUpdateTag": "[parameters('forceUpdateTag')]", "settings": { - "EncryptionOperation": "DisableEncryption", - "VolumeType": "[parameters('volumeType')]" + "EncryptionOperation": "DisableEncryption", + "VolumeType": "[parameters('volumeType')]" } } } diff --git a/201-decrypt-running-windows-vm-without-aad/prereqs/prereq.azuredeploy.json b/201-decrypt-running-windows-vm-without-aad/prereqs/prereq.azuredeploy.json index d688298d67a4..876d2e8dcbcc 100644 --- a/201-decrypt-running-windows-vm-without-aad/prereqs/prereq.azuredeploy.json +++ b/201-decrypt-running-windows-vm-without-aad/prereqs/prereq.azuredeploy.json @@ -32,6 +32,13 @@ "metadata": { "description": "URL of the KeyEncryptionKey used to encrypt the volume encryption key" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -51,7 +58,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -72,7 +79,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" ], @@ -94,7 +101,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -137,7 +144,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('extensionName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -149,14 +156,14 @@ "autoUpgradeMinorVersion": true, "forceUpdateTag": "1.0", "settings": { - "EncryptionOperation": "[variables('encryptionOperation')]", - "KeyVaultURL": "[reference(variables('keyVaultResourceId'),'2018-02-14-preview').vaultUri]", - "KeyVaultResourceId": "[variables('keyVaultResourceID')]", - "KeyEncryptionKeyURL": "[parameters('keyEncryptionKeyURL')]", - "KekVaultResourceId": "[variables('keyVaultResourceID')]", - "KeyEncryptionAlgorithm": "[variables('keyEncryptionAlgorithm')]", - "VolumeType": "All", - "ResizeOSDisk": false + "EncryptionOperation": "[variables('encryptionOperation')]", + "KeyVaultURL": "[reference(variables('keyVaultResourceId'),'2018-02-14-preview').vaultUri]", + "KeyVaultResourceId": "[variables('keyVaultResourceID')]", + "KeyEncryptionKeyURL": "[parameters('keyEncryptionKeyURL')]", + "KekVaultResourceId": "[variables('keyVaultResourceID')]", + "KeyEncryptionAlgorithm": "[variables('keyEncryptionAlgorithm')]", + "VolumeType": "All", + "ResizeOSDisk": false } } } @@ -167,4 +174,4 @@ "value": "[variables('vmName')]" } } -} \ No newline at end of file +} diff --git a/201-decrypt-running-windows-vm/azuredeploy.json b/201-decrypt-running-windows-vm/azuredeploy.json index 1b4feaa7ce64..93b8c5ba917f 100644 --- a/201-decrypt-running-windows-vm/azuredeploy.json +++ b/201-decrypt-running-windows-vm/azuredeploy.json @@ -26,6 +26,13 @@ "metadata": { "description": "Pass in an unique value like a GUID everytime the operation needs to be force run" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -39,7 +46,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/', variables('extensionName'))]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.Azure.Security", "type": "AzureDiskEncryption", @@ -73,4 +80,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-decrypt-running-windows-vm/updateEncryptionSettings-All.json b/201-decrypt-running-windows-vm/updateEncryptionSettings-All.json index 620bd8bf7412..25d422bcc3c0 100644 --- a/201-decrypt-running-windows-vm/updateEncryptionSettings-All.json +++ b/201-decrypt-running-windows-vm/updateEncryptionSettings-All.json @@ -1,29 +1,36 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } }, - "resources": [ - { - "apiVersion": "2016-04-30-preview", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", - "properties": { - "storageProfile": { - "osDisk": { - "encryptionSettings": { - "enabled": false - } - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "encryptionSettings": { + "enabled": false } + } } - ] + } + } + ] } diff --git a/201-decrypt-running-windows-vm/updateEncryptionSettings-Data.json b/201-decrypt-running-windows-vm/updateEncryptionSettings-Data.json index 10cb4e6c10b9..844154e03d12 100644 --- a/201-decrypt-running-windows-vm/updateEncryptionSettings-Data.json +++ b/201-decrypt-running-windows-vm/updateEncryptionSettings-Data.json @@ -1,27 +1,34 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } }, - "resources": [ - { - "apiVersion": "2016-04-30-preview", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", - "properties": { - "storageProfile": { - "osDisk": { - "encryptionSettings": null - } - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "encryptionSettings": null + } } - ] + } + } + ] } diff --git a/201-decrypt-running-windows-vm/updateEncryptionSettings-OS.json b/201-decrypt-running-windows-vm/updateEncryptionSettings-OS.json index 620bd8bf7412..25d422bcc3c0 100644 --- a/201-decrypt-running-windows-vm/updateEncryptionSettings-OS.json +++ b/201-decrypt-running-windows-vm/updateEncryptionSettings-OS.json @@ -1,29 +1,36 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } }, - "resources": [ - { - "apiVersion": "2016-04-30-preview", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", - "properties": { - "storageProfile": { - "osDisk": { - "encryptionSettings": { - "enabled": false - } - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "encryptionSettings": { + "enabled": false } + } } - ] + } + } + ] } diff --git a/201-dependency-between-scripts-using-extensions/azuredeploy.json b/201-dependency-between-scripts-using-extensions/azuredeploy.json index e98e533b7a86..6ae6fd872a05 100644 --- a/201-dependency-between-scripts-using-extensions/azuredeploy.json +++ b/201-dependency-between-scripts-using-extensions/azuredeploy.json @@ -31,6 +31,13 @@ "metadata": { "description": "Size of VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -56,7 +63,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -65,7 +72,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -77,7 +84,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -98,7 +105,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -124,7 +131,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -168,7 +175,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/configuremongo')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/201-dependency-between-scripts-using-extensions/install-mongo.json b/201-dependency-between-scripts-using-extensions/install-mongo.json index a5a5b71b2b8d..412b75f6b47b 100644 --- a/201-dependency-between-scripts-using-extensions/install-mongo.json +++ b/201-dependency-between-scripts-using-extensions/install-mongo.json @@ -4,6 +4,13 @@ "parameters": { "vmName": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -11,7 +18,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/configuremongo')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", diff --git a/201-discover-private-ip-dynamically/azuredeploy.json b/201-discover-private-ip-dynamically/azuredeploy.json index a9cd38f41d78..2592b0f3d09e 100644 --- a/201-discover-private-ip-dynamically/azuredeploy.json +++ b/201-discover-private-ip-dynamically/azuredeploy.json @@ -79,6 +79,13 @@ "metadata": { "description": "Command to execute on the VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -91,15 +98,14 @@ "subnet1Prefix": "10.0.0.0/24", "subnet1Ref": "[concat(variables('vnetID'),'/subnets/', variables('subnet1Name'))]", "nicName": "myNic", - "vmExtensionName": "myCustomScriptExtension", - "vmStorageAccountContainerName": "vhds" + "vmExtensionName": "myCustomScriptExtension" }, "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -108,17 +114,18 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", - "properties": { - "platformFaultDomainCount": 2, - "platformUpdateDomainCount": 2, - "managed" : "true"} + "location": "[parameters('location')]", + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 2, + "managed": "true" + } }, { "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat('publicIP', copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "foo", "count": "[parameters('scaleNumber')]" @@ -131,7 +138,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -152,7 +159,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), 0)]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', 'publicIP0')]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -178,7 +185,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), 1)]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', 'publicIP1')]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -204,7 +211,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('vmName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "foo", "count": "[parameters('scaleNumber')]" @@ -256,7 +263,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '1/', variables('vmExtensionName'))]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'), '1')]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), '0')]" diff --git a/201-documentdb-webapp/azuredeploy.json b/201-documentdb-webapp/azuredeploy.json index d8f4f2792a5e..a69f010398a0 100644 --- a/201-documentdb-webapp/azuredeploy.json +++ b/201-documentdb-webapp/azuredeploy.json @@ -1,97 +1,110 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "databaseAccountName": { - "type": "string", - "metadata": { - "description": "The Azure Cosmos DB database account name." - } - }, - "appSvcPlanName": { - "type": "string", - "metadata": { - "description": "The name of the App Service Plan that will host the Web App." - } - }, - "svcPlanSize": { - "type": "string", - "defaultValue": "F1", - "metadata": { - "description": "The instance size of the App Service Plan." - } - }, - "svcPlanSku": { - "type": "string", - "allowedValues": [ - "Free", - "Shared", - "Basic", - "Standard", - "Premium" - ], - "defaultValue": "Free", - "metadata": { - "description": "The pricing tier of the App Service plan." - } - }, - "webAppName": { - "type": "string", - "metadata": { - "description": "The name of the Web App." - } - } - }, - "variables": - { - "databaseAccountTier": "Standard" - }, - "resources": [{ - "apiVersion": "2015-04-08", - "type": "Microsoft.DocumentDb/databaseAccounts", - "name": "[parameters('databaseAccountName')]", - "location": "[resourceGroup().location]", - "properties": { - "name": "[parameters('databaseAccountName')]", - "databaseAccountOfferType": "[variables('databaseAccountTier')]", - "locations": [ - { - "locationName": "[resourceGroup().location]", - "failoverPriority": 0 - } - ] - } - }, { - "type": "Microsoft.Web/serverfarms", - "apiVersion": "2015-08-01", - "name": "[parameters('appSvcPlanName')]", - "location": "[resourceGroup().location]", - "sku": { - "name": "[parameters('svcPlanSize')]", - "tier": "[parameters('svcPlanSku')]", - "capacity": 1 - } - }, { - "type": "Microsoft.Web/Sites", - "apiVersion": "2015-08-01", - "name": "[parameters('webAppName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Web/serverFarms/', parameters('appSvcPlanName'))]" - ], - "properties": { - "name": "[parameters('webAppName')]", - "serverFarmId": "[parameters('appSvcPlanName')]", - "siteConfig": { - "phpVersion": "off", - "appSettings": [{ - "Name": "DOCUMENTDB_ENDPOINT", - "Value": "[reference(concat('Microsoft.DocumentDb/databaseAccounts/', parameters('databaseAccountName'))).documentEndpoint]" - }, { - "Name": "DOCUMENTDB_PRIMARY_KEY", - "Value": "[listKeys(resourceId('Microsoft.DocumentDb/databaseAccounts', parameters('databaseAccountName')), '2015-04-08').primaryMasterKey]" - }] - } - } - }] + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "databaseAccountName": { + "type": "string", + "metadata": { + "description": "The Azure Cosmos DB database account name." + } + }, + "appSvcPlanName": { + "type": "string", + "metadata": { + "description": "The name of the App Service Plan that will host the Web App." + } + }, + "svcPlanSize": { + "type": "string", + "defaultValue": "F1", + "metadata": { + "description": "The instance size of the App Service Plan." + } + }, + "svcPlanSku": { + "type": "string", + "allowedValues": [ + "Free", + "Shared", + "Basic", + "Standard", + "Premium" + ], + "defaultValue": "Free", + "metadata": { + "description": "The pricing tier of the App Service plan." + } + }, + "webAppName": { + "type": "string", + "metadata": { + "description": "The name of the Web App." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "databaseAccountTier": "Standard" + }, + "resources": [ + { + "apiVersion": "2015-04-08", + "type": "Microsoft.DocumentDb/databaseAccounts", + "name": "[parameters('databaseAccountName')]", + "location": "[parameters('location')]", + "properties": { + "name": "[parameters('databaseAccountName')]", + "databaseAccountOfferType": "[variables('databaseAccountTier')]", + "locations": [ + { + "locationName": "[parameters('location')]", + "failoverPriority": 0 + } + ] + } + }, + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2015-08-01", + "name": "[parameters('appSvcPlanName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('svcPlanSize')]", + "tier": "[parameters('svcPlanSku')]", + "capacity": 1 + } + }, + { + "type": "Microsoft.Web/Sites", + "apiVersion": "2015-08-01", + "name": "[parameters('webAppName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Web/serverFarms/', parameters('appSvcPlanName'))]" + ], + "properties": { + "name": "[parameters('webAppName')]", + "serverFarmId": "[parameters('appSvcPlanName')]", + "siteConfig": { + "phpVersion": "off", + "appSettings": [ + { + "Name": "DOCUMENTDB_ENDPOINT", + "Value": "[reference(concat('Microsoft.DocumentDb/databaseAccounts/', parameters('databaseAccountName'))).documentEndpoint]" + }, + { + "Name": "DOCUMENTDB_PRIMARY_KEY", + "Value": "[listKeys(resourceId('Microsoft.DocumentDb/databaseAccounts', parameters('databaseAccountName')), '2015-04-08').primaryMasterKey]" + } + ] + } + } + } + ] } diff --git a/201-dsc-linux-azure-storage-on-ubuntu/azuredeploy.json b/201-dsc-linux-azure-storage-on-ubuntu/azuredeploy.json index 5b6642fb9f21..611aa39190b2 100644 --- a/201-dsc-linux-azure-storage-on-ubuntu/azuredeploy.json +++ b/201-dsc-linux-azure-storage-on-ubuntu/azuredeploy.json @@ -100,10 +100,16 @@ "metadata": { "description": "The access key of the Azure Automation account" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "api-version": "2015-05-01-preview", "virtualNetworkName": "vnet-dsc", "nicName": "[parameters('vmName')]", "publicIPAddressName": "[parameters('vmName')]", @@ -124,7 +130,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -133,7 +139,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -145,7 +151,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -166,7 +172,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -192,7 +198,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -235,7 +241,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/enabledsc')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -256,4 +262,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-dsc-linux-public-storage-on-ubuntu/azuredeploy.json b/201-dsc-linux-public-storage-on-ubuntu/azuredeploy.json index 55e6a436874f..63d6aa85c679 100644 --- a/201-dsc-linux-public-storage-on-ubuntu/azuredeploy.json +++ b/201-dsc-linux-public-storage-on-ubuntu/azuredeploy.json @@ -86,10 +86,16 @@ "metadata": { "description": "The access key of the Azure Automation account" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "api-version": "2015-05-01-preview", "virtualNetworkName": "vnet-dsc", "nicName": "[parameters('vmName')]", "publicIPAddressName": "[parameters('vmName')]", @@ -110,7 +116,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -119,7 +125,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -131,7 +137,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -152,7 +158,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -178,7 +184,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -221,7 +227,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/enabledsc')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -240,4 +246,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-dynamic-web-tests/azuredeploy.json b/201-dynamic-web-tests/azuredeploy.json index a8b031e6bb10..571e4758073c 100644 --- a/201-dynamic-web-tests/azuredeploy.json +++ b/201-dynamic-web-tests/azuredeploy.json @@ -19,16 +19,22 @@ "metadata": { "description": "A list of strings representing the email addresses to send alerts to." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "apiVersion": "2015-05-01", "name": "[parameters('appName')]", "type": "microsoft.insights/components", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "AppInsightsApp": "MyApp" }, @@ -45,7 +51,7 @@ "name": "[parameters('tests')[0].name]", "apiVersion": "2015-05-01", "type": "microsoft.insights/webtests", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "[concat('hidden-link:', resourceId('microsoft.insights/components/', parameters('appName')))]": "Resource" }, @@ -70,7 +76,7 @@ "name": "[concat(parameters('tests')[0].name, 'alert')]", "type": "Microsoft.Insights/alertRules", "apiVersion": "2015-04-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "[concat('hidden-link:', resourceId('microsoft.insights/components/', parameters('appName')))]": "Resource", "[concat('hidden-link:', resourceId('microsoft.insights/webtests/', parameters('tests')[0].name))]": "Resource" @@ -107,7 +113,7 @@ "name": "[concat(parameters('tests')[copyIndex(1)].name, 'alert')]", "type": "Microsoft.Insights/alertRules", "apiVersion": "2015-04-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "[concat('hidden-link:', resourceId('microsoft.insights/components/', parameters('appName')))]": "Resource", "[concat('hidden-link:', resourceId('microsoft.insights/webtests/', parameters('tests')[copyIndex(1)].name))]": "Resource" @@ -149,7 +155,7 @@ "name": "[parameters('tests')[copyIndex(1)].name]", "apiVersion": "2015-05-01", "type": "microsoft.insights/webtests", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "[concat('hidden-link:', resourceId('microsoft.insights/components/', parameters('appName')))]": "Resource" }, @@ -177,4 +183,3 @@ } ] } - diff --git a/201-encrypt-create-new-vm-gallery-image-managed-disks/azuredeploy.json b/201-encrypt-create-new-vm-gallery-image-managed-disks/azuredeploy.json index 7561fd014077..c4fade23424d 100644 --- a/201-encrypt-create-new-vm-gallery-image-managed-disks/azuredeploy.json +++ b/201-encrypt-create-new-vm-gallery-image-managed-disks/azuredeploy.json @@ -80,6 +80,13 @@ "metadata": { "description": "URL of the KeyEncryptionKey used to encrypt the volume encryption key" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -91,17 +98,14 @@ "dnsNameForPublicIP": "[toLower(parameters('vmName'))]", "publicIPAddressName": "[toLower(concat('publicIP',parameters('vmName')))]", "publicIPAddressType": "Dynamic", - "nicName": "[toLower(concat('nic',parameters('vmName')))]", - "keyVaultURL": "[concat('https://', parameters('keyVaultName'), '.vault.azure.net/')]", - "keyVaultResourceID": "[concat(subscription().id,'/resourceGroups/',parameters('keyVaultResourceGroup'),'/providers/Microsoft.KeyVault/vaults/', parameters('keyVaultName'))]" + "nicName": "[toLower(concat('nic',parameters('vmName')))]" }, - "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -113,7 +117,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" ], @@ -138,7 +142,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], diff --git a/201-encrypt-create-new-vm-gallery-image/azuredeploy.json b/201-encrypt-create-new-vm-gallery-image/azuredeploy.json index 29455f7d9b8b..18c49f338f24 100644 --- a/201-encrypt-create-new-vm-gallery-image/azuredeploy.json +++ b/201-encrypt-create-new-vm-gallery-image/azuredeploy.json @@ -93,29 +93,32 @@ "metadata": { "description": "URL of the KeyEncryptionKey used to encrypt the volume encryption key" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "imagePublisher": "MicrosoftWindowsServer", "imageOffer": "WindowsServer", "osSku": "2012-R2-Datacenter", - "osDiskName": "[toLower(concat('osDisk',parameters('vmName')))]", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',parameters('subnetName'))]", "dnsNameForPublicIP": "[toLower(parameters('vmName'))]", "publicIPAddressName": "[toLower(concat('publicIP',parameters('vmName')))]", "publicIPAddressType": "Dynamic", - "nicName": "[toLower(concat('nic',parameters('vmName')))]", - "keyVaultURL": "[concat('https://', parameters('keyVaultName'), '.vault.azure.net/')]", - "keyVaultResourceID": "[concat(subscription().id,'/resourceGroups/',parameters('keyVaultResourceGroup'),'/providers/Microsoft.KeyVault/vaults/', parameters('keyVaultName'))]" + "nicName": "[toLower(concat('nic',parameters('vmName')))]" }, - "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -127,7 +130,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" ], @@ -152,7 +155,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -224,4 +227,4 @@ } } ] -} +} \ No newline at end of file diff --git a/201-encrypt-create-pre-encrypted-vm/azuredeploy.json b/201-encrypt-create-pre-encrypted-vm/azuredeploy.json index d6776371eccf..34c2977954a4 100644 --- a/201-encrypt-create-pre-encrypted-vm/azuredeploy.json +++ b/201-encrypt-create-pre-encrypted-vm/azuredeploy.json @@ -1,174 +1,180 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - }, - "existingStorageAccountName": { - "type": "string", - "metadata": { - "description": "Storage account name" - } - }, - "osVhdUri": { - "type": "string", - "metadata": { - "description": "URI of OS vhd. Ex: https://contosostorage.blob.core.windows.net/vhds/windowsvm.vhd" - } - }, - "osType": { - "type": "string", - "defaultValue": "Windows", - "allowedValues": [ - "Windows", - "Linux" - ], - "metadata": { - "description": "OS product type" - } - }, - "virtualNetworkName": { - "type": "string", - "metadata": { - "description": "Virtual network name" - } - }, - "subnetName": { - "type": "string", - "metadata": { - "description": "Subnet name" - } - }, - "vmSize": { - "type": "string", - "defaultValue": "Standard_D2", - "metadata": { - "description": "VM size" - } - }, - "keyVaultResourceID": { - "type": "string", - "metadata": { - "description": "KeyVault resource id. Ex: /subscriptions/subscriptionid/resourceGroups/contosorg/providers/Microsoft.KeyVault/vaults/contosovault" - } - }, - "keyVaultSecretUrl": { - "type": "string", - "metadata": { - "description": "KeyVault secret Url. Ex: https://contosovault.vault.azure.net/secrets/contososecret/e088818e865e48488cf363af16dea596" - } - }, - "useExistingKek": { - "type": "string", - "defaultValue": "nokek", - "allowedValues": [ - "nokek", - "kek" - ], - "metadata": { - "description": "Select kek if the secret is encrypted with a key encryption key and pass explicit keyVaultKekUrl. For nokek, you can keep keyVaultKekUrl empty." - } - }, - "keyVaultKekUrl": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "KeyVault key encryption key Url. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } }, - "variables": { - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',parameters('subnetName'))]", - "dnsNameForPublicIP": "[toLower(parameters('vmName'))]", - "nicName": "[toLower(concat('nic',parameters('vmName')))]", - "publicIPAddressName": "[toLower(concat('publicIP',parameters('vmName')))]", - "publicIPAddressType": "Dynamic", - "setupVmUrl": "[concat('https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-encrypt-create-pre-encrypted-vm/setupvm-',parameters('useExistingKek'),'.json')]" + "existingStorageAccountName": { + "type": "string", + "metadata": { + "description": "Storage account name" + } }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]", - "dnsSettings": { - "domainNameLabel": "[variables('dnsNameForPublicIP')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" - ], + "osVhdUri": { + "type": "string", + "metadata": { + "description": "URI of OS vhd. Ex: https://contosostorage.blob.core.windows.net/vhds/windowsvm.vhd" + } + }, + "osType": { + "type": "string", + "defaultValue": "Windows", + "allowedValues": [ + "Windows", + "Linux" + ], + "metadata": { + "description": "OS product type" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "Virtual network name" + } + }, + "subnetName": { + "type": "string", + "metadata": { + "description": "Subnet name" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D2", + "metadata": { + "description": "VM size" + } + }, + "keyVaultResourceID": { + "type": "string", + "metadata": { + "description": "KeyVault resource id. Ex: /subscriptions/subscriptionid/resourceGroups/contosorg/providers/Microsoft.KeyVault/vaults/contosovault" + } + }, + "keyVaultSecretUrl": { + "type": "string", + "metadata": { + "description": "KeyVault secret Url. Ex: https://contosovault.vault.azure.net/secrets/contososecret/e088818e865e48488cf363af16dea596" + } + }, + "useExistingKek": { + "type": "string", + "defaultValue": "nokek", + "allowedValues": [ + "nokek", + "kek" + ], + "metadata": { + "description": "Select kek if the secret is encrypted with a key encryption key and pass explicit keyVaultKekUrl. For nokek, you can keep keyVaultKekUrl empty." + } + }, + "keyVaultKekUrl": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "KeyVault key encryption key Url. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", + "subnetRef": "[concat(variables('vnetID'),'/subnets/',parameters('subnetName'))]", + "dnsNameForPublicIP": "[toLower(parameters('vmName'))]", + "nicName": "[toLower(concat('nic',parameters('vmName')))]", + "publicIPAddressName": "[toLower(concat('publicIP',parameters('vmName')))]", + "publicIPAddressType": "Dynamic", + "setupVmUrl": "[concat('https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-encrypt-create-pre-encrypted-vm/setupvm-',parameters('useExistingKek'),'.json')]" + }, + "resources": [ + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "[variables('publicIPAddressType')]", + "dnsSettings": { + "domainNameLabel": "[variables('dnsNameForPublicIP')]" + } + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('nicName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ] + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" + }, + "subnet": { + "id": "[variables('subnetRef')]" + } } + } + ] + } + }, + { + "name": "setupvmprofile", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('setupVmUrl')]", + "contentVersion": "1.0.0.0" }, - { - "name": "setupvmprofile", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('setupVmUrl')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "vmName": { - "value": "[parameters('vmName')]" - }, - "existingStorageAccountName": { - "value": "[parameters('existingStorageAccountName')]" - }, - "osVhdUri": { - "value": "[parameters('osVhdUri')]" - }, - "osType": { - "value": "[parameters('osType')]" - }, - "vmSize": { - "value": "[parameters('vmSize')]" - }, - "keyVaultResourceID": { - "value": "[parameters('keyVaultResourceID')]" - }, - "keyVaultSecretUrl": { - "value": "[parameters('keyVaultSecretUrl')]" - }, - "keyVaultKekUrl": { - "value": "[parameters('keyVaultKekUrl')]" - } - } - - } + "parameters": { + "vmName": { + "value": "[parameters('vmName')]" + }, + "existingStorageAccountName": { + "value": "[parameters('existingStorageAccountName')]" + }, + "osVhdUri": { + "value": "[parameters('osVhdUri')]" + }, + "osType": { + "value": "[parameters('osType')]" + }, + "vmSize": { + "value": "[parameters('vmSize')]" + }, + "keyVaultResourceID": { + "value": "[parameters('keyVaultResourceID')]" + }, + "keyVaultSecretUrl": { + "value": "[parameters('keyVaultSecretUrl')]" + }, + "keyVaultKekUrl": { + "value": "[parameters('keyVaultKekUrl')]" + } } - ] + } + } + ] } diff --git a/201-encrypt-create-pre-encrypted-vm/setupvm-kek.json b/201-encrypt-create-pre-encrypted-vm/setupvm-kek.json index 6429dc9ec314..91dac9164911 100644 --- a/201-encrypt-create-pre-encrypted-vm/setupvm-kek.json +++ b/201-encrypt-create-pre-encrypted-vm/setupvm-kek.json @@ -1,115 +1,122 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - }, - "existingStorageAccountName": { - "type": "string", - "metadata": { - "description": "Storage account name" - } - }, - "osVhdUri": { - "type": "string", - "metadata": { - "description": "URI of OS vhd. Ex: https://contosostorage.blob.core.windows.net/vhds/windowsvm.vhd" - } - }, - "osType": { - "type": "string", - "defaultValue": "Windows", - "allowedValues": [ - "Windows", - "Linux" - ], - "metadata": { - "description": "OS product type" - } - }, - "vmSize": { - "type": "string", - "defaultValue": "Standard_D2", - "metadata": { - "description": "VM size" - } - }, - "keyVaultResourceID": { - "type": "string", - "metadata": { - "description": "KeyVault resource id. Ex: /subscriptions/subscriptionid/resourceGroups/contosorg/providers/Microsoft.KeyVault/vaults/contosovault" - } - }, - "keyVaultSecretUrl": { - "type": "string", - "metadata": { - "description": "KeyVault secret Url. Ex: https://contosovault.vault.azure.net/secrets/contososecret/e088818e865e48488cf363af16dea596" - } - }, - "keyVaultKekUrl": { - "type": "string", - "metadata": { - "description": "KeyVault kek Url. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } + }, + "existingStorageAccountName": { + "type": "string", + "metadata": { + "description": "Storage account name" + } + }, + "osVhdUri": { + "type": "string", + "metadata": { + "description": "URI of OS vhd. Ex: https://contosostorage.blob.core.windows.net/vhds/windowsvm.vhd" + } + }, + "osType": { + "type": "string", + "defaultValue": "Windows", + "allowedValues": [ + "Windows", + "Linux" + ], + "metadata": { + "description": "OS product type" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D2", + "metadata": { + "description": "VM size" + } + }, + "keyVaultResourceID": { + "type": "string", + "metadata": { + "description": "KeyVault resource id. Ex: /subscriptions/subscriptionid/resourceGroups/contosorg/providers/Microsoft.KeyVault/vaults/contosovault" + } }, - "variables": { - "storageUri": "[toLower(concat('http://',parameters('existingStorageAccountName'),'.blob.core.windows.net'))]", - "nicName": "[toLower(concat('nic',parameters('vmName')))]" + "keyVaultSecretUrl": { + "type": "string", + "metadata": { + "description": "KeyVault secret Url. Ex: https://contosovault.vault.azure.net/secrets/contososecret/e088818e865e48488cf363af16dea596" + } }, - "resources": [ - { - "apiVersion": "2016-04-30-preview", - "type": "Microsoft.Compute/virtualMachines", + "keyVaultKekUrl": { + "type": "string", + "metadata": { + "description": "KeyVault kek Url. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageUri": "[toLower(concat('http://',parameters('existingStorageAccountName'),'.blob.core.windows.net'))]", + "nicName": "[toLower(concat('nic',parameters('vmName')))]" + }, + "resources": [ + { + "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "storageProfile": { + "osDisk": { "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" - }, - "storageProfile": { - "osDisk": { - "name": "[parameters('vmName')]", - "osType": "[parameters('osType')]", - "vhd": { - "uri": "[parameters('osVhdUri')]" - }, - "caching": "ReadWrite", - "createOption": "Attach", - "encryptionSettings": { - "diskEncryptionKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceID')]" - }, - "secretUrl": "[parameters('keyVaultSecretUrl')]" - }, - "keyEncryptionKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceID')]" - }, - "keyUrl": "[parameters('keyVaultKekUrl')]" - } - } - } + "osType": "[parameters('osType')]", + "vhd": { + "uri": "[parameters('osVhdUri')]" + }, + "caching": "ReadWrite", + "createOption": "Attach", + "encryptionSettings": { + "diskEncryptionKey": { + "sourceVault": { + "id": "[parameters('keyVaultResourceID')]" }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" - } - ] + "secretUrl": "[parameters('keyVaultSecretUrl')]" + }, + "keyEncryptionKey": { + "sourceVault": { + "id": "[parameters('keyVaultResourceID')]" }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[variables('storageUri')]" - } - } + "keyUrl": "[parameters('keyVaultKekUrl')]" + } } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[variables('storageUri')]" + } } - ] -} \ No newline at end of file + } + } + ] +} diff --git a/201-encrypt-create-pre-encrypted-vm/setupvm-nokek.json b/201-encrypt-create-pre-encrypted-vm/setupvm-nokek.json index d2a6c3bfcecd..8f60d249bc53 100644 --- a/201-encrypt-create-pre-encrypted-vm/setupvm-nokek.json +++ b/201-encrypt-create-pre-encrypted-vm/setupvm-nokek.json @@ -1,110 +1,117 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - }, - "existingStorageAccountName": { - "type": "string", - "metadata": { - "description": "Storage account name" - } - }, - "osVhdUri": { - "type": "string", - "metadata": { - "description": "URI of OS vhd. Ex: https://contosostorage.blob.core.windows.net/vhds/windowsvm.vhd" - } - }, - "osType": { - "type": "string", - "defaultValue": "Windows", - "allowedValues": [ - "Windows", - "Linux" - ], - "metadata": { - "description": "OS product type" - } - }, - "vmSize": { - "type": "string", - "defaultValue": "Standard_D2", - "metadata": { - "description": "VM size" - } - }, - "keyVaultResourceID": { - "type": "string", - "metadata": { - "description": "KeyVault resource id. Ex: /subscriptions/subscriptionid/resourceGroups/contosorg/providers/Microsoft.KeyVault/vaults/contosovault" - } - }, - "keyVaultSecretUrl": { - "type": "string", - "metadata": { - "description": "KeyVault secret Url. Ex: https://contosovault.vault.azure.net/secrets/contososecret/e088818e865e48488cf363af16dea596" - } - }, - "keyVaultKekUrl": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "KeyVault secret Url. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } + }, + "existingStorageAccountName": { + "type": "string", + "metadata": { + "description": "Storage account name" + } + }, + "osVhdUri": { + "type": "string", + "metadata": { + "description": "URI of OS vhd. Ex: https://contosostorage.blob.core.windows.net/vhds/windowsvm.vhd" + } + }, + "osType": { + "type": "string", + "defaultValue": "Windows", + "allowedValues": [ + "Windows", + "Linux" + ], + "metadata": { + "description": "OS product type" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D2", + "metadata": { + "description": "VM size" + } + }, + "keyVaultResourceID": { + "type": "string", + "metadata": { + "description": "KeyVault resource id. Ex: /subscriptions/subscriptionid/resourceGroups/contosorg/providers/Microsoft.KeyVault/vaults/contosovault" + } }, - "variables": { - "storageUri": "[toLower(concat('http://',parameters('existingStorageAccountName'),'.blob.core.windows.net'))]", - "nicName": "[toLower(concat('nic',parameters('vmName')))]" + "keyVaultSecretUrl": { + "type": "string", + "metadata": { + "description": "KeyVault secret Url. Ex: https://contosovault.vault.azure.net/secrets/contososecret/e088818e865e48488cf363af16dea596" + } }, - "resources": [ - { - "apiVersion": "2016-04-30-preview", - "type": "Microsoft.Compute/virtualMachines", + "keyVaultKekUrl": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "KeyVault secret Url. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageUri": "[toLower(concat('http://',parameters('existingStorageAccountName'),'.blob.core.windows.net'))]", + "nicName": "[toLower(concat('nic',parameters('vmName')))]" + }, + "resources": [ + { + "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "storageProfile": { + "osDisk": { "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" - }, - "storageProfile": { - "osDisk": { - "name": "[parameters('vmName')]", - "osType": "[parameters('osType')]", - "vhd": { - "uri": "[parameters('osVhdUri')]" - }, - "caching": "ReadWrite", - "createOption": "Attach", - "encryptionSettings": { - "diskEncryptionKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceID')]" - }, - "secretUrl": "[parameters('keyVaultSecretUrl')]" - } - } - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" - } - ] + "osType": "[parameters('osType')]", + "vhd": { + "uri": "[parameters('osVhdUri')]" + }, + "caching": "ReadWrite", + "createOption": "Attach", + "encryptionSettings": { + "diskEncryptionKey": { + "sourceVault": { + "id": "[parameters('keyVaultResourceID')]" }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[variables('storageUri')]" - } - } + "secretUrl": "[parameters('keyVaultSecretUrl')]" + } } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[variables('storageUri')]" + } } - ] -} \ No newline at end of file + } + } + ] +} diff --git a/201-encrypt-running-linux-vm/azuredeploy.json b/201-encrypt-running-linux-vm/azuredeploy.json index d792eb0ef0e5..c15d18bcbc7d 100644 --- a/201-encrypt-running-linux-vm/azuredeploy.json +++ b/201-encrypt-running-linux-vm/azuredeploy.json @@ -1,7 +1,6 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": { "aadClientID": { "metadata": { @@ -23,7 +22,10 @@ "type": "string" }, "encryptionOperation": { - "allowedValues": [ "EnableEncryption", "EnableEncryptionFormat" ], + "allowedValues": [ + "EnableEncryption", + "EnableEncryptionFormat" + ], "defaultValue": "EnableEncryption", "metadata": { "description": "EnableEncryption would encrypt the disks in place and EnableEncryptionFormat would format the disks directly" @@ -31,7 +33,11 @@ "type": "string" }, "volumeType": { - "allowedValues": [ "OS", "Data", "All" ], + "allowedValues": [ + "OS", + "Data", + "All" + ], "defaultValue": "Data", "metadata": { "description": "Defines which drives should be encrypted. OS encryption is supported on RHEL 7.2, CentOS 7.2 & Ubuntu 16.04." @@ -101,6 +107,13 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -116,7 +129,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/', variables('extensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "protectedSettings": { "AADClientSecret": "[parameters('aadClientSecret')]", diff --git a/201-encrypt-running-linux-vm/updatevm-kek.json b/201-encrypt-running-linux-vm/updatevm-kek.json index 4cb94fadf11b..d870e7be7565 100644 --- a/201-encrypt-running-linux-vm/updatevm-kek.json +++ b/201-encrypt-running-linux-vm/updatevm-kek.json @@ -1,59 +1,66 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - }, - "keyVaultResourceID": { - "type": "string", - "metadata": { - "description": "KeyVault resource id. Ex: /subscriptions/9135e259-1f76-4dbd-a5c8-bc4fcdf3cf1c/resourceGroups/DiskEncryptionTest/providers/Microsoft.KeyVault/vaults/DiskEncryptionTestAus" - } - }, - "keyVaultSecretUrl": { - "type": "string", - "metadata": { - "description": "KeyVault secret Url. Ex: https://diskencryptiontestaus.vault.azure.net/secrets/BitLockerEncryptionSecretWithKek/e088818e865e48488cf363af16dea596" - } - }, - "keyEncryptionKeyURL": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "KeyVault key encryption key Url. Ex: https://diskencryptiontestaus.vault.azure.net/keys/DiskEncryptionKek/562a4bb76b524a1493a6afe8e536ee78" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } + }, + "keyVaultResourceID": { + "type": "string", + "metadata": { + "description": "KeyVault resource id. Ex: /subscriptions/9135e259-1f76-4dbd-a5c8-bc4fcdf3cf1c/resourceGroups/DiskEncryptionTest/providers/Microsoft.KeyVault/vaults/DiskEncryptionTestAus" + } + }, + "keyVaultSecretUrl": { + "type": "string", + "metadata": { + "description": "KeyVault secret Url. Ex: https://diskencryptiontestaus.vault.azure.net/secrets/BitLockerEncryptionSecretWithKek/e088818e865e48488cf363af16dea596" + } + }, + "keyEncryptionKeyURL": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "KeyVault key encryption key Url. Ex: https://diskencryptiontestaus.vault.azure.net/keys/DiskEncryptionKek/562a4bb76b524a1493a6afe8e536ee78" + } }, - "resources": [ - { - "apiVersion": "2016-04-30-preview", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", - "properties": { - "storageProfile": { - "osDisk": { - "encryptionSettings": { - "diskEncryptionKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceID')]" - }, - "secretUrl": "[parameters('keyVaultSecretUrl')]" - }, - "keyEncryptionKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceID')]" - }, - "keyUrl": "[parameters('keyEncryptionKeyURL')]" - } - } - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "encryptionSettings": { + "diskEncryptionKey": { + "sourceVault": { + "id": "[parameters('keyVaultResourceID')]" + }, + "secretUrl": "[parameters('keyVaultSecretUrl')]" + }, + "keyEncryptionKey": { + "sourceVault": { + "id": "[parameters('keyVaultResourceID')]" + }, + "keyUrl": "[parameters('keyEncryptionKeyURL')]" + } } + } } - ] + } + } + ] } diff --git a/201-encrypt-running-linux-vm/updatevm-nokek.json b/201-encrypt-running-linux-vm/updatevm-nokek.json index c55361554ba8..c3606f71bad0 100644 --- a/201-encrypt-running-linux-vm/updatevm-nokek.json +++ b/201-encrypt-running-linux-vm/updatevm-nokek.json @@ -1,53 +1,60 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - }, - "keyVaultResourceID": { - "type": "string", - "metadata": { - "description": "KeyVault resource id. Ex: /subscriptions/9135e259-1f76-4dbd-a5c8-bc4fcdf3cf1c/resourceGroups/DiskEncryptionTest/providers/Microsoft.KeyVault/vaults/DiskEncryptionTestAus" - } - }, - "keyVaultSecretUrl": { - "type": "string", - "metadata": { - "description": "KeyVault secret Url. Ex: https://diskencryptiontestaus.vault.azure.net/secrets/BitLockerEncryptionSecretWithKek/e088818e865e48488cf363af16dea596" - } - }, - "keyEncryptionKeyURL": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "KeyVault key encryption key Url. Ex: https://diskencryptiontestaus.vault.azure.net/keys/DiskEncryptionKek/562a4bb76b524a1493a6afe8e536ee78" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } + }, + "keyVaultResourceID": { + "type": "string", + "metadata": { + "description": "KeyVault resource id. Ex: /subscriptions/9135e259-1f76-4dbd-a5c8-bc4fcdf3cf1c/resourceGroups/DiskEncryptionTest/providers/Microsoft.KeyVault/vaults/DiskEncryptionTestAus" + } + }, + "keyVaultSecretUrl": { + "type": "string", + "metadata": { + "description": "KeyVault secret Url. Ex: https://diskencryptiontestaus.vault.azure.net/secrets/BitLockerEncryptionSecretWithKek/e088818e865e48488cf363af16dea596" + } + }, + "keyEncryptionKeyURL": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "KeyVault key encryption key Url. Ex: https://diskencryptiontestaus.vault.azure.net/keys/DiskEncryptionKek/562a4bb76b524a1493a6afe8e536ee78" + } }, - "resources": [ - { - "apiVersion": "2016-04-30-preview", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", - "properties": { - "storageProfile": { - "osDisk": { - "encryptionSettings": { - "diskEncryptionKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceID')]" - }, - "secretUrl": "[parameters('keyVaultSecretUrl')]" - } - } - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "encryptionSettings": { + "diskEncryptionKey": { + "sourceVault": { + "id": "[parameters('keyVaultResourceID')]" + }, + "secretUrl": "[parameters('keyVaultSecretUrl')]" + } } + } } - ] + } + } + ] } diff --git a/201-encrypt-running-windows-vm-aad-client-cert/azuredeploy.json b/201-encrypt-running-windows-vm-aad-client-cert/azuredeploy.json index 0c8985c33367..9bb914fb10fe 100644 --- a/201-encrypt-running-windows-vm-aad-client-cert/azuredeploy.json +++ b/201-encrypt-running-windows-vm-aad-client-cert/azuredeploy.json @@ -63,6 +63,13 @@ "metadata": { "description": "Pass in an unique value like a GUID everytime the operation needs to be force run" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -79,7 +86,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/', variables('extensionName'))]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.Azure.Security", "type": "AzureDiskEncryption", diff --git a/201-encrypt-running-windows-vm-aad-client-cert/updatevm-kek.json b/201-encrypt-running-windows-vm-aad-client-cert/updatevm-kek.json index 4cb94fadf11b..d870e7be7565 100644 --- a/201-encrypt-running-windows-vm-aad-client-cert/updatevm-kek.json +++ b/201-encrypt-running-windows-vm-aad-client-cert/updatevm-kek.json @@ -1,59 +1,66 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - }, - "keyVaultResourceID": { - "type": "string", - "metadata": { - "description": "KeyVault resource id. Ex: /subscriptions/9135e259-1f76-4dbd-a5c8-bc4fcdf3cf1c/resourceGroups/DiskEncryptionTest/providers/Microsoft.KeyVault/vaults/DiskEncryptionTestAus" - } - }, - "keyVaultSecretUrl": { - "type": "string", - "metadata": { - "description": "KeyVault secret Url. Ex: https://diskencryptiontestaus.vault.azure.net/secrets/BitLockerEncryptionSecretWithKek/e088818e865e48488cf363af16dea596" - } - }, - "keyEncryptionKeyURL": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "KeyVault key encryption key Url. Ex: https://diskencryptiontestaus.vault.azure.net/keys/DiskEncryptionKek/562a4bb76b524a1493a6afe8e536ee78" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } + }, + "keyVaultResourceID": { + "type": "string", + "metadata": { + "description": "KeyVault resource id. Ex: /subscriptions/9135e259-1f76-4dbd-a5c8-bc4fcdf3cf1c/resourceGroups/DiskEncryptionTest/providers/Microsoft.KeyVault/vaults/DiskEncryptionTestAus" + } + }, + "keyVaultSecretUrl": { + "type": "string", + "metadata": { + "description": "KeyVault secret Url. Ex: https://diskencryptiontestaus.vault.azure.net/secrets/BitLockerEncryptionSecretWithKek/e088818e865e48488cf363af16dea596" + } + }, + "keyEncryptionKeyURL": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "KeyVault key encryption key Url. Ex: https://diskencryptiontestaus.vault.azure.net/keys/DiskEncryptionKek/562a4bb76b524a1493a6afe8e536ee78" + } }, - "resources": [ - { - "apiVersion": "2016-04-30-preview", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", - "properties": { - "storageProfile": { - "osDisk": { - "encryptionSettings": { - "diskEncryptionKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceID')]" - }, - "secretUrl": "[parameters('keyVaultSecretUrl')]" - }, - "keyEncryptionKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceID')]" - }, - "keyUrl": "[parameters('keyEncryptionKeyURL')]" - } - } - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "encryptionSettings": { + "diskEncryptionKey": { + "sourceVault": { + "id": "[parameters('keyVaultResourceID')]" + }, + "secretUrl": "[parameters('keyVaultSecretUrl')]" + }, + "keyEncryptionKey": { + "sourceVault": { + "id": "[parameters('keyVaultResourceID')]" + }, + "keyUrl": "[parameters('keyEncryptionKeyURL')]" + } } + } } - ] + } + } + ] } diff --git a/201-encrypt-running-windows-vm-aad-client-cert/updatevm-nokek.json b/201-encrypt-running-windows-vm-aad-client-cert/updatevm-nokek.json index c55361554ba8..c3606f71bad0 100644 --- a/201-encrypt-running-windows-vm-aad-client-cert/updatevm-nokek.json +++ b/201-encrypt-running-windows-vm-aad-client-cert/updatevm-nokek.json @@ -1,53 +1,60 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - }, - "keyVaultResourceID": { - "type": "string", - "metadata": { - "description": "KeyVault resource id. Ex: /subscriptions/9135e259-1f76-4dbd-a5c8-bc4fcdf3cf1c/resourceGroups/DiskEncryptionTest/providers/Microsoft.KeyVault/vaults/DiskEncryptionTestAus" - } - }, - "keyVaultSecretUrl": { - "type": "string", - "metadata": { - "description": "KeyVault secret Url. Ex: https://diskencryptiontestaus.vault.azure.net/secrets/BitLockerEncryptionSecretWithKek/e088818e865e48488cf363af16dea596" - } - }, - "keyEncryptionKeyURL": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "KeyVault key encryption key Url. Ex: https://diskencryptiontestaus.vault.azure.net/keys/DiskEncryptionKek/562a4bb76b524a1493a6afe8e536ee78" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } + }, + "keyVaultResourceID": { + "type": "string", + "metadata": { + "description": "KeyVault resource id. Ex: /subscriptions/9135e259-1f76-4dbd-a5c8-bc4fcdf3cf1c/resourceGroups/DiskEncryptionTest/providers/Microsoft.KeyVault/vaults/DiskEncryptionTestAus" + } + }, + "keyVaultSecretUrl": { + "type": "string", + "metadata": { + "description": "KeyVault secret Url. Ex: https://diskencryptiontestaus.vault.azure.net/secrets/BitLockerEncryptionSecretWithKek/e088818e865e48488cf363af16dea596" + } + }, + "keyEncryptionKeyURL": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "KeyVault key encryption key Url. Ex: https://diskencryptiontestaus.vault.azure.net/keys/DiskEncryptionKek/562a4bb76b524a1493a6afe8e536ee78" + } }, - "resources": [ - { - "apiVersion": "2016-04-30-preview", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", - "properties": { - "storageProfile": { - "osDisk": { - "encryptionSettings": { - "diskEncryptionKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceID')]" - }, - "secretUrl": "[parameters('keyVaultSecretUrl')]" - } - } - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "encryptionSettings": { + "diskEncryptionKey": { + "sourceVault": { + "id": "[parameters('keyVaultResourceID')]" + }, + "secretUrl": "[parameters('keyVaultSecretUrl')]" + } } + } } - ] + } + } + ] } diff --git a/201-encrypt-running-windows-vm-without-aad/azuredeploy.json b/201-encrypt-running-windows-vm-without-aad/azuredeploy.json index 068789f20e2d..a533d51cf0fb 100644 --- a/201-encrypt-running-windows-vm-without-aad/azuredeploy.json +++ b/201-encrypt-running-windows-vm-without-aad/azuredeploy.json @@ -47,6 +47,13 @@ "metadata": { "description": "Should the OS partition be resized to occupy full OS VHD before splitting system volume" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -60,7 +67,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/', variables('extensionName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-03-30", "properties": { "publisher": "Microsoft.Azure.Security", @@ -69,15 +76,15 @@ "autoUpgradeMinorVersion": true, "forceUpdateTag": "[parameters('forceUpdateTag')]", "settings": { - "EncryptionOperation": "[variables('encryptionOperation')]", - "KeyVaultURL": "[reference(variables('keyVaultResourceId'),'2016-10-01').vaultUri]", - "KeyVaultResourceId": "[variables('keyVaultResourceID')]", - "KeyEncryptionKeyURL": "[parameters('keyEncryptionKeyURL')]", - "KekVaultResourceId": "[variables('keyVaultResourceID')]", - "KeyEncryptionAlgorithm": "[variables('keyEncryptionAlgorithm')]", - "VolumeType": "[parameters('volumeType')]", - "ResizeOSDisk": "[parameters('resizeOSDisk')]" - } + "EncryptionOperation": "[variables('encryptionOperation')]", + "KeyVaultURL": "[reference(variables('keyVaultResourceId'),'2016-10-01').vaultUri]", + "KeyVaultResourceId": "[variables('keyVaultResourceID')]", + "KeyEncryptionKeyURL": "[parameters('keyEncryptionKeyURL')]", + "KekVaultResourceId": "[variables('keyVaultResourceID')]", + "KeyEncryptionAlgorithm": "[variables('keyEncryptionAlgorithm')]", + "VolumeType": "[parameters('volumeType')]", + "ResizeOSDisk": "[parameters('resizeOSDisk')]" + } } } ] diff --git a/201-encrypt-running-windows-vm-without-aad/prereqs/prereq.azuredeploy.json b/201-encrypt-running-windows-vm-without-aad/prereqs/prereq.azuredeploy.json index b3f53082658e..e68f239aeebf 100644 --- a/201-encrypt-running-windows-vm-without-aad/prereqs/prereq.azuredeploy.json +++ b/201-encrypt-running-windows-vm-without-aad/prereqs/prereq.azuredeploy.json @@ -13,6 +13,13 @@ "metadata": { "description": "Password for the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -27,7 +34,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -48,7 +55,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" ], @@ -70,7 +77,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -117,4 +124,4 @@ "value": "[variables('vmName')]" } } -} \ No newline at end of file +} diff --git a/201-encrypt-running-windows-vm/azuredeploy.json b/201-encrypt-running-windows-vm/azuredeploy.json index a83f854f0f6b..419c22f280b5 100644 --- a/201-encrypt-running-windows-vm/azuredeploy.json +++ b/201-encrypt-running-windows-vm/azuredeploy.json @@ -63,6 +63,13 @@ "metadata": { "description": "Pass in an unique value like a GUID everytime the operation needs to be force run" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -79,7 +86,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/', variables('extensionName'))]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.Azure.Security", "type": "AzureDiskEncryption", diff --git a/201-encrypt-running-windows-vm/updatevm-kek.json b/201-encrypt-running-windows-vm/updatevm-kek.json index 4cb94fadf11b..d870e7be7565 100644 --- a/201-encrypt-running-windows-vm/updatevm-kek.json +++ b/201-encrypt-running-windows-vm/updatevm-kek.json @@ -1,59 +1,66 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - }, - "keyVaultResourceID": { - "type": "string", - "metadata": { - "description": "KeyVault resource id. Ex: /subscriptions/9135e259-1f76-4dbd-a5c8-bc4fcdf3cf1c/resourceGroups/DiskEncryptionTest/providers/Microsoft.KeyVault/vaults/DiskEncryptionTestAus" - } - }, - "keyVaultSecretUrl": { - "type": "string", - "metadata": { - "description": "KeyVault secret Url. Ex: https://diskencryptiontestaus.vault.azure.net/secrets/BitLockerEncryptionSecretWithKek/e088818e865e48488cf363af16dea596" - } - }, - "keyEncryptionKeyURL": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "KeyVault key encryption key Url. Ex: https://diskencryptiontestaus.vault.azure.net/keys/DiskEncryptionKek/562a4bb76b524a1493a6afe8e536ee78" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } + }, + "keyVaultResourceID": { + "type": "string", + "metadata": { + "description": "KeyVault resource id. Ex: /subscriptions/9135e259-1f76-4dbd-a5c8-bc4fcdf3cf1c/resourceGroups/DiskEncryptionTest/providers/Microsoft.KeyVault/vaults/DiskEncryptionTestAus" + } + }, + "keyVaultSecretUrl": { + "type": "string", + "metadata": { + "description": "KeyVault secret Url. Ex: https://diskencryptiontestaus.vault.azure.net/secrets/BitLockerEncryptionSecretWithKek/e088818e865e48488cf363af16dea596" + } + }, + "keyEncryptionKeyURL": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "KeyVault key encryption key Url. Ex: https://diskencryptiontestaus.vault.azure.net/keys/DiskEncryptionKek/562a4bb76b524a1493a6afe8e536ee78" + } }, - "resources": [ - { - "apiVersion": "2016-04-30-preview", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", - "properties": { - "storageProfile": { - "osDisk": { - "encryptionSettings": { - "diskEncryptionKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceID')]" - }, - "secretUrl": "[parameters('keyVaultSecretUrl')]" - }, - "keyEncryptionKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceID')]" - }, - "keyUrl": "[parameters('keyEncryptionKeyURL')]" - } - } - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "encryptionSettings": { + "diskEncryptionKey": { + "sourceVault": { + "id": "[parameters('keyVaultResourceID')]" + }, + "secretUrl": "[parameters('keyVaultSecretUrl')]" + }, + "keyEncryptionKey": { + "sourceVault": { + "id": "[parameters('keyVaultResourceID')]" + }, + "keyUrl": "[parameters('keyEncryptionKeyURL')]" + } } + } } - ] + } + } + ] } diff --git a/201-encrypt-running-windows-vm/updatevm-nokek.json b/201-encrypt-running-windows-vm/updatevm-nokek.json index c55361554ba8..c3606f71bad0 100644 --- a/201-encrypt-running-windows-vm/updatevm-nokek.json +++ b/201-encrypt-running-windows-vm/updatevm-nokek.json @@ -1,53 +1,60 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the Virtual Machine" - } - }, - "keyVaultResourceID": { - "type": "string", - "metadata": { - "description": "KeyVault resource id. Ex: /subscriptions/9135e259-1f76-4dbd-a5c8-bc4fcdf3cf1c/resourceGroups/DiskEncryptionTest/providers/Microsoft.KeyVault/vaults/DiskEncryptionTestAus" - } - }, - "keyVaultSecretUrl": { - "type": "string", - "metadata": { - "description": "KeyVault secret Url. Ex: https://diskencryptiontestaus.vault.azure.net/secrets/BitLockerEncryptionSecretWithKek/e088818e865e48488cf363af16dea596" - } - }, - "keyEncryptionKeyURL": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "KeyVault key encryption key Url. Ex: https://diskencryptiontestaus.vault.azure.net/keys/DiskEncryptionKek/562a4bb76b524a1493a6afe8e536ee78" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Virtual Machine" + } + }, + "keyVaultResourceID": { + "type": "string", + "metadata": { + "description": "KeyVault resource id. Ex: /subscriptions/9135e259-1f76-4dbd-a5c8-bc4fcdf3cf1c/resourceGroups/DiskEncryptionTest/providers/Microsoft.KeyVault/vaults/DiskEncryptionTestAus" + } + }, + "keyVaultSecretUrl": { + "type": "string", + "metadata": { + "description": "KeyVault secret Url. Ex: https://diskencryptiontestaus.vault.azure.net/secrets/BitLockerEncryptionSecretWithKek/e088818e865e48488cf363af16dea596" + } + }, + "keyEncryptionKeyURL": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "KeyVault key encryption key Url. Ex: https://diskencryptiontestaus.vault.azure.net/keys/DiskEncryptionKek/562a4bb76b524a1493a6afe8e536ee78" + } }, - "resources": [ - { - "apiVersion": "2016-04-30-preview", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", - "properties": { - "storageProfile": { - "osDisk": { - "encryptionSettings": { - "diskEncryptionKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceID')]" - }, - "secretUrl": "[parameters('keyVaultSecretUrl')]" - } - } - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "encryptionSettings": { + "diskEncryptionKey": { + "sourceVault": { + "id": "[parameters('keyVaultResourceID')]" + }, + "secretUrl": "[parameters('keyVaultSecretUrl')]" + } } + } } - ] + } + } + ] } diff --git a/201-event-hubs-create-event-hub-and-consumer-group/azuredeploy.json b/201-event-hubs-create-event-hub-and-consumer-group/azuredeploy.json index c685f4537fe2..a4b70ffd5264 100644 --- a/201-event-hubs-create-event-hub-and-consumer-group/azuredeploy.json +++ b/201-event-hubs-create-event-hub-and-consumer-group/azuredeploy.json @@ -42,6 +42,13 @@ "metadata": { "description": "Name of Consumer Group" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -53,7 +60,7 @@ "apiVersion": "2017-04-01", "name": "[parameters('namespaceName')]", "type": "Microsoft.EventHub/Namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[parameters('eventhubSku')]", "tier": "[parameters('eventhubSku')]", @@ -63,7 +70,7 @@ "tag1": "value1", "tag2": "value2" }, - "properties": { }, + "properties": {}, "resources": [ { "apiVersion": "2017-04-01", @@ -72,7 +79,7 @@ "dependsOn": [ "[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'))]" ], - "properties": { }, + "properties": {}, "resources": [ { "apiVersion": "2017-04-01", @@ -100,4 +107,4 @@ "value": "[listkeys(variables('authRuleResourceId'), '2017-04-01').primaryKey]" } } -} \ No newline at end of file +} diff --git a/201-eventhub-create-namespace-geo-recoveryconfiguration/azuredeploy.json b/201-eventhub-create-namespace-geo-recoveryconfiguration/azuredeploy.json index 9c73364305e0..95f2bfc2a5cd 100644 --- a/201-eventhub-create-namespace-geo-recoveryconfiguration/azuredeploy.json +++ b/201-eventhub-create-namespace-geo-recoveryconfiguration/azuredeploy.json @@ -8,41 +8,41 @@ "description": "Name of Event Hub namespace" } }, - "eventHubNamespaceNameSecondary": { + "eventHubNamespaceNameSecondary": { "type": "string", "metadata": { "description": "Name of Event Hub namespace" } }, - "aliasName": { - "type": "string", - "metadata": { - "description": "Name of Geo-Recovery Configuration Alias " - } - }, + "aliasName": { + "type": "string", + "metadata": { + "description": "Name of Geo-Recovery Configuration Alias " + } + }, "eventhubSku": { "type": "string", "allowedValues": [ "Basic", "Standard" ], - "defaultValue": "Standard", + "defaultValue": "Standard", "metadata": { "description": "The messaging tier for Event Hub namespace" } }, - "skuCapacity": { - "type": "int", - "allowedValues": [ - 1, - 2, - 4 - ], - "defaultValue": 1, - "metadata": { - "description": "MessagingUnits for premium namespace" - } - } + "skuCapacity": { + "type": "int", + "allowedValues": [ + 1, + 2, + 4 + ], + "defaultValue": 1, + "metadata": { + "description": "MessagingUnits for premium namespace" + } + } }, "variables": { "defaultSASKeyName": "RootManageSharedAccessKey", @@ -56,38 +56,44 @@ "location": "South Central US", "sku": { "name": "[parameters('eventhubSku')]", - "tier": "[parameters('eventhubSku')]", - "capacity": "[parameters('skuCapacity')]" + "tier": "[parameters('eventhubSku')]", + "capacity": "[parameters('skuCapacity')]" }, - "tags": { + "tags": { "tag1": "value1", "tag2": "value2" } }, - { + { "apiVersion": "2017-04-01", "name": "[parameters('eventHubNamespaceNamePrimary')]", "type": "Microsoft.EventHub/Namespaces", - "dependsOn": ["[concat('Microsoft.EventHub/namespaces/', parameters('eventHubNamespaceNameSecondary'))]" ], + "dependsOn": [ + "[concat('Microsoft.EventHub/namespaces/', parameters('eventHubNamespaceNameSecondary'))]" + ], "location": "North Central US", "sku": { "name": "[parameters('eventhubSku')]", - "tier": "[parameters('eventhubSku')]", - "capacity": "[parameters('skuCapacity')]" + "tier": "[parameters('eventhubSku')]", + "capacity": "[parameters('skuCapacity')]" }, - "tags": { + "tags": { "tag1": "value1", "tag2": "value2" }, - "resources": [{ - "apiVersion": "2017-04-01", - "name": "[parameters('aliasName')]", - "type": "disasterRecoveryConfigs", - "dependsOn": ["[concat('Microsoft.EventHub/namespaces/', parameters('eventHubNamespaceNamePrimary'))]" ], - "properties": { - "partnerNamespace": "[resourceId('Microsoft.EventHub/namespaces', parameters('eventHubNamespaceNameSecondary'))]" - } - }] + "resources": [ + { + "apiVersion": "2017-04-01", + "name": "[parameters('aliasName')]", + "type": "disasterRecoveryConfigs", + "dependsOn": [ + "[concat('Microsoft.EventHub/namespaces/', parameters('eventHubNamespaceNamePrimary'))]" + ], + "properties": { + "partnerNamespace": "[resourceId('Microsoft.EventHub/namespaces', parameters('eventHubNamespaceNameSecondary'))]" + } + } + ] } ], "outputs": { diff --git a/201-eventhubs-create-namespace-and-enable-capture-for-adls/azuredeploy.json b/201-eventhubs-create-namespace-and-enable-capture-for-adls/azuredeploy.json index 30ef1c4962ee..90b85f413603 100644 --- a/201-eventhubs-create-namespace-and-enable-capture-for-adls/azuredeploy.json +++ b/201-eventhubs-create-namespace-and-enable-capture-for-adls/azuredeploy.json @@ -71,7 +71,6 @@ "description": "the size window in bytes for evetn hub capture" } }, - "captureNameFormat": { "type": "string", "defaultValue": "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}", @@ -141,7 +140,6 @@ ] } ], - "outputs": { "NamespaceConnectionString": { "type": "string", @@ -152,4 +150,4 @@ "value": "[listkeys(variables('authRuleResourceId'), '2017-04-01').primaryKey]" } } -} \ No newline at end of file +} diff --git a/201-eventhubs-create-namespace-and-enable-capture/azuredeploy.json b/201-eventhubs-create-namespace-and-enable-capture/azuredeploy.json index eaea7dad30c1..8cc2875b7b8b 100644 --- a/201-eventhubs-create-namespace-and-enable-capture/azuredeploy.json +++ b/201-eventhubs-create-namespace-and-enable-capture/azuredeploy.json @@ -132,6 +132,13 @@ "metadata": { "description": "A Capture Name Format must contain {Namespace}, {EventHub}, {PartitionId}, {Year}, {Month}, {Day}, {Hour}, {Minute} and {Second} fields. These can be arranged in any order with or without delimeters. E.g. Prod_{EventHub}/{Namespace}\\{PartitionId}_{Year}_{Month}/{Day}/{Hour}/{Minute}/{Second}" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -143,7 +150,7 @@ "apiVersion": "2017-04-01", "name": "[parameters('eventHubNamespaceName')]", "type": "Microsoft.EventHub/Namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[parameters('eventhubSku')]", "tier": "[parameters('eventhubSku')]", @@ -183,7 +190,6 @@ } } } - } ] } @@ -198,4 +204,4 @@ "value": "[listkeys(variables('authRuleResourceId'), '2017-04-01').primaryKey]" } } -} \ No newline at end of file +} diff --git a/201-eventhubs-create-namespace-and-enable-inflate/azuredeploy.json b/201-eventhubs-create-namespace-and-enable-inflate/azuredeploy.json index 10a402af9e1f..80dac33b2fd6 100644 --- a/201-eventhubs-create-namespace-and-enable-inflate/azuredeploy.json +++ b/201-eventhubs-create-namespace-and-enable-inflate/azuredeploy.json @@ -51,10 +51,16 @@ "metadata": { "description": "Number of partitions chosen" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", "defaultSASKeyName": "RootManageSharedAccessKey", "authRuleResourceId": "[resourceId('Microsoft.EventHub/namespaces/authorizationRules', parameters('namespaceName'), variables('defaultSASKeyName'))]" }, @@ -63,7 +69,7 @@ "apiVersion": "2017-04-01", "name": "[parameters('namespaceName')]", "type": "Microsoft.EventHub/Namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard", "tier": "Standard" @@ -98,4 +104,4 @@ "value": "[listkeys(variables('authRuleResourceId'), '2017-04-01').primaryKey]" } } -} \ No newline at end of file +} diff --git a/201-existing-vnet-to-vnet-peering/azuredeploy.json b/201-existing-vnet-to-vnet-peering/azuredeploy.json index 83da488200af..708be1da171a 100644 --- a/201-existing-vnet-to-vnet-peering/azuredeploy.json +++ b/201-existing-vnet-to-vnet-peering/azuredeploy.json @@ -19,28 +19,34 @@ "metadata": { "description": "Sets the remote VNet Resource group" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - "remoteVNet": "[resourceId(parameters('existingRemoteVirtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks', parameters('existingRemoteVirtualNetworkName'))]", - "peeringName": "[concat(parameters('existingLocalVirtualNetworkName'), '/peering-to-remote-vnet')]" - }, - "resources": [ - { - "apiVersion": "2016-06-01", - "type": "Microsoft.Network/virtualNetworks/virtualNetworkPeerings", - "name": "[variables('peeringName')]", - "location": "[resourceGroup().location]", - "properties": { - "allowVirtualNetworkAccess": true, - "allowForwardedTraffic": false, - "allowGatewayTransit": false, - "useRemoteGateways": false, - "remoteVirtualNetwork": { - "id": "[variables('remoteVNet')]" - } + "variables": { + "remoteVNet": "[resourceId(parameters('existingRemoteVirtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks', parameters('existingRemoteVirtualNetworkName'))]", + "peeringName": "[concat(parameters('existingLocalVirtualNetworkName'), '/peering-to-remote-vnet')]" + }, + "resources": [ + { + "apiVersion": "2016-06-01", + "type": "Microsoft.Network/virtualNetworks/virtualNetworkPeerings", + "name": "[variables('peeringName')]", + "location": "[parameters('location')]", + "properties": { + "allowVirtualNetworkAccess": true, + "allowForwardedTraffic": false, + "allowGatewayTransit": false, + "useRemoteGateways": false, + "remoteVirtualNetwork": { + "id": "[variables('remoteVNet')]" } } - ] - } - + } + ] +} diff --git a/201-expressroute-circuit-public-private-peering/azuredeploy.json b/201-expressroute-circuit-public-private-peering/azuredeploy.json index 940f229ace58..cae43af0000d 100644 --- a/201-expressroute-circuit-public-private-peering/azuredeploy.json +++ b/201-expressroute-circuit-public-private-peering/azuredeploy.json @@ -1,131 +1,138 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "circuitName": { - "type": "string", - "metadata": { - "description": "This is the name of the ExpressRoute circuit" - } - }, - "serviceProviderName": { - "type": "string", - "metadata": { - "description": "This is the name of the ExpressRoute Service Provider. It must exactly match one of the Service Providers from List ExpressRoute Service Providers API call." - } - }, - "peeringLocation": { - "type": "string", - "metadata": { - "description": "This is the name of the peering location and not the ARM resource location. It must exactly match one of the available peering locations from List ExpressRoute Service Providers API call." - } - }, - "bandwidthInMbps": { - "type": "int", - "metadata": { - "description": "This is the bandwidth in Mbps of the circuit being created. It must exactly match one of the available bandwidth offers List ExpressRoute Service Providers API call." - } - }, - "sku_tier": { - "type": "string", - "defaultValue": "Standard", - "allowedValues": [ - "Standard", - "Premium" - ], - "metadata": { - "description": "Chosen SKU Tier of ExpressRoute circuit. Choose from Premium or Standard SKU tiers." - } - }, - "sku_family": { - "type": "string", - "defaultValue": "MeteredData", - "allowedValues": [ - "MeteredData", - "UnlimitedData" - ], - "metadata": { - "description": "Chosen SKU family of ExpressRoute circuit. Choose from MeteredData or UnlimitedData SKU families." - } - }, - "peeringType": { - "type": "string", - "defaultValue": "AzurePrivatePeering", - "allowedValues": [ - "AzurePrivatePeering", - "AzurePublicPeering", - "MicrosoftPeering" - ], - "metadata": { - "description": "BGP peering type for the Circuit. Choose from AzurePrivatePeering, AzurePublicPeering or MicrosoftPeering." - } - }, - "sharedKey": { - "type": "string", - "metadata": { - "description": "The shared key for peering configuration. Router does MD5 hash comparison to validate the packets sent by BGP connection. This parameter is optional and can be removed from peering configuration if not required." - } - }, - "peerASN": { - "type": "int", - "metadata": { - "description": "The autonomous system number of the customer/connectivity provider." - } - }, - "primaryPeerAddressPrefix": { - "type": "string", - "metadata": { - "description": "/30 subnet used to configure IP addresses for interfaces on Link1." - } - }, - "secondaryPeerAddressPrefix": { - "type": "string", - "metadata": { - "description": "/30 subnet used to configure IP addresses for interfaces on Link2." - } - }, - "vlanId": { - "type": "int", - "metadata": { - "description": "Specifies the identifier that is used to identify the customer." - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "circuitName": { + "type": "string", + "metadata": { + "description": "This is the name of the ExpressRoute circuit" + } }, - "resources": [ - { - "apiVersion": "2015-05-01-preview", - "type": "Microsoft.Network/expressRouteCircuits", - "name": "[parameters('circuitName')]", - "location": "[resourceGroup().location]", - "tags": { - "key1": "value1", - "key2": "value2" - }, - "sku": { - "name": "[concat(parameters('sku_tier'),'_', parameters('sku_family'))]", - "tier": "[parameters('sku_tier')]", - "family": "[parameters('sku_family')]" + "serviceProviderName": { + "type": "string", + "metadata": { + "description": "This is the name of the ExpressRoute Service Provider. It must exactly match one of the Service Providers from List ExpressRoute Service Providers API call." + } + }, + "peeringLocation": { + "type": "string", + "metadata": { + "description": "This is the name of the peering location and not the ARM resource location. It must exactly match one of the available peering locations from List ExpressRoute Service Providers API call." + } + }, + "bandwidthInMbps": { + "type": "int", + "metadata": { + "description": "This is the bandwidth in Mbps of the circuit being created. It must exactly match one of the available bandwidth offers List ExpressRoute Service Providers API call." + } + }, + "sku_tier": { + "type": "string", + "defaultValue": "Standard", + "allowedValues": [ + "Standard", + "Premium" + ], + "metadata": { + "description": "Chosen SKU Tier of ExpressRoute circuit. Choose from Premium or Standard SKU tiers." + } + }, + "sku_family": { + "type": "string", + "defaultValue": "MeteredData", + "allowedValues": [ + "MeteredData", + "UnlimitedData" + ], + "metadata": { + "description": "Chosen SKU family of ExpressRoute circuit. Choose from MeteredData or UnlimitedData SKU families." + } + }, + "peeringType": { + "type": "string", + "defaultValue": "AzurePrivatePeering", + "allowedValues": [ + "AzurePrivatePeering", + "AzurePublicPeering", + "MicrosoftPeering" + ], + "metadata": { + "description": "BGP peering type for the Circuit. Choose from AzurePrivatePeering, AzurePublicPeering or MicrosoftPeering." + } + }, + "sharedKey": { + "type": "string", + "metadata": { + "description": "The shared key for peering configuration. Router does MD5 hash comparison to validate the packets sent by BGP connection. This parameter is optional and can be removed from peering configuration if not required." + } + }, + "peerASN": { + "type": "int", + "metadata": { + "description": "The autonomous system number of the customer/connectivity provider." + } + }, + "primaryPeerAddressPrefix": { + "type": "string", + "metadata": { + "description": "/30 subnet used to configure IP addresses for interfaces on Link1." + } + }, + "secondaryPeerAddressPrefix": { + "type": "string", + "metadata": { + "description": "/30 subnet used to configure IP addresses for interfaces on Link2." + } + }, + "vlanId": { + "type": "int", + "metadata": { + "description": "Specifies the identifier that is used to identify the customer." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2015-05-01-preview", + "type": "Microsoft.Network/expressRouteCircuits", + "name": "[parameters('circuitName')]", + "location": "[parameters('location')]", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "sku": { + "name": "[concat(parameters('sku_tier'),'_', parameters('sku_family'))]", + "tier": "[parameters('sku_tier')]", + "family": "[parameters('sku_family')]" + }, + "properties": { + "serviceProviderProperties": { + "serviceProviderName": "[parameters('serviceProviderName')]", + "peeringLocation": "[parameters('peeringLocation')]", + "bandwidthInMbps": "[parameters('bandwidthInMbps')]" }, - "properties": { - "serviceProviderProperties": { - "serviceProviderName": "[parameters('serviceProviderName')]", - "peeringLocation": "[parameters('peeringLocation')]", - "bandwidthInMbps": "[parameters('bandwidthInMbps')]" - }, - "peerings": [ - { - "name": "[parameters('peeringType')]", - "properties": { - "peeringType": "[parameters('peeringType')]", - "sharedKey": "[parameters('sharedKey')]", - "peerASN": "[parameters('peerASN')]", - "primaryPeerAddressPrefix": "[parameters('primaryPeerAddressPrefix')]", - "secondaryPeerAddressPrefix": "[parameters('secondaryPeerAddressPrefix')]", - "vlanId": "[parameters('vlanId')]" - } + "peerings": [ + { + "name": "[parameters('peeringType')]", + "properties": { + "peeringType": "[parameters('peeringType')]", + "sharedKey": "[parameters('sharedKey')]", + "peerASN": "[parameters('peerASN')]", + "primaryPeerAddressPrefix": "[parameters('primaryPeerAddressPrefix')]", + "secondaryPeerAddressPrefix": "[parameters('secondaryPeerAddressPrefix')]", + "vlanId": "[parameters('vlanId')]" } - ] - } + } + ] } - ] + } + ] } diff --git a/201-extend-vnet-to-multi-vnet/prereqs/prereq.azuredeploy.json b/201-extend-vnet-to-multi-vnet/prereqs/prereq.azuredeploy.json index f53670f1c870..ca799dde8c6c 100644 --- a/201-extend-vnet-to-multi-vnet/prereqs/prereq.azuredeploy.json +++ b/201-extend-vnet-to-multi-vnet/prereqs/prereq.azuredeploy.json @@ -1,50 +1,61 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "firstVNETName": "vnet01" - }, - "resources": [{ - "name": "[variables('firstVNETName')]", - "type": "Microsoft.Network/virtualNetworks", - "location": "West US", - "apiVersion": "2015-06-15", - "dependsOn": [], - "tags": { - "displayName": "firstVNET" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "firstVNETName": "vnet01" + }, + "resources": [ + { + "name": "[variables('firstVNETName')]", + "type": "Microsoft.Network/virtualNetworks", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [], + "tags": { + "displayName": "firstVNET" + }, + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "FE-Subnet", - "properties": { - "addressPrefix": "10.0.0.0/24" - } - }, - { - "name": "BE-Subnet", - "properties": { - "addressPrefix": "10.0.1.0/24" - } - }, - { - "name": "GatewaySubnet", - "properties": { - "addressPrefix": "10.0.254.0/29" - } - } - ] - } - }], - "outputs": { - "existingVnetName": { - "type": "string", - "value": "[variables('firstVNETName')]" - } + "subnets": [ + { + "name": "FE-Subnet", + "properties": { + "addressPrefix": "10.0.0.0/24" + } + }, + { + "name": "BE-Subnet", + "properties": { + "addressPrefix": "10.0.1.0/24" + } + }, + { + "name": "GatewaySubnet", + "properties": { + "addressPrefix": "10.0.254.0/29" + } + } + ] + } + } + ], + "outputs": { + "existingVnetName": { + "type": "string", + "value": "[variables('firstVNETName')]" } + } } diff --git a/201-function-app-dedicated-github-deploy/azuredeploy.json b/201-function-app-dedicated-github-deploy/azuredeploy.json index f1cb3d2ee5b3..9600d5c3a2a9 100644 --- a/201-function-app-dedicated-github-deploy/azuredeploy.json +++ b/201-function-app-dedicated-github-deploy/azuredeploy.json @@ -1,137 +1,154 @@ { - "$schema": "http://schemas.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "appName": { - "type": "string", - "metadata": { - "description": "The name of the function app that you wish to create." - } - }, - "sku": { - "type": "string", - "allowedValues": [ - "Free", - "Shared", - "Basic", - "Standard" - ], - "defaultValue": "Standard", - "metadata": { - "description": "The pricing tier for the hosting plan." - } - }, - "workerSize": { - "type": "string", - "allowedValues": [ - "0", - "1", - "2" - ], - "defaultValue": "0", - "metadata": { - "description": "The instance size of the hosting plan (small, medium, or large)." - } - }, - "storageAccountType": { - "type": "string", - "defaultValue": "Standard_LRS", - "allowedValues": [ - "Standard_LRS", - "Standard_GRS", - "Standard_ZRS", - "Premium_LRS" - ], - "metadata": { - "description": "Storage Account type" - } - }, - "repoURL": { - "type": "string", - "defaultValue": "https://github.com/AzureBytes/functionshttpecho.git", - "metadata": { - "description": "The URL for the GitHub repository that contains the project to deploy." - } - }, - "branch": { - "type": "string", - "defaultValue": "master", - "metadata": { - "description": "The branch of the GitHub repository to use." - } - } - }, - "variables": { - "functionAppName": "[parameters('appName')]", - "hostingPlanName": "[concat(parameters('appName'), '-plan')]", - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'functions')]" - }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": { - "accountType": "[parameters('storageAccountType')]" - } - }, { - "type": "Microsoft.Web/serverfarms", - "apiVersion": "2015-04-01", - "name": "[variables('hostingPlanName')]", - "location": "[resourceGroup().location]", - "properties": { - "name": "[variables('hostingPlanName')]", - "sku": "[parameters('sku')]", - "workerSize": "[parameters('workerSize')]", - "hostingEnvironment": "", - "numberOfWorkers": 1 - } - }, { - "apiVersion": "2015-08-01", - "type": "Microsoft.Web/sites", - "name": "[variables('functionAppName')]", - "location": "[resourceGroup().location]", - "kind": "functionapp", - "properties": { - "name": "[variables('functionAppName')]", - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", - "hostingEnvironment": "", - "clientAffinityEnabled": false, - "siteConfig": { - "alwaysOn": true, - "cors": { - "allowedOrigins": [ - "*" - ] - }, - "appSettings": [{ - "name": "FUNCTIONS_EXTENSION_VERSION", - "value": "~1" - }, { - "name": "AzureWebJobsStorage", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listkeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2015-05-01-preview').key1,';')]" - }, { - "name": "AzureWebJobsDashboard", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listkeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2015-05-01-preview').key1,';')]" - }] - } - }, - "dependsOn": [ - "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", - "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" - ], - "resources": [{ - "apiVersion": "2015-08-01", - "name": "web", - "type": "sourcecontrols", - "dependsOn": [ - "[resourceId('Microsoft.Web/Sites', variables('functionAppName'))]" - ], - "properties": { - "RepoUrl": "[parameters('repoURL')]", - "branch": "[parameters('branch')]", - "IsManualIntegration": true - } - }] - }] + "$schema": "http://schemas.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "appName": { + "type": "string", + "metadata": { + "description": "The name of the function app that you wish to create." + } + }, + "sku": { + "type": "string", + "allowedValues": [ + "Free", + "Shared", + "Basic", + "Standard" + ], + "defaultValue": "Standard", + "metadata": { + "description": "The pricing tier for the hosting plan." + } + }, + "workerSize": { + "type": "string", + "allowedValues": [ + "0", + "1", + "2" + ], + "defaultValue": "0", + "metadata": { + "description": "The instance size of the hosting plan (small, medium, or large)." + } + }, + "storageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_ZRS", + "Premium_LRS" + ], + "metadata": { + "description": "Storage Account type" + } + }, + "repoURL": { + "type": "string", + "defaultValue": "https://github.com/AzureBytes/functionshttpecho.git", + "metadata": { + "description": "The URL for the GitHub repository that contains the project to deploy." + } + }, + "branch": { + "type": "string", + "defaultValue": "master", + "metadata": { + "description": "The branch of the GitHub repository to use." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "functionAppName": "[parameters('appName')]", + "hostingPlanName": "[concat(parameters('appName'), '-plan')]", + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'functions')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "accountType": "[parameters('storageAccountType')]" + } + }, + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2015-04-01", + "name": "[variables('hostingPlanName')]", + "location": "[parameters('location')]", + "properties": { + "name": "[variables('hostingPlanName')]", + "sku": "[parameters('sku')]", + "workerSize": "[parameters('workerSize')]", + "hostingEnvironment": "", + "numberOfWorkers": 1 + } + }, + { + "apiVersion": "2015-08-01", + "type": "Microsoft.Web/sites", + "name": "[variables('functionAppName')]", + "location": "[parameters('location')]", + "kind": "functionapp", + "properties": { + "name": "[variables('functionAppName')]", + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", + "hostingEnvironment": "", + "clientAffinityEnabled": false, + "siteConfig": { + "alwaysOn": true, + "cors": { + "allowedOrigins": [ + "*" + ] + }, + "appSettings": [ + { + "name": "FUNCTIONS_EXTENSION_VERSION", + "value": "~1" + }, + { + "name": "AzureWebJobsStorage", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listkeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2015-05-01-preview').key1,';')]" + }, + { + "name": "AzureWebJobsDashboard", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listkeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2015-05-01-preview').key1,';')]" + } + ] + } + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" + ], + "resources": [ + { + "apiVersion": "2015-08-01", + "name": "web", + "type": "sourcecontrols", + "dependsOn": [ + "[resourceId('Microsoft.Web/Sites', variables('functionAppName'))]" + ], + "properties": { + "RepoUrl": "[parameters('repoURL')]", + "branch": "[parameters('branch')]", + "IsManualIntegration": true + } + } + ] + } + ] } diff --git a/201-hdinsight-datalake-store-azure-storage/azuredeploy.json b/201-hdinsight-datalake-store-azure-storage/azuredeploy.json index f0612fbabfbc..6dc26fea05e3 100644 --- a/201-hdinsight-datalake-store-azure-storage/azuredeploy.json +++ b/201-hdinsight-datalake-store-azure-storage/azuredeploy.json @@ -95,9 +95,7 @@ } }, "variables": { - "defaultApiVersion": "2015-06-15", - "clusterApiVersion": "2015-03-01-preview", - "adlsApiVersion": "2015-10-01-preview" + "defaultApiVersion": "2015-06-15" }, "resources": [ { @@ -209,4 +207,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } } -} \ No newline at end of file +} diff --git a/201-insights-alertrules-servicehealth/azuredeploy.json b/201-insights-alertrules-servicehealth/azuredeploy.json index 048b81d512a7..c7baa863e8f1 100644 --- a/201-insights-alertrules-servicehealth/azuredeploy.json +++ b/201-insights-alertrules-servicehealth/azuredeploy.json @@ -1,79 +1,88 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "alertName": { - "type": "string", - "metadata": { - "description": "Name of alert" - } - }, - "alertDescription": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Description of alert" - } - }, - "status": { - "type": "string", - "defaultValue": "", - "allowedValues": [ - "Active", - "InProgress", - "Resolved" - ], - "metadata": { - "description": "Description of alert" - } - }, - "isEnabled": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Specifies whether alerts are enabled" - } - }, - "sendToServiceOwners": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Specifies whether alerts are sent to service owners" - } - }, - "customEmailAddresses": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Comma-delimited email addresses where the alerts are also sent" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "alertName": { + "type": "string", + "metadata": { + "description": "Name of alert" + } }, - "variables": { - "customEmails": "[split(parameters('customEmailAddresses'), ',')]" + "alertDescription": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Description of alert" + } }, - "resources": [{ - "type": "Microsoft.Insights/alertRules", + "status": { + "type": "string", + "defaultValue": "", + "allowedValues": [ + "Active", + "InProgress", + "Resolved" + ], + "metadata": { + "description": "Description of alert" + } + }, + "isEnabled": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Specifies whether alerts are enabled" + } + }, + "sendToServiceOwners": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Specifies whether alerts are sent to service owners" + } + }, + "customEmailAddresses": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Comma-delimited email addresses where the alerts are also sent" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "customEmails": "[split(parameters('customEmailAddresses'), ',')]" + }, + "resources": [ + { + "type": "Microsoft.Insights/alertRules", + "name": "[parameters('alertName')]", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01", + "properties": { "name": "[parameters('alertName')]", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01", - "properties": { - "name": "[parameters('alertName')]", - "description": "[parameters('alertDescription')]", - "isEnabled": "[parameters('isEnabled')]", - "condition": { - "odata.type": "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition", - "dataSource": { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource", - "resourceProviderName": "Azure.Health", - "status": "[parameters('status')]" - } - }, - "action": { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", - "sendToServiceOwners": "[parameters('sendToServiceOwners')]", - "customEmails": "[variables('customEmails')]" - } + "description": "[parameters('alertDescription')]", + "isEnabled": "[parameters('isEnabled')]", + "condition": { + "odata.type": "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition", + "dataSource": { + "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource", + "resourceProviderName": "Azure.Health", + "status": "[parameters('status')]" + } + }, + "action": { + "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", + "sendToServiceOwners": "[parameters('sendToServiceOwners')]", + "customEmails": "[variables('customEmails')]" } - }] -} \ No newline at end of file + } + } + ] +} diff --git a/201-jenkins-acr/azuredeploy.json b/201-jenkins-acr/azuredeploy.json index e8f670b10a4c..af889d0f3ffd 100644 --- a/201-jenkins-acr/azuredeploy.json +++ b/201-jenkins-acr/azuredeploy.json @@ -38,13 +38,19 @@ "description": "URL to a public git repository that includes a Dockerfile." }, "defaultValue": "https://github.com/azure-devops/spin-kub-demo.git" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "resourcePrefix": "jenkins", "acrStorageAccountName": "[concat('registry', uniqueString(resourceGroup().id))]", "acrName": "[uniqueString(resourceGroup().id)]", - "OSDiskName": "[concat(variables('resourcePrefix'), 'OSDisk')]", "nicName": "[concat(variables('resourcePrefix'), 'VMNic')]", "subnetName": "[concat(variables('resourcePrefix'), 'Subnet')]", "publicIPAddressName": "[concat(variables('resourcePrefix'), 'PublicIP')]", @@ -61,7 +67,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('acrStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, @@ -80,7 +86,7 @@ { "name": "[variables('acrName')]", "type": "Microsoft.ContainerRegistry/registries", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-03-01", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('acrStorageAccountName'))]" @@ -100,7 +106,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -112,7 +118,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NSG - Front End" }, @@ -153,7 +159,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -180,7 +186,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" @@ -206,7 +212,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]", "[resourceId('Microsoft.ContainerRegistry/registries', variables('acrName'))]" @@ -231,7 +237,7 @@ "name": "osdisk", "caching": "ReadWrite", "createOption": "FromImage", - "managedDisk":{ + "managedDisk": { "storageAccountType": "Standard_LRS" } } @@ -249,7 +255,7 @@ "type": "extensions", "name": "[variables('vmExtensionName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" ], diff --git a/201-key-vault-secret-create/azuredeploy.json b/201-key-vault-secret-create/azuredeploy.json index e8e4f959d378..99c3090b14f6 100644 --- a/201-key-vault-secret-create/azuredeploy.json +++ b/201-key-vault-secret-create/azuredeploy.json @@ -1,101 +1,108 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "keyVaultName": { - "type": "string", - "metadata": { - "description": "Name of the Key Vault" - } - }, - "tenantId": { - "type": "string", - "metadata": { - "description": "Tenant Id for the subscription and use assigned access to the vault. Available from the Get-AzureRMSubscription PowerShell cmdlet" - } - }, - "accessPolicies": { - "type": "array", - "defaultValue": "{}", - "metadata": { - "description": "Access policies object {\"tenantId\":\"\",\"objectId\":\"\",\"permissions\":{\"keys\":[\"\"],\"secrets\":[\"\"]}}" - } - }, - "vaultSku": { - "type": "string", - "defaultValue": "Standard", - "allowedValues": [ - "Standard", - "Premium" - ], - "metadata": { - "description": "SKU for the vault" - } - }, - "enabledForDeployment": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Specifies if the vault is enabled for VM or Service Fabric deployment" - } - }, - "enabledForTemplateDeployment": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Specifies if the vault is enabled for ARM template deployment" - } - }, - "enableVaultForVolumeEncryption": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Specifies if the vault is enabled for volume encryption" - } - }, - "secretsObject": { - "type": "secureObject", - "defaultValue": "{}", - "metadata": { - "description": "all secrets {\"secretName\":\"\",\"secretValue\":\"\"} wrapped in a secure object" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "keyVaultName": { + "type": "string", + "metadata": { + "description": "Name of the Key Vault" + } + }, + "tenantId": { + "type": "string", + "metadata": { + "description": "Tenant Id for the subscription and use assigned access to the vault. Available from the Get-AzureRMSubscription PowerShell cmdlet" + } + }, + "accessPolicies": { + "type": "array", + "defaultValue": "{}", + "metadata": { + "description": "Access policies object {\"tenantId\":\"\",\"objectId\":\"\",\"permissions\":{\"keys\":[\"\"],\"secrets\":[\"\"]}}" + } + }, + "vaultSku": { + "type": "string", + "defaultValue": "Standard", + "allowedValues": [ + "Standard", + "Premium" + ], + "metadata": { + "description": "SKU for the vault" + } + }, + "enabledForDeployment": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies if the vault is enabled for VM or Service Fabric deployment" + } }, - "resources": [ - { - "type": "Microsoft.KeyVault/vaults", - "name": "[parameters('keyVaultName')]", - "apiVersion": "2015-06-01", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "KeyVault" - }, - "properties": { - "enabledForDeployment": "[parameters('enabledForDeployment')]", - "enabledForTemplateDeployment": "[parameters('enabledForTemplateDeployment')]", - "enabledForVolumeEncryption": "[parameters('enableVaultForVolumeEncryption')]", - "tenantId": "[parameters('tenantId')]", - "accessPolicies": "[parameters('accessPolicies')]", - "sku": { - "name": "[parameters('vaultSku')]", - "family": "A" - } - } - }, - { - "type": "Microsoft.KeyVault/vaults/secrets", - "name": "[concat(parameters('keyVaultName'), '/', parameters('secretsObject').secrets[copyIndex()].secretName)]", - "apiVersion": "2015-06-01", - "properties": { - "value": "[parameters('secretsObject').secrets[copyIndex()].secretValue]" - }, - "dependsOn": [ - "[concat('Microsoft.KeyVault/vaults/', parameters('keyVaultName'))]" - ], - "copy": { - "name": "secretsCopy", - "count": "[length(parameters('secretsObject').secrets)]" - } + "enabledForTemplateDeployment": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies if the vault is enabled for ARM template deployment" + } + }, + "enableVaultForVolumeEncryption": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies if the vault is enabled for volume encryption" + } + }, + "secretsObject": { + "type": "secureObject", + "defaultValue": "{}", + "metadata": { + "description": "all secrets {\"secretName\":\"\",\"secretValue\":\"\"} wrapped in a secure object" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.KeyVault/vaults", + "name": "[parameters('keyVaultName')]", + "apiVersion": "2015-06-01", + "location": "[parameters('location')]", + "tags": { + "displayName": "KeyVault" + }, + "properties": { + "enabledForDeployment": "[parameters('enabledForDeployment')]", + "enabledForTemplateDeployment": "[parameters('enabledForTemplateDeployment')]", + "enabledForVolumeEncryption": "[parameters('enableVaultForVolumeEncryption')]", + "tenantId": "[parameters('tenantId')]", + "accessPolicies": "[parameters('accessPolicies')]", + "sku": { + "name": "[parameters('vaultSku')]", + "family": "A" } - ] -} \ No newline at end of file + } + }, + { + "type": "Microsoft.KeyVault/vaults/secrets", + "name": "[concat(parameters('keyVaultName'), '/', parameters('secretsObject').secrets[copyIndex()].secretName)]", + "apiVersion": "2015-06-01", + "properties": { + "value": "[parameters('secretsObject').secrets[copyIndex()].secretValue]" + }, + "dependsOn": [ + "[concat('Microsoft.KeyVault/vaults/', parameters('keyVaultName'))]" + ], + "copy": { + "name": "secretsCopy", + "count": "[length(parameters('secretsObject').secrets)]" + } + } + ] +} diff --git a/201-key-vault-with-logging-create/azuredeploy.json b/201-key-vault-with-logging-create/azuredeploy.json index a4a91d4a7801..b73c0471a580 100644 --- a/201-key-vault-with-logging-create/azuredeploy.json +++ b/201-key-vault-with-logging-create/azuredeploy.json @@ -1,175 +1,182 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "keyVaultName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "KeyVault name" - } - }, - "accessPolicies": { - "type": "array", - "defaultValue": "{}", - "metadata": { - "description": "Access policies object {\"tenantId\":\"\",\"objectId\":\"\",\"permissions\":{\"keys\":[\"\"],\"secrets\":[\"\"]}}" - } - }, - "logsRetentionInDays": { - "type": "int", - "defaultValue": 0, - "minValue": 0, - "maxValue": 365, - "metadata": { - "description": "Specifies the number of days that logs are gonna be kept. If you do not want to apply any retention policy and retain data forever, set value to 0." - } - }, - "enableVaultForDeployment": { - "type": "bool", - "defaultValue": false, - "allowedValues": [ - true, - false - ], - "metadata": { - "description": "Specifies if the vault is enabled for deployment by script or compute (VM, Service Fabric, ...)" - } - }, - "enableVaultForTemplateDeployment": { - "type": "bool", - "defaultValue": false, - "allowedValues": [ - true, - false - ], - "metadata": { - "description": "Specifies if the vault is enabled for a template deployment" - } - }, - "enableVaultForDiskEncryption": { - "type": "bool", - "defaultValue": false, - "allowedValues": [ - true, - false - ], - "metadata": { - "description": "Specifies if the azure platform has access to the vault for enabling disk encryption scenarios." - } - }, - "vaultSku": { - "type": "string", - "defaultValue": "Standard", - "allowedValues": [ - "Standard", - "Premium" - ], - "metadata": { - "description": "Specifies the SKU for the vault" - } - }, - "protectWithLocks": { - "type": "string", - "allowedValues": [ - "enabled", - "disabled" - ], - "defaultValue": "disabled" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "keyVaultName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "KeyVault name" + } }, - "variables": { - "template": { - "base": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-key-vault-with-logging-create/", - "protectWithLocks": "[concat('nestedtemplates/protectwithlocks', parameters('protectWithLocks'), '.json')]" - }, - "uniqueString": "[uniqueString(subscription().id, resourceGroup().id)]", - "diagnosticStorageAccountName": "[toLower( substring( replace( concat( parameters('keyVaultName'), variables('uniqueString'), variables('uniqueString') ), '-', ''), 0, 23) )]" + "accessPolicies": { + "type": "array", + "defaultValue": "{}", + "metadata": { + "description": "Access policies object {\"tenantId\":\"\",\"objectId\":\"\",\"permissions\":{\"keys\":[\"\"],\"secrets\":[\"\"]}}" + } + }, + "logsRetentionInDays": { + "type": "int", + "defaultValue": 0, + "minValue": 0, + "maxValue": 365, + "metadata": { + "description": "Specifies the number of days that logs are gonna be kept. If you do not want to apply any retention policy and retain data forever, set value to 0." + } + }, + "enableVaultForDeployment": { + "type": "bool", + "defaultValue": false, + "allowedValues": [ + true, + false + ], + "metadata": { + "description": "Specifies if the vault is enabled for deployment by script or compute (VM, Service Fabric, ...)" + } + }, + "enableVaultForTemplateDeployment": { + "type": "bool", + "defaultValue": false, + "allowedValues": [ + true, + false + ], + "metadata": { + "description": "Specifies if the vault is enabled for a template deployment" + } + }, + "enableVaultForDiskEncryption": { + "type": "bool", + "defaultValue": false, + "allowedValues": [ + true, + false + ], + "metadata": { + "description": "Specifies if the azure platform has access to the vault for enabling disk encryption scenarios." + } }, - "resources": [ + "vaultSku": { + "type": "string", + "defaultValue": "Standard", + "allowedValues": [ + "Standard", + "Premium" + ], + "metadata": { + "description": "Specifies the SKU for the vault" + } + }, + "protectWithLocks": { + "type": "string", + "allowedValues": [ + "enabled", + "disabled" + ], + "defaultValue": "disabled" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "template": { + "base": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-key-vault-with-logging-create/", + "protectWithLocks": "[concat('nestedtemplates/protectwithlocks', parameters('protectWithLocks'), '.json')]" + }, + "uniqueString": "[uniqueString(subscription().id, resourceGroup().id)]", + "diagnosticStorageAccountName": "[toLower( substring( replace( concat( parameters('keyVaultName'), variables('uniqueString'), variables('uniqueString') ), '-', ''), 0, 23) )]" + }, + "resources": [ + { + "type": "Microsoft.KeyVault/vaults", + "name": "[parameters('keyVaultName')]", + "apiVersion": "2016-10-01", + "location": "[parameters('location')]", + "tags": { + "displayName": "Key Vault with logging" + }, + "properties": { + "enabledForDeployment": "[parameters('enableVaultForDeployment')]", + "enabledForTemplateDeployment": "[parameters('enableVaultForTemplateDeployment')]", + "enabledForDiskEncryption": "[parameters('enableVaultForDiskEncryption')]", + "tenantId": "[subscription().tenantId]", + "accessPolicies": "[parameters('AccessPolicies')]", + "sku": { + "name": "[parameters('vaultSku')]", + "family": "A" + } + }, + "resources": [ { - "type": "Microsoft.KeyVault/vaults", - "name": "[parameters('keyVaultName')]", - "apiVersion": "2016-10-01", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "Key Vault with logging" - }, - "properties": { - "enabledForDeployment": "[parameters('enableVaultForDeployment')]", - "enabledForTemplateDeployment": "[parameters('enableVaultForTemplateDeployment')]", - "enabledForDiskEncryption": "[parameters('enableVaultForDiskEncryption')]", - "tenantId": "[subscription().tenantId]", - "accessPolicies": "[parameters('AccessPolicies')]", - "sku": { - "name": "[parameters('vaultSku')]", - "family": "A" - } - }, - "resources": [ - { - "type": "Microsoft.KeyVault/vaults/providers/diagnosticsettings", - "name": "[concat(parameters('keyVaultName'), '/Microsoft.Insights/service')]", - "apiVersion": "2016-09-01", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.KeyVault/vaults/', parameters('keyVaultName'))]", - "[concat('Microsoft.Storage/storageAccounts/', variables('diagnosticStorageAccountName'))]" - ], - "properties": { - "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', variables('diagnosticStorageAccountName'))]", - "logs": [ - { - "category": "AuditEvent", - "enabled": true, - "retentionPolicy": { - "enabled": true, - "days": "[parameters('LogsRetentionInDays')]" - } - } - ] - } + "type": "Microsoft.KeyVault/vaults/providers/diagnosticsettings", + "name": "[concat(parameters('keyVaultName'), '/Microsoft.Insights/service')]", + "apiVersion": "2016-09-01", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.KeyVault/vaults/', parameters('keyVaultName'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('diagnosticStorageAccountName'))]" + ], + "properties": { + "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', variables('diagnosticStorageAccountName'))]", + "logs": [ + { + "category": "AuditEvent", + "enabled": true, + "retentionPolicy": { + "enabled": true, + "days": "[parameters('LogsRetentionInDays')]" } + } ] + } + } + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('diagnosticStorageAccountName')]", + "apiVersion": "2016-12-01", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "tags": { + "displayName": "concat('Key Vault ', parameters('keyVaultName'), ' diagnostics storage account')" + }, + "properties": {} + }, + { + "type": "Microsoft.Resources/deployments", + "name": "protectWithLocks", + "apiVersion": "2016-09-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('template').base, variables('template').protectWithLocks)]", + "contentVersion": "1.0.0.0" }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('diagnosticStorageAccountName')]", - "apiVersion": "2016-12-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "tags": { - "displayName": "concat('Key Vault ', parameters('keyVaultName'), ' diagnostics storage account')" - }, - "properties": {} - }, - { - "type": "Microsoft.Resources/deployments", - "name": "protectWithLocks", - "apiVersion": "2016-09-01", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(variables('template').base, variables('template').protectWithLocks)]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "keyVaultName": { - "value": "[parameters('keyVaultName')]" - }, - "diagnosticStorageAccountName": { - "value": "[variables('diagnosticStorageAccountName')]" - } - } - }, - "dependsOn": [ - "[concat('Microsoft.KeyVault/vaults/', parameters('keyVaultName'))]", - "[concat('Microsoft.Storage/storageAccounts/', variables('diagnosticStorageAccountName'))]" - ] + "parameters": { + "keyVaultName": { + "value": "[parameters('keyVaultName')]" + }, + "diagnosticStorageAccountName": { + "value": "[variables('diagnosticStorageAccountName')]" + } } - ], - "outputs": {} + }, + "dependsOn": [ + "[concat('Microsoft.KeyVault/vaults/', parameters('keyVaultName'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('diagnosticStorageAccountName'))]" + ] + } + ], + "outputs": {} } diff --git a/201-logic-app-correlation-using-servicebus/azuredeploy.json b/201-logic-app-correlation-using-servicebus/azuredeploy.json index 96b48f05ae3d..d06162d4c049 100644 --- a/201-logic-app-correlation-using-servicebus/azuredeploy.json +++ b/201-logic-app-correlation-using-servicebus/azuredeploy.json @@ -1,731 +1,738 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "serviceBusNamespace": { - "defaultValue": "[uniqueString(resourceGroup().id, deployment().name)]", - "type": "String", - "metadata": { - "description":"The Service Bus namespace name. This value should be globally unique!" - } - }, - "clientLogicApp": { - "defaultValue": "ClientLogicApp", - "type": "String", - "metadata": { - "description":"Name of the client Logic App" - } - }, - "backendLogicApp": { - "defaultValue": "BackendLogicApp", - "type": "String", - "metadata": { - "description":"Name of the backend Logic App" - } - }, - "transformationLogicApp": { - "defaultValue": "TransformationLogicApp", - "type": "String", - "metadata": { - "description":"Name of the transformation Logic App" - } - }, - "messageRoutingTopic": { - "defaultValue": "messagerouting", - "type": "String", - "metadata": { - "description":"The name of the topic for routing messages." - } - }, - "clientLogicAppSubscription": { - "defaultValue": "ToClientLogicApp", - "type": "String", - "metadata": { - "description":"The name of the topic subscription towards the client Logic App." + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "serviceBusNamespace": { + "defaultValue": "[uniqueString(resourceGroup().id, deployment().name)]", + "type": "String", + "metadata": { + "description": "The Service Bus namespace name. This value should be globally unique!" + } + }, + "clientLogicApp": { + "defaultValue": "ClientLogicApp", + "type": "String", + "metadata": { + "description": "Name of the client Logic App" + } + }, + "backendLogicApp": { + "defaultValue": "BackendLogicApp", + "type": "String", + "metadata": { + "description": "Name of the backend Logic App" + } + }, + "transformationLogicApp": { + "defaultValue": "TransformationLogicApp", + "type": "String", + "metadata": { + "description": "Name of the transformation Logic App" + } + }, + "messageRoutingTopic": { + "defaultValue": "messagerouting", + "type": "String", + "metadata": { + "description": "The name of the topic for routing messages." + } + }, + "clientLogicAppSubscription": { + "defaultValue": "ToClientLogicApp", + "type": "String", + "metadata": { + "description": "The name of the topic subscription towards the client Logic App." + } + }, + "backendLogicAppSubscription": { + "defaultValue": "ToBackendLogicApp", + "type": "String", + "metadata": { + "description": "The name of the topic subscription towards the backend Logic App." + } + }, + "transformationLogicAppSubscription": { + "defaultValue": "ToTransformationLogicApp", + "type": "String", + "metadata": { + "description": "The name of the topic subscription towards the transformation Logic App." + } + }, + "serviceBusConnection": { + "defaultValue": "servicebus", + "type": "String", + "metadata": { + "description": "The name of the connection to Service Bus created for Logic Apps." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Logic/workflows", + "name": "[parameters('backendLogicApp')]", + "apiVersion": "2017-07-01", + "location": "[parameters('location')]", + "tags": {}, + "scale": null, + "dependsOn": [ + "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnection'))]" + ], + "properties": { + "state": "Enabled", + "definition": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "$connections": { + "defaultValue": {}, + "type": "Object" } - }, - "backendLogicAppSubscription": { - "defaultValue": "ToBackendLogicApp", - "type": "String", - "metadata": { - "description":"The name of the topic subscription towards the backend Logic App." + }, + "triggers": { + "When_a_message_is_received_in_a_topic_subscription_(peek-lock)": { + "recurrence": { + "frequency": "Second", + "interval": 30 + }, + "type": "ApiConnection", + "inputs": { + "host": { + "connection": { + "name": "@parameters('$connections')['servicebus']['connectionId']" + } + }, + "method": "get", + "path": "[concat('/@{encodeURIComponent(encodeURIComponent(''messagerouting''))}/subscriptions/@{encodeURIComponent(''To', parameters('backendLogicApp'),''')}/messages/head/peek')]", + "queries": { + "sessionId": "Next Available", + "subscriptionType": "Main" + } + } } - }, - "transformationLogicAppSubscription": { - "defaultValue": "ToTransformationLogicApp", - "type": "String", - "metadata": { - "description":"The name of the topic subscription towards the transformation Logic App." + }, + "actions": { + "Complete_the_message_in_a_topic_subscription": { + "runAfter": { + "Send_message": [ + "Succeeded" + ] + }, + "type": "ApiConnection", + "inputs": { + "host": { + "connection": { + "name": "@parameters('$connections')['servicebus']['connectionId']" + } + }, + "method": "delete", + "path": "[concat('/@{encodeURIComponent(encodeURIComponent(''messagerouting''))}/subscriptions/@{encodeURIComponent(''To', parameters('backendLogicApp'),''')}/messages/complete')]", + "queries": { + "lockToken": "@triggerBody()?['LockToken']", + "sessionId": "@triggerBody()?['SessionId']", + "subscriptionType": "Main" + } + } + }, + "HTTP": { + "runAfter": {}, + "type": "Http", + "inputs": { + "body": "@base64ToString(triggerBody()?['ContentData'])", + "headers": { + "Content-Type": "application/json" + }, + "method": "POST", + "uri": "https://requestloggerbin.herokuapp.com/bin/8836aee5-6753-43bc-a9a1-d433cdeda50d" + } + }, + "Send_message": { + "runAfter": { + "HTTP": [ + "Succeeded" + ] + }, + "type": "ApiConnection", + "inputs": { + "body": { + "ContentData": "@{base64(concat('{','\n',' \"Content\":',body('HTTP'),',','\n',' \"StatusCode\":',outputs('HTTP')['statusCode'],'\n','}'))}", + "ContentType": "application/json", + "Properties": { + "Source": "[parameters('backendLogicApp')]" + }, + "SessionId": "@triggerBody()?['SessionId']" + }, + "host": { + "connection": { + "name": "@parameters('$connections')['servicebus']['connectionId']" + } + }, + "method": "post", + "path": "/@{encodeURIComponent(encodeURIComponent('messagerouting'))}/messages", + "queries": { + "systemProperties": "None" + } + } } + }, + "outputs": {} }, - "serviceBusConnection": { - "defaultValue": "servicebus", - "type": "String", - "metadata": { - "description":"The name of the connection to Service Bus created for Logic Apps." + "parameters": { + "$connections": { + "value": { + "servicebus": { + "connectionId": "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnection'))]", + "connectionName": "servicebus", + "id": "[concat('/subscriptions/', subscription().subscriptionId ,'/providers/Microsoft.Web/locations/', parameters('location') ,'/managedApis/servicebus')]" + } } + } } + } }, - "variables": {}, - "resources": [ - { - "type": "Microsoft.Logic/workflows", - "name": "[parameters('backendLogicApp')]", - "apiVersion": "2017-07-01", - "location": "[resourceGroup().location]", - "tags": {}, - "scale": null, - "dependsOn": [ - "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnection'))]" - ], - "properties": { - "state": "Enabled", - "definition": { - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "$connections": { - "defaultValue": {}, - "type": "Object" - } + { + "type": "Microsoft.Logic/workflows", + "name": "[parameters('clientLogicApp')]", + "apiVersion": "2017-07-01", + "location": "[parameters('location')]", + "tags": {}, + "scale": null, + "dependsOn": [ + "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnection'))]" + ], + "properties": { + "state": "Enabled", + "definition": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "$connections": { + "defaultValue": {}, + "type": "Object" + } + }, + "triggers": { + "manual": { + "type": "Request", + "kind": "Http", + "inputs": { + "schema": { + "properties": { + "Amount": { + "type": "string" }, - "triggers": { - "When_a_message_is_received_in_a_topic_subscription_(peek-lock)": { - "recurrence": { - "frequency": "Second", - "interval": 30 - }, - "type": "ApiConnection", - "inputs": { - "host": { - "connection": { - "name": "@parameters('$connections')['servicebus']['connectionId']" - } - }, - "method": "get", - "path": "[concat('/@{encodeURIComponent(encodeURIComponent(''messagerouting''))}/subscriptions/@{encodeURIComponent(''To', parameters('backendLogicApp'),''')}/messages/head/peek')]", - "queries": { - "sessionId": "Next Available", - "subscriptionType": "Main" - } - } - } + "Customer": { + "type": "string" }, - "actions": { - "Complete_the_message_in_a_topic_subscription": { - "runAfter": { - "Send_message": [ - "Succeeded" - ] - }, - "type": "ApiConnection", - "inputs": { - "host": { - "connection": { - "name": "@parameters('$connections')['servicebus']['connectionId']" - } - }, - "method": "delete", - "path": "[concat('/@{encodeURIComponent(encodeURIComponent(''messagerouting''))}/subscriptions/@{encodeURIComponent(''To', parameters('backendLogicApp'),''')}/messages/complete')]", - "queries": { - "lockToken": "@triggerBody()?['LockToken']", - "sessionId": "@triggerBody()?['SessionId']", - "subscriptionType": "Main" - } - } - }, - "HTTP": { - "runAfter": {}, - "type": "Http", - "inputs": { - "body": "@base64ToString(triggerBody()?['ContentData'])", - "headers": { - "Content-Type": "application/json" - }, - "method": "POST", - "uri": "https://requestloggerbin.herokuapp.com/bin/8836aee5-6753-43bc-a9a1-d433cdeda50d" - } - }, - "Send_message": { - "runAfter": { - "HTTP": [ - "Succeeded" - ] - }, - "type": "ApiConnection", - "inputs": { - "body": { - "ContentData": "@{base64(concat('{','\n',' \"Content\":',body('HTTP'),',','\n',' \"StatusCode\":',outputs('HTTP')['statusCode'],'\n','}'))}", - "ContentType": "application/json", - "Properties": { - "Source": "[parameters('backendLogicApp')]" - }, - "SessionId": "@triggerBody()?['SessionId']" - }, - "host": { - "connection": { - "name": "@parameters('$connections')['servicebus']['connectionId']" - } - }, - "method": "post", - "path": "/@{encodeURIComponent(encodeURIComponent('messagerouting'))}/messages", - "queries": { - "systemProperties": "None" - } - } - } - }, - "outputs": {} - }, - "parameters": { - "$connections": { - "value": { - "servicebus": { - "connectionId": "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnection'))]", - "connectionName": "servicebus", - "id": "[concat('/subscriptions/', subscription().subscriptionId ,'/providers/Microsoft.Web/locations/', resourceGroup().location ,'/managedApis/servicebus')]" - } - } + "Product": { + "type": "string" } + }, + "type": "object" } + } } - }, - { - "type": "Microsoft.Logic/workflows", - "name": "[parameters('clientLogicApp')]", - "apiVersion": "2017-07-01", - "location": "[resourceGroup().location]", - "tags": {}, - "scale": null, - "dependsOn": [ - "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnection'))]" - ], - "properties": { - "state": "Enabled", - "definition": { - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "$connections": { - "defaultValue": {}, - "type": "Object" - } - }, - "triggers": { - "manual": { - "type": "Request", - "kind": "Http", - "inputs": { - "schema": { - "properties": { - "Amount": { - "type": "string" - }, - "Customer": { - "type": "string" - }, - "Product": { - "type": "string" - } - }, - "type": "object" - } - } - } + }, + "actions": { + "For_each": { + "foreach": "@body('Get_messages_from_a_topic_subscription_(peek-lock)')", + "actions": { + "Complete_the_message_in_a_topic_subscription": { + "runAfter": {}, + "type": "ApiConnection", + "inputs": { + "host": { + "connection": { + "name": "@parameters('$connections')['servicebus']['connectionId']" + } }, - "actions": { - "For_each": { - "foreach": "@body('Get_messages_from_a_topic_subscription_(peek-lock)')", - "actions": { - "Complete_the_message_in_a_topic_subscription": { - "runAfter": {}, - "type": "ApiConnection", - "inputs": { - "host": { - "connection": { - "name": "@parameters('$connections')['servicebus']['connectionId']" - } - }, - "method": "delete", - "path": "[concat('/@{encodeURIComponent(encodeURIComponent(''messagerouting''))}/subscriptions/@{encodeURIComponent(''To', parameters('clientLogicApp'),''')}/messages/complete')]", - "queries": { - "lockToken": "@items('For_each')?['LockToken']", - "sessionId": "@items('For_each')?['SessionId']", - "subscriptionType": "Main" - } - } - } - }, - "runAfter": { - "Response": [ - "Succeeded" - ] - }, - "type": "Foreach" - }, - "Get_messages_from_a_topic_subscription_(peek-lock)": { - "runAfter": { - "Send_message": [ - "Succeeded" - ] - }, - "type": "ApiConnection", - "inputs": { - "host": { - "connection": { - "name": "@parameters('$connections')['servicebus']['connectionId']" - } - }, - "method": "get", - "path": "[concat('/@{encodeURIComponent(encodeURIComponent(''messagerouting''))}/subscriptions/@{encodeURIComponent(''To', parameters('clientLogicApp'),''')}/messages/batch/peek')]", - "queries": { - "maxMessageCount": 1, - "sessionId": "@variables('MyUniqueIdentifier')", - "subscriptionType": "Main" - } - } - }, - "Initialize_variable": { - "runAfter": {}, - "type": "InitializeVariable", - "inputs": { - "variables": [ - { - "name": "MyUniqueIdentifier", - "type": "String", - "value": "@{guid()}" - } - ] - } - }, - "Parse_JSON": { - "runAfter": { - "Get_messages_from_a_topic_subscription_(peek-lock)": [ - "Succeeded" - ] - }, - "type": "ParseJson", - "inputs": { - "content": "@base64ToString(body('Get_messages_from_a_topic_subscription_(peek-lock)')?[0]?['ContentData'])", - "schema": { - "properties": { - "Content": { - "properties": { - "MyBackendResponse": { - "type": "string" - } - }, - "type": "object" - }, - "StatusCode": { - "type": "integer" - } - }, - "type": "object" - } - } - }, - "Response": { - "runAfter": { - "Parse_JSON": [ - "Succeeded" - ] - }, - "type": "Response", - "kind": "Http", - "inputs": { - "body": "@body('Parse_JSON')?['Content']", - "statusCode": "@body('Parse_JSON')?['StatusCode']" - } - }, - "Send_message": { - "runAfter": { - "Initialize_variable": [ - "Succeeded" - ] - }, - "type": "ApiConnection", - "inputs": { - "body": { - "ContentData": "@{base64(triggerBody())}", - "ContentType": "application/json", - "Properties": { - "Source": "[parameters('clientLogicApp')]" - }, - "SessionId": "@variables('MyUniqueIdentifier')" - }, - "host": { - "connection": { - "name": "@parameters('$connections')['servicebus']['connectionId']" - } - }, - "method": "post", - "path": "/@{encodeURIComponent(encodeURIComponent('messagerouting'))}/messages", - "queries": { - "systemProperties": "None" - } - } - } - }, - "outputs": {} - }, - "parameters": { - "$connections": { - "value": { - "servicebus": { - "connectionId": "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnection'))]", - "connectionName": "servicebus", - "id": "[concat('/subscriptions/', subscription().subscriptionId ,'/providers/Microsoft.Web/locations/', resourceGroup().location ,'/managedApis/servicebus')]" - } - } + "method": "delete", + "path": "[concat('/@{encodeURIComponent(encodeURIComponent(''messagerouting''))}/subscriptions/@{encodeURIComponent(''To', parameters('clientLogicApp'),''')}/messages/complete')]", + "queries": { + "lockToken": "@items('For_each')?['LockToken']", + "sessionId": "@items('For_each')?['SessionId']", + "subscriptionType": "Main" } + } } - } - }, - { - "type": "Microsoft.Logic/workflows", - "name": "[parameters('transformationLogicApp')]", - "apiVersion": "2017-07-01", - "location": "[resourceGroup().location]", - "tags": {}, - "scale": null, - "dependsOn": [ - "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnection'))]" - ], - "properties": { - "state": "Enabled", - "definition": { - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "$connections": { - "defaultValue": {}, - "type": "Object" - } - }, - "triggers": { - "When_a_message_is_received_in_a_topic_subscription_(peek-lock)": { - "recurrence": { - "frequency": "Second", - "interval": 30 - }, - "type": "ApiConnection", - "inputs": { - "host": { - "connection": { - "name": "@parameters('$connections')['servicebus']['connectionId']" - } - }, - "method": "get", - "path": "[concat('/@{encodeURIComponent(encodeURIComponent(''messagerouting''))}/subscriptions/@{encodeURIComponent(''To', parameters('transformationLogicApp'),''')}/messages/head/peek')]", - "queries": { - "sessionId": "Next Available", - "subscriptionType": "Main" - } - } - } - }, - "actions": { - "Complete_the_message_in_a_topic_subscription": { - "runAfter": { - "Send_message": [ - "Succeeded" - ] - }, - "type": "ApiConnection", - "inputs": { - "host": { - "connection": { - "name": "@parameters('$connections')['servicebus']['connectionId']" - } - }, - "method": "delete", - "path": "[concat('/@{encodeURIComponent(encodeURIComponent(''messagerouting''))}/subscriptions/@{encodeURIComponent(''To', parameters('transformationLogicApp'),''')}/messages/complete')]", - "queries": { - "lockToken": "@triggerBody()?['LockToken']", - "sessionId": "@triggerBody()?['SessionId']", - "subscriptionType": "Main" - } - } - }, - "Compose": { - "runAfter": { - "Parse_JSON": [ - "Succeeded" - ] - }, - "type": "Compose", - "inputs": { - "AmountOrdered": "@{body('Parse_JSON')?['Amount']}", - "CustomerName": "@{body('Parse_JSON')?['Customer']}", - "OrderedProduct": "@{body('Parse_JSON')?['Product']}" - } - }, - "Parse_JSON": { - "runAfter": {}, - "type": "ParseJson", - "inputs": { - "content": "@base64ToString(triggerBody()?['ContentData'])", - "schema": { - "properties": { - "Amount": { - "type": "string" - }, - "Customer": { - "type": "string" - }, - "Product": { - "type": "string" - } - }, - "type": "object" - } - } - }, - "Send_message": { - "runAfter": { - "Compose": [ - "Succeeded" - ] - }, - "type": "ApiConnection", - "inputs": { - "body": { - "ContentData": "@{base64(outputs('Compose'))}", - "ContentType": "application/json", - "Properties": { - "Source": "[parameters('transformationLogicApp')]" - }, - "SessionId": "@triggerBody()?['SessionId']" - }, - "host": { - "connection": { - "name": "@parameters('$connections')['servicebus']['connectionId']" - } - }, - "method": "post", - "path": "/@{encodeURIComponent(encodeURIComponent('messagerouting'))}/messages", - "queries": { - "systemProperties": "None" - } - } - } - }, - "outputs": {} + }, + "runAfter": { + "Response": [ + "Succeeded" + ] + }, + "type": "Foreach" + }, + "Get_messages_from_a_topic_subscription_(peek-lock)": { + "runAfter": { + "Send_message": [ + "Succeeded" + ] + }, + "type": "ApiConnection", + "inputs": { + "host": { + "connection": { + "name": "@parameters('$connections')['servicebus']['connectionId']" + } }, - "parameters": { - "$connections": { - "value": { - "servicebus": { - "connectionId": "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnection'))]", - "connectionName": "servicebus", - "id": "[concat('/subscriptions/', subscription().subscriptionId ,'/providers/Microsoft.Web/locations/', resourceGroup().location ,'/managedApis/servicebus')]" - } + "method": "get", + "path": "[concat('/@{encodeURIComponent(encodeURIComponent(''messagerouting''))}/subscriptions/@{encodeURIComponent(''To', parameters('clientLogicApp'),''')}/messages/batch/peek')]", + "queries": { + "maxMessageCount": 1, + "sessionId": "@variables('MyUniqueIdentifier')", + "subscriptionType": "Main" + } + } + }, + "Initialize_variable": { + "runAfter": {}, + "type": "InitializeVariable", + "inputs": { + "variables": [ + { + "name": "MyUniqueIdentifier", + "type": "String", + "value": "@{guid()}" + } + ] + } + }, + "Parse_JSON": { + "runAfter": { + "Get_messages_from_a_topic_subscription_(peek-lock)": [ + "Succeeded" + ] + }, + "type": "ParseJson", + "inputs": { + "content": "@base64ToString(body('Get_messages_from_a_topic_subscription_(peek-lock)')?[0]?['ContentData'])", + "schema": { + "properties": { + "Content": { + "properties": { + "MyBackendResponse": { + "type": "string" } + }, + "type": "object" + }, + "StatusCode": { + "type": "integer" } + }, + "type": "object" } - } - }, - { - "type": "Microsoft.ServiceBus/namespaces", - "sku": { - "name": "Standard", - "tier": "Standard" + } }, - "name": "[parameters('serviceBusNamespace')]", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", - "tags": {}, - "scale": null, - "properties": { - "metricId": "[concat(subscription().subscriptionId, ':router', parameters('serviceBusNamespace'))]", - "createdAt": "2018-04-07T12:06:43.41Z", - "updatedAt": "2018-04-07T12:07:09.597Z", - "serviceBusEndpoint": "[concat('https://', parameters('serviceBusNamespace'),'.servicebus.windows.net:443/')]", - "status": "Active" - } - }, - { - "type": "Microsoft.Web/connections", - "name": "[parameters('serviceBusConnection')]", - "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", - "scale": null, - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces/AuthorizationRules', parameters('serviceBusNamespace'), 'RootManageSharedAccessKey')]" - ], - "properties": { - "displayName": "Router", - "customParameterValues": {}, - "api": { - "id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location , '/managedApis/', parameters('serviceBusConnection'))]" + "Response": { + "runAfter": { + "Parse_JSON": [ + "Succeeded" + ] + }, + "type": "Response", + "kind": "Http", + "inputs": { + "body": "@body('Parse_JSON')?['Content']", + "statusCode": "@body('Parse_JSON')?['StatusCode']" + } + }, + "Send_message": { + "runAfter": { + "Initialize_variable": [ + "Succeeded" + ] + }, + "type": "ApiConnection", + "inputs": { + "body": { + "ContentData": "@{base64(triggerBody())}", + "ContentType": "application/json", + "Properties": { + "Source": "[parameters('clientLogicApp')]" + }, + "SessionId": "@variables('MyUniqueIdentifier')" + }, + "host": { + "connection": { + "name": "@parameters('$connections')['servicebus']['connectionId']" + } }, - "parameterValues": { - "connectionString": "[listKeys(resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('serviceBusNamespace'), 'RootManageSharedAccessKey'), '2015-08-01').primaryConnectionString]" + "method": "post", + "path": "/@{encodeURIComponent(encodeURIComponent('messagerouting'))}/messages", + "queries": { + "systemProperties": "None" } + } } + }, + "outputs": {} }, - { - "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", - "name": "[concat(parameters('serviceBusNamespace'), '/', 'RootManageSharedAccessKey')]", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", - "scale": null, - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]" - ], - "properties": { - "rights": [ - "Listen", - "Manage", - "Send" - ] - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/topics", - "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'))]", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", - "scale": null, - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]" - ], - "properties": { - "defaultMessageTimeToLive": "P14D", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "enableBatchedOperations": true, - "status": "Active", - "supportOrdering": false, - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": true, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", - "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'), '/', parameters('backendLogicAppSubscription'))]", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", - "scale": null, - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'))]" - ], - "properties": { - "lockDuration": "PT30S", - "requiresSession": true, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "deadLetteringOnFilterEvaluationExceptions": false, - "maxDeliveryCount": 10, - "status": "Active", - "enableBatchedOperations": false, - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S" - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", - "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'), '/', parameters('clientLogicAppSubscription'))]", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", - "scale": null, - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'))]" - ], - "properties": { - "lockDuration": "PT30S", - "requiresSession": true, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "deadLetteringOnFilterEvaluationExceptions": false, - "maxDeliveryCount": 10, - "status": "Active", - "enableBatchedOperations": false, - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S" + "parameters": { + "$connections": { + "value": { + "servicebus": { + "connectionId": "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnection'))]", + "connectionName": "servicebus", + "id": "[concat('/subscriptions/', subscription().subscriptionId ,'/providers/Microsoft.Web/locations/', parameters('location') ,'/managedApis/servicebus')]" + } } - }, - { - "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", - "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'), '/', parameters('transformationLogicAppSubscription'))]", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", - "scale": null, - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'))]" - ], - "properties": { - "lockDuration": "PT30S", - "requiresSession": true, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "deadLetteringOnFilterEvaluationExceptions": false, - "maxDeliveryCount": 10, - "status": "Active", - "enableBatchedOperations": false, - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S" + } + } + } + }, + { + "type": "Microsoft.Logic/workflows", + "name": "[parameters('transformationLogicApp')]", + "apiVersion": "2017-07-01", + "location": "[parameters('location')]", + "tags": {}, + "scale": null, + "dependsOn": [ + "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnection'))]" + ], + "properties": { + "state": "Enabled", + "definition": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "$connections": { + "defaultValue": {}, + "type": "Object" } - }, - { - "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules", - "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'), '/', parameters('backendLogicAppSubscription'), '/', 'RouteToBackendLogicApp')]", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", - "scale": null, - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'), parameters('backendLogicAppSubscription'))]" - ], - "properties": { - "action": {}, - "filterType": "SqlFilter", - "sqlFilter": { - "sqlExpression": "Source='TransformationLogicApp'" + }, + "triggers": { + "When_a_message_is_received_in_a_topic_subscription_(peek-lock)": { + "recurrence": { + "frequency": "Second", + "interval": 30 + }, + "type": "ApiConnection", + "inputs": { + "host": { + "connection": { + "name": "@parameters('$connections')['servicebus']['connectionId']" + } + }, + "method": "get", + "path": "[concat('/@{encodeURIComponent(encodeURIComponent(''messagerouting''))}/subscriptions/@{encodeURIComponent(''To', parameters('transformationLogicApp'),''')}/messages/head/peek')]", + "queries": { + "sessionId": "Next Available", + "subscriptionType": "Main" } + } } - }, - { - "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules", - "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'), '/', parameters('clientLogicAppSubscription'), '/', 'RouteToClientLogicApp')]", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", - "scale": null, - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'), parameters('clientLogicAppSubscription'))]" - ], - "properties": { - "action": {}, - "filterType": "SqlFilter", - "sqlFilter": { - "sqlExpression": "Source='BackendLogicApp'" + }, + "actions": { + "Complete_the_message_in_a_topic_subscription": { + "runAfter": { + "Send_message": [ + "Succeeded" + ] + }, + "type": "ApiConnection", + "inputs": { + "host": { + "connection": { + "name": "@parameters('$connections')['servicebus']['connectionId']" + } + }, + "method": "delete", + "path": "[concat('/@{encodeURIComponent(encodeURIComponent(''messagerouting''))}/subscriptions/@{encodeURIComponent(''To', parameters('transformationLogicApp'),''')}/messages/complete')]", + "queries": { + "lockToken": "@triggerBody()?['LockToken']", + "sessionId": "@triggerBody()?['SessionId']", + "subscriptionType": "Main" + } + } + }, + "Compose": { + "runAfter": { + "Parse_JSON": [ + "Succeeded" + ] + }, + "type": "Compose", + "inputs": { + "AmountOrdered": "@{body('Parse_JSON')?['Amount']}", + "CustomerName": "@{body('Parse_JSON')?['Customer']}", + "OrderedProduct": "@{body('Parse_JSON')?['Product']}" + } + }, + "Parse_JSON": { + "runAfter": {}, + "type": "ParseJson", + "inputs": { + "content": "@base64ToString(triggerBody()?['ContentData'])", + "schema": { + "properties": { + "Amount": { + "type": "string" + }, + "Customer": { + "type": "string" + }, + "Product": { + "type": "string" + } + }, + "type": "object" } + } + }, + "Send_message": { + "runAfter": { + "Compose": [ + "Succeeded" + ] + }, + "type": "ApiConnection", + "inputs": { + "body": { + "ContentData": "@{base64(outputs('Compose'))}", + "ContentType": "application/json", + "Properties": { + "Source": "[parameters('transformationLogicApp')]" + }, + "SessionId": "@triggerBody()?['SessionId']" + }, + "host": { + "connection": { + "name": "@parameters('$connections')['servicebus']['connectionId']" + } + }, + "method": "post", + "path": "/@{encodeURIComponent(encodeURIComponent('messagerouting'))}/messages", + "queries": { + "systemProperties": "None" + } + } } + }, + "outputs": {} }, - { - "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules", - "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'), '/', parameters('transformationLogicAppSubscription'), '/', 'RouteToTransformationLogicApp')]", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", - "scale": null, - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'))]", - "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'), parameters('transformationLogicAppSubscription'))]" - ], - "properties": { - "action": {}, - "filterType": "SqlFilter", - "sqlFilter": { - "sqlExpression": "Source='ClientLogicApp'" - } + "parameters": { + "$connections": { + "value": { + "servicebus": { + "connectionId": "[resourceId('Microsoft.Web/connections', parameters('serviceBusConnection'))]", + "connectionName": "servicebus", + "id": "[concat('/subscriptions/', subscription().subscriptionId ,'/providers/Microsoft.Web/locations/', parameters('location') ,'/managedApis/servicebus')]" + } } + } + } + } + }, + { + "type": "Microsoft.ServiceBus/namespaces", + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "name": "[parameters('serviceBusNamespace')]", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "tags": {}, + "scale": null, + "properties": { + "metricId": "[concat(subscription().subscriptionId, ':router', parameters('serviceBusNamespace'))]", + "createdAt": "2018-04-07T12:06:43.41Z", + "updatedAt": "2018-04-07T12:07:09.597Z", + "serviceBusEndpoint": "[concat('https://', parameters('serviceBusNamespace'),'.servicebus.windows.net:443/')]", + "status": "Active" + } + }, + { + "type": "Microsoft.Web/connections", + "name": "[parameters('serviceBusConnection')]", + "apiVersion": "2016-06-01", + "location": "[parameters('location')]", + "scale": null, + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces/AuthorizationRules', parameters('serviceBusNamespace'), 'RootManageSharedAccessKey')]" + ], + "properties": { + "displayName": "Router", + "customParameterValues": {}, + "api": { + "id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', parameters('location') , '/managedApis/', parameters('serviceBusConnection'))]" + }, + "parameterValues": { + "connectionString": "[listKeys(resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('serviceBusNamespace'), 'RootManageSharedAccessKey'), '2015-08-01').primaryConnectionString]" + } + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", + "name": "[concat(parameters('serviceBusNamespace'), '/', 'RootManageSharedAccessKey')]", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "scale": null, + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]" + ], + "properties": { + "rights": [ + "Listen", + "Manage", + "Send" + ] + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/topics", + "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'))]", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "scale": null, + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]" + ], + "properties": { + "defaultMessageTimeToLive": "P14D", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "enableBatchedOperations": true, + "status": "Active", + "supportOrdering": false, + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": true, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", + "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'), '/', parameters('backendLogicAppSubscription'))]", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "scale": null, + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'))]" + ], + "properties": { + "lockDuration": "PT30S", + "requiresSession": true, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "deadLetteringOnFilterEvaluationExceptions": false, + "maxDeliveryCount": 10, + "status": "Active", + "enableBatchedOperations": false, + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S" + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", + "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'), '/', parameters('clientLogicAppSubscription'))]", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "scale": null, + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'))]" + ], + "properties": { + "lockDuration": "PT30S", + "requiresSession": true, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "deadLetteringOnFilterEvaluationExceptions": false, + "maxDeliveryCount": 10, + "status": "Active", + "enableBatchedOperations": false, + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S" + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions", + "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'), '/', parameters('transformationLogicAppSubscription'))]", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "scale": null, + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'))]" + ], + "properties": { + "lockDuration": "PT30S", + "requiresSession": true, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "deadLetteringOnFilterEvaluationExceptions": false, + "maxDeliveryCount": 10, + "status": "Active", + "enableBatchedOperations": false, + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S" + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules", + "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'), '/', parameters('backendLogicAppSubscription'), '/', 'RouteToBackendLogicApp')]", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "scale": null, + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'), parameters('backendLogicAppSubscription'))]" + ], + "properties": { + "action": {}, + "filterType": "SqlFilter", + "sqlFilter": { + "sqlExpression": "Source='TransformationLogicApp'" + } + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules", + "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'), '/', parameters('clientLogicAppSubscription'), '/', 'RouteToClientLogicApp')]", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "scale": null, + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'), parameters('clientLogicAppSubscription'))]" + ], + "properties": { + "action": {}, + "filterType": "SqlFilter", + "sqlFilter": { + "sqlExpression": "Source='BackendLogicApp'" + } + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules", + "name": "[concat(parameters('serviceBusNamespace'), '/', parameters('messageRoutingTopic'), '/', parameters('transformationLogicAppSubscription'), '/', 'RouteToTransformationLogicApp')]", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "scale": null, + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('serviceBusNamespace'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'))]", + "[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', parameters('serviceBusNamespace'), parameters('messageRoutingTopic'), parameters('transformationLogicAppSubscription'))]" + ], + "properties": { + "action": {}, + "filterType": "SqlFilter", + "sqlFilter": { + "sqlExpression": "Source='ClientLogicApp'" } - ] -} \ No newline at end of file + } + } + ] +} diff --git a/201-logic-app-custom-api/azuredeploy.json b/201-logic-app-custom-api/azuredeploy.json index 3c44c36e55ad..29145812dca9 100644 --- a/201-logic-app-custom-api/azuredeploy.json +++ b/201-logic-app-custom-api/azuredeploy.json @@ -1,175 +1,182 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "tenantId": { - "type": "string", - "metadata": { - "description": "The tenant ID that you Azure subscription is in." - } - }, - "webAppName": { - "type": "string", - "metadata": { - "description": "The name of the Web app." - } - }, - "webAppClientId": { - "type": "string", - "metadata": { - "description": "The client ID of the application identity that is used to secure the Web app." - } - }, - "logicAppName": { - "type": "string", - "metadata": { - "description": "The name of the logic app to create." - } - }, - "logicAppClientID": { - "type": "string", - "metadata": { - "description": "The client ID of the application identity that the Logic app has to call your Web app." - } - }, - "logicAppClientSecret": { - "type": "securestring", - "metadata": { - "description": "The client secret (key or password) of the application identity that the Logic app has to call your Web app." - } - }, - "svcPlanName": { - "type": "string", - "defaultValue": "Plan", - "metadata": { - "description": "The name of the App Service plan to create for hosting the logic app." - } - }, - "sku": { - "type": "string", - "defaultValue": "Standard", - "allowedValues": [ - "Free", - "Basic", - "Standard", - "Premium" - ], - "metadata": { - "description": "The pricing tier for the App Service plan." - } - }, - "svcPlanSize": { - "defaultValue": "S1", - "type": "string", - "metadata": { - "description": "The instance size of the app." + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "tenantId": { + "type": "string", + "metadata": { + "description": "The tenant ID that you Azure subscription is in." + } + }, + "webAppName": { + "type": "string", + "metadata": { + "description": "The name of the Web app." + } + }, + "webAppClientId": { + "type": "string", + "metadata": { + "description": "The client ID of the application identity that is used to secure the Web app." + } + }, + "logicAppName": { + "type": "string", + "metadata": { + "description": "The name of the logic app to create." + } + }, + "logicAppClientID": { + "type": "string", + "metadata": { + "description": "The client ID of the application identity that the Logic app has to call your Web app." + } + }, + "logicAppClientSecret": { + "type": "securestring", + "metadata": { + "description": "The client secret (key or password) of the application identity that the Logic app has to call your Web app." + } + }, + "svcPlanName": { + "type": "string", + "defaultValue": "Plan", + "metadata": { + "description": "The name of the App Service plan to create for hosting the logic app." + } + }, + "sku": { + "type": "string", + "defaultValue": "Standard", + "allowedValues": [ + "Free", + "Basic", + "Standard", + "Premium" + ], + "metadata": { + "description": "The pricing tier for the App Service plan." + } + }, + "svcPlanSize": { + "defaultValue": "S1", + "type": "string", + "metadata": { + "description": "The instance size of the app." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2015-08-01", + "name": "[parameters('svcPlanName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('svcPlanSize')]", + "tier": "[parameters('sku')]", + "capacity": 1 + } + }, + { + "type": "Microsoft.Web/sites", + "kind": "api", + "apiVersion": "2015-08-01", + "name": "[parameters('webAppName')]", + "location": "[parameters('location')]", + "resources": [ + { + "apiVersion": "2015-08-01", + "name": "web", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', parameters('webAppName'))]" + ], + "properties": { + "siteAuthEnabled": true, + "siteAuthSettings": { + "clientId": "[parameters('webAppClientId')]", + "issuer": "[concat('https://sts.windows.net/', parameters('tenantId') , '/')]" } + } } + ], + "dependsOn": [ + "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/',parameters('svcPlanName'))]" + ], + "properties": { + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('svcPlanName'))]" + } }, - "resources": [ - { - "type": "Microsoft.Web/serverfarms", - "apiVersion": "2015-08-01", - "name": "[parameters('svcPlanName')]", - "location": "[resourceGroup().location]", + { + "type": "Microsoft.Logic/workflows", + "apiVersion": "2015-02-01-preview", + "name": "[parameters('logicAppName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', parameters('webAppName'))]" + ], + "properties": { "sku": { - "name": "[parameters('svcPlanSize')]", - "tier": "[parameters('sku')]", - "capacity": 1 - } - }, - { - "type": "Microsoft.Web/sites", - "kind": "api", - "apiVersion": "2015-08-01", - "name": "[parameters('webAppName')]", - "location": "[resourceGroup().location]", - "resources": [ - { - "apiVersion": "2015-08-01", - "name": "web", - "type": "config", - "dependsOn": [ - "[concat('Microsoft.Web/Sites/', parameters('webAppName'))]" - ], - "properties": { - "siteAuthEnabled": true, - "siteAuthSettings": { - "clientId": "[parameters('webAppClientId')]", - "issuer": "[concat('https://sts.windows.net/', parameters('tenantId') , '/')]" - } - } + "name": "[parameters('sku')]", + "plan": { + "id": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/',parameters('svcPlanName'))]" } - ], - "dependsOn": [ - "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/',parameters('svcPlanName'))]" - ], - "properties": { - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('svcPlanName'))]" - } - }, - { - "type": "Microsoft.Logic/workflows", - "apiVersion": "2015-02-01-preview", - "name": "[parameters('logicAppName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Web/sites', parameters('webAppName'))]" - ], - "properties": { - "sku": { - "name": "[parameters('sku')]", - "plan": { - "id": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/',parameters('svcPlanName'))]" + }, + "definition": { + "$schema": "http://schema.management.azure.com/providers/Microsoft.Logic/schemas/2014-12-01-preview/workflowdefinition.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clientSecret": { + "type": "SecureString", + "defaultValue": "<>" } }, - "definition": { - "$schema": "http://schema.management.azure.com/providers/Microsoft.Logic/schemas/2014-12-01-preview/workflowdefinition.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "clientSecret": { - "type": "SecureString", - "defaultValue": "<>" - } - }, - "triggers": { + "triggers": { + "recurrence": { + "type": "recurrence", "recurrence": { - "type": "recurrence", - "recurrence": { - "frequency": "Hour", - "interval": 1 - } + "frequency": "Hour", + "interval": 1 } - }, - "actions": { - "pingSite": { - "type": "Http", - "inputs": { - "uri": "[concat('https://', reference(resourceId('Microsoft.Web/sites', parameters('webAppName'))).hostNames[0])]", - "method": "Get", - "authentication": { - "type": "ActiveDirectoryOAuth", - "tenant": "[parameters('tenantId')]", - "audience": "[parameters('webAppClientId')]", - "clientId": "[parameters('logicAppClientId')]", - "secret": "@parameters('clientSecret')" - } + } + }, + "actions": { + "pingSite": { + "type": "Http", + "inputs": { + "uri": "[concat('https://', reference(resourceId('Microsoft.Web/sites', parameters('webAppName'))).hostNames[0])]", + "method": "Get", + "authentication": { + "type": "ActiveDirectoryOAuth", + "tenant": "[parameters('tenantId')]", + "audience": "[parameters('webAppClientId')]", + "clientId": "[parameters('logicAppClientId')]", + "secret": "@parameters('clientSecret')" } } - }, - "outputs": { - "result": { - "type": "string", - "value": "@actions('pingSite').code" - } } }, - "parameters": { - "clientSecret": { - "value": "[parameters('logicAppClientSecret')]" + "outputs": { + "result": { + "type": "string", + "value": "@actions('pingSite').code" } } + }, + "parameters": { + "clientSecret": { + "value": "[parameters('logicAppClientSecret')]" + } } } - ] + } + ] } diff --git a/201-logic-app-transform-function/azuredeploy.json b/201-logic-app-transform-function/azuredeploy.json index d97e07b795f7..933af1598aa6 100644 --- a/201-logic-app-transform-function/azuredeploy.json +++ b/201-logic-app-transform-function/azuredeploy.json @@ -1,49 +1,54 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "existingFunctionAppName": { - "type": "string", - "metadata": { - "description": "The name of the function container in which the function has to be created." - } - }, - "functionName": { - "type": "string", - "defaultValue": "transformfunction", - "metadata": { - "description": "The name of the function." - } - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "existingFunctionAppName": { + "type": "string", + "metadata": { + "description": "The name of the function container in which the function has to be created." + } }, - "resources": [{ - "apiVersion": "2015-08-01", - "name": "[concat(parameters('existingFunctionAppName'),'/', parameters('functionName'))]", - "type": "Microsoft.Web/sites/functions", - "properties": { - "config": { - "bindings": [{ - "name": "req", - "webHookType": "genericJson", - "direction": "in", - "type": "httpTrigger" - }, { - "name": "res", - "direction": "out", - "type": "http" - }] + "functionName": { + "type": "string", + "defaultValue": "transformfunction", + "metadata": { + "description": "The name of the function." + } + } + }, + "resources": [ + { + "apiVersion": "2015-08-01", + "name": "[concat(parameters('existingFunctionAppName'),'/', parameters('functionName'))]", + "type": "Microsoft.Web/sites/functions", + "properties": { + "config": { + "bindings": [ + { + "name": "req", + "webHookType": "genericJson", + "direction": "in", + "type": "httpTrigger" }, - "files": { - "IntegrationXsltException.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Net;\r\n\r\n[System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\", \"CA1032:ImplementStandardExceptionConstructors\", Justification = \"Not needed.\")]\r\n[System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Usage\", \"CA2237:MarkISerializableTypesWithSerializable\", Justification = \"Not needed.\")]\r\npublic class IntegrationXsltException : Exception\r\n{\r\n public IntegrationXsltException()\r\n {\r\n }\r\n\r\n public IntegrationXsltException(string message) : base(message, null)\r\n {\r\n this.StatusCode = HttpStatusCode.InternalServerError;\r\n }\r\n\r\n public IntegrationXsltException(HttpStatusCode statusCode, string message)\r\n : base(message)\r\n {\r\n this.StatusCode = statusCode;\r\n }\r\n\r\n public IntegrationXsltException(HttpStatusCode statusCode, string message, Exception innerException)\r\n : base(message, innerException)\r\n {\r\n this.StatusCode = statusCode;\r\n }\r\n\r\n public HttpStatusCode StatusCode { get; set; }\r\n}", - "ContentHash.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\nusing Newtonsoft.Json;\r\n\r\npublic class ContentHash\r\n{\r\n public string Algorithm { get; set; }\r\n\r\n public string Value { get; set; }\r\n}\r\n", - "XsltHelper.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\n#load \"ContentEnvelope.csx\"\r\n#load \"ContentHash.csx\"\r\n#load \"ContentLinkDefinition.csx\"\r\n#load \"HttpRequestMessageExtensions.csx\"\r\n#load \"IntegrationXsltException.csx\"\r\n#load \"Validation.csx\"\r\n#load \"XsltInput.csx\"\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Net.Http;\r\nusing System.Runtime.Caching;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Xml;\r\nusing System.Xml.Linq;\r\nusing System.Xml.Xsl;\r\nusing Newtonsoft.Json;\r\nusing Newtonsoft.Json.Linq;\r\n\r\npublic static class XsltHelper\r\n{\r\n\tprivate static readonly MemoryCache CompiledTransformCache = new MemoryCache(\"CompiledTransformCache\");\r\n\r\n\tprivate static readonly CacheItemPolicy CachePolicy = new CacheItemPolicy()\r\n\t{\r\n\t\tSlidingExpiration = new TimeSpan(24, 0, 0)\r\n\t};\r\n\r\n\tpublic static async Task Transform(HttpRequestMessage request, CancellationToken cancellationToken)\r\n\t{\r\n\t\tvar transformRequest = await XsltHelper.GetXsltInput(request, cancellationToken).ConfigureAwait(continueOnCapturedContext: false);\r\n\r\n\t\tValidation.XslTransformRequest(transformRequest);\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tusing (var mapContent = await XsltHelper.GetMapContent(transformRequest.MapContentLink.Uri, cancellationToken).ConfigureAwait(continueOnCapturedContext: false))\r\n\t\t\tusing (var seekableMapContent = new MemoryStream())\r\n\t\t\t{\r\n\t\t\t\tawait mapContent.CopyToAsync(seekableMapContent).ConfigureAwait(continueOnCapturedContext: false);\r\n\r\n\t\t\t\tseekableMapContent.Position = 0;\r\n\r\n\t\t\t\t// NOTE(rarayudu): Using stream readers to take care of encoding issues.\r\n\t\t\t\t// In logic apps RP, we are always storing the schema/map contents using UTF8 encdoing. This will create problems for XMLs which have encoding of type other than UTF8.\r\n\t\t\t\t// Another possibility is to read the content as string and use the StringReader. - Not following that as don't want to load the entire string incase if the schema is large.\r\n\t\t\t\tusing (var transformStreamReader = new StreamReader(stream: seekableMapContent, detectEncodingFromByteOrderMarks: true))\r\n\t\t\t\t{\r\n\t\t\t\t\tvar arguments = XsltHelper.GetXsltArguments(\r\n\t\t\t\t\t\txsltParameters: transformRequest.XsltParameters,\r\n\t\t\t\t\t\ttransformStreamReader: transformStreamReader);\r\n\r\n\t\t\t\t\tvar inputXmlContent = transformRequest.Content.Type == JTokenType.String\r\n\t\t\t\t\t\t? Encoding.UTF8.GetBytes(transformRequest.Content.ToObject())\r\n\t\t\t\t\t\t: transformRequest.Content.ToObject().DecodeAsBytes();\r\n\r\n\t\t\t\t\tvar settings = new XsltSettings(enableDocumentFunction: true, enableScript: true);\r\n\r\n\t\t\t\t\t// NOTE(rarayudu): Set the transform stream reader stream postion to start for the XslCompiledTransform.\r\n\t\t\t\t\ttransformStreamReader.BaseStream.Position = 0;\r\n\r\n\t\t\t\t\tusing (var inputXmlStream = new MemoryStream(inputXmlContent))\r\n\t\t\t\t\tusing (var inputXmlStreamReader = new StreamReader(stream: inputXmlStream, detectEncodingFromByteOrderMarks: true))\r\n\t\t\t\t\tusing (var inputXmlReader = XmlReader.Create(inputXmlStreamReader))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvar xsltCompiler = GetCompiledTransformFromCache(mapAbsolutePath: transformRequest.MapContentLink.Uri.AbsolutePath, mapVersion: transformRequest.MapContentLink.ContentVersion);\r\n\r\n\t\t\t\t\t\tif (xsltCompiler == null)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tusing (var transformXmlReader = XmlReader.Create(transformStreamReader))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\txsltCompiler = new XslCompiledTransform();\r\n\t\t\t\t\t\t\t\txsltCompiler.Load(transformXmlReader, settings, new XmlUrlResolver());\r\n\r\n\t\t\t\t\t\t\t\tXsltHelper.CompiledTransformCache.Set(\r\n\t\t\t\t\t\t\t\t\tkey: transformRequest.MapContentLink.Uri.AbsolutePath,\r\n\t\t\t\t\t\t\t\t\tvalue: new TransformCachedItem(mapVersion: transformRequest.MapContentLink.ContentVersion, compiledTransform: xsltCompiler),\r\n\t\t\t\t\t\t\t\t\tpolicy: CachePolicy);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tusing (var outputStream = new MemoryStream())\r\n\t\t\t\t\t\tusing (var outputXmlWriter = XmlWriter.Create(outputStream))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\txsltCompiler.Transform(inputXmlReader, arguments, outputXmlWriter);\r\n\r\n\t\t\t\t\t\t\treturn HttpRequestMessageExtensions.CreateXmlResponse(\r\n\t\t\t\t\t\t\t\trequest: request,\r\n\t\t\t\t\t\t\t\tstatusCode: HttpStatusCode.OK,\r\n\t\t\t\t\t\t\t\tcontent: new ByteArrayContent(outputStream.ToArray()));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (XmlException ex)\r\n\t\t{\r\n\t\t\tthrow new IntegrationXsltException(\r\n\t\t\t\tstatusCode: HttpStatusCode.BadRequest,\r\n\t\t\t\tmessage: string.Format(CultureInfo.InvariantCulture, \"An error occurred while processing input xml. '{0}'\", ex.Message),\r\n\t\t\t\tinnerException: ex);\r\n\t\t}\r\n\t\tcatch (XsltException ex)\r\n\t\t{\r\n\t\t\tthrow new IntegrationXsltException(\r\n\t\t\t\tstatusCode: HttpStatusCode.BadRequest,\r\n\t\t\t\tmessage: string.Format(CultureInfo.InvariantCulture, \"An error occurred while processing map. '{0}'\", ex.Message),\r\n\t\t\t\tinnerException: ex);\r\n\t\t}\r\n\t\tcatch (IntegrationXsltException)\r\n\t\t{\r\n\t\t\tXsltHelper.CompiledTransformCache.Remove(key: transformRequest.MapContentLink.Uri.AbsolutePath);\r\n\r\n\t\t\tthrow;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static async Task GetXsltInput(HttpRequestMessage request, CancellationToken cancellationToken)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn await request.Content.ReadAsAsync(cancellationToken).ConfigureAwait(continueOnCapturedContext: false);\r\n\t\t}\r\n\t\tcatch (Exception ex)\r\n\t\t{\r\n\t\t\tif (ex is FormatException || ex is ArgumentException || ex is JsonException)\r\n\t\t\t{\r\n\t\t\t\tthrow new IntegrationXsltException(\r\n\t\t\t\t\tstatusCode: HttpStatusCode.BadRequest,\r\n\t\t\t\t\tmessage: string.Format(CultureInfo.InvariantCulture, \"The request content is not valid and could not be deserialized: '{0}'\", ex.Message),\r\n\t\t\t\t\tinnerException: ex);\r\n\t\t\t}\r\n\r\n\t\t\tthrow;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static async Task GetMapContent(Uri mapContentLink, CancellationToken cancellationToken)\r\n\t{\r\n\t\tvar httpClient = new HttpClient();\r\n\t\tvar response = await httpClient.GetAsync(mapContentLink, cancellationToken).ConfigureAwait(continueOnCapturedContext: false);\r\n\r\n\t\tif (response.StatusCode != HttpStatusCode.OK)\r\n\t\t{\r\n\t\t\tvar responseContent = response.Content != null\r\n\t\t\t\t? await response.Content.ReadAsStringAsync().ConfigureAwait(continueOnCapturedContext: false)\r\n\t\t\t\t: string.Empty;\r\n\r\n\t\t\tthrow new IntegrationXsltException(\r\n\t\t\t\tstatusCode: response.StatusCode,\r\n\t\t\t\tmessage: string.Format(CultureInfo.InvariantCulture, \"An error occurred while fetching the map content using the content link: '{0}'. Error: '{1}'\", mapContentLink, responseContent));\r\n\t\t}\r\n\r\n\t\treturn await response.Content.ReadAsStreamAsync().ConfigureAwait(continueOnCapturedContext: false);\r\n\t}\r\n\r\n\tprivate static XsltArgumentList GetXsltArguments(IDictionary xsltParameters, StreamReader transformStreamReader)\r\n\t{\r\n\t\tvar arguments = new XsltArgumentList();\r\n\t\tif (xsltParameters != null)\r\n\t\t{\r\n\t\t\tforeach (KeyValuePair parameter in xsltParameters)\r\n\t\t\t{\r\n\t\t\t\tif (parameter.Key.Contains(':'))\r\n\t\t\t\t{\r\n\t\t\t\t\tvar splitArgument = parameter.Key.Split(':');\r\n\t\t\t\t\tif (splitArgument.Length == 2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t transformStreamReader.BaseStream.Position = 0;\r\n\t\t\t\t\t\targuments.AddParam(splitArgument[1], GetParameterNamespace(splitArgument[0], transformStreamReader), parameter.Value ?? string.Empty);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\targuments.AddParam(parameter.Key, string.Empty, parameter.Value ?? string.Empty);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\targuments.AddParam(parameter.Key, string.Empty, parameter.Value ?? string.Empty);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn arguments;\r\n\t}\r\n\r\n\tprivate static string GetParameterNamespace(string namespacePrefix, TextReader transformStreamReader)\r\n\t{\r\n\t\tvar xsltDocument = XDocument.Load(transformStreamReader);\r\n\t\tif (xsltDocument.Root != null)\r\n\t\t{\r\n\t\t\tvar namespaceOfPrefix = xsltDocument.Root.GetNamespaceOfPrefix(namespacePrefix);\r\n\t\t\treturn namespaceOfPrefix != null ? namespaceOfPrefix.NamespaceName : string.Empty;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new IntegrationXsltException(HttpStatusCode.BadRequest, \"The provided map is not valid.\");\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static XslCompiledTransform GetCompiledTransformFromCache(string mapAbsolutePath, string mapVersion)\r\n\t{\r\n\t\tif (CompiledTransformCache.Contains(mapAbsolutePath))\r\n\t\t{\r\n\t\t\tvar cachedData = (TransformCachedItem)CompiledTransformCache.Get(key: mapAbsolutePath);\r\n\r\n\t\t\tif (cachedData.MapVersion == mapVersion)\r\n\t\t\t{\r\n\t\t\t\treturn cachedData.CompiledTransform;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}\r\n\r\n\tprivate class TransformCachedItem\r\n\t{\r\n\t\tpublic TransformCachedItem(string mapVersion, XslCompiledTransform compiledTransform)\r\n\t\t{\r\n\t\t\tthis.MapVersion = mapVersion;\r\n\t\t\tthis.CompiledTransform = compiledTransform;\r\n\t\t}\r\n\r\n\t\tpublic string MapVersion { get; set; }\r\n\r\n\t\tpublic XslCompiledTransform CompiledTransform { get; set; }\r\n\t}\r\n}", - "HttpRequestMessageExtensions.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\n\r\npublic static class HttpRequestMessageExtensions\r\n{\r\n public static readonly string HeaderClientRequestId = \"x-ms-client-request-id\";\r\n\r\n [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", Justification = \"By design. As this is a extension method caller has to take care of it.\")]\r\n public static string GetClientRequestId(HttpRequestMessage request)\r\n {\r\n return HttpRequestMessageExtensions.GetFirstOrDefaultHeader(request: request, name: HttpRequestMessageExtensions.HeaderClientRequestId, defaultValue: string.Empty);\r\n }\r\n\r\n [SuppressMessage(\"Microsoft.Design\", \"CA1026:DefaultParametersShouldNotBeUsed\", Justification = \"By design\")]\r\n [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", Justification = \"By design. As this is a extension method caller has to take care of it.\")]\r\n public static string GetFirstOrDefaultHeader(HttpRequestMessage request, string name, string defaultValue = null)\r\n {\r\n IEnumerable values = (IEnumerable)null;\r\n\r\n if (request.Headers.TryGetValues(name, out values) && values.Any())\r\n {\r\n return values.First();\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", Justification = \"By design. As this is a extension method caller has to take care of it.\")]\r\n public static HttpResponseMessage CreateXmlResponse(HttpRequestMessage request, HttpStatusCode statusCode, HttpContent content)\r\n {\r\n var response = request.CreateResponse(statusCode);\r\n\r\n try\r\n {\r\n if (content != null)\r\n {\r\n response.Content = content;\r\n response.Content.Headers.ContentType = new MediaTypeHeaderValue(\"application/xml\");\r\n }\r\n }\r\n catch\r\n {\r\n response.Dispose();\r\n response = null;\r\n throw;\r\n }\r\n\r\n return response;\r\n }\r\n}\r\n", - "run.csx": "#r \"Newtonsoft.Json\"\r\n#r \"System.Xml.Linq\"\r\n#r \"System.Runtime.Caching\"\r\n\r\n#load \"XsltHelper.csx\"\r\n#load \"HttpRequestMessageExtensions.csx\"\r\n#load \"IntegrationXsltException.csx\"\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Xml;\r\nusing System.Xml.Linq;\r\nusing System.Xml.Xsl;\r\nusing Newtonsoft.Json;\r\nusing Newtonsoft.Json.Linq;\r\n\r\npublic static async Task Run(HttpRequestMessage req, TraceWriter log, CancellationToken token)\r\n{\r\n var clientRequestId = string.Empty;\r\n\r\n try\r\n {\r\n clientRequestId = HttpRequestMessageExtensions.GetClientRequestId(request: req);\r\n log.Info(string.Format(\"Executing transform operation. client request id: '{0}'\", clientRequestId));\r\n return await XsltHelper.Transform(req, token).ConfigureAwait(continueOnCapturedContext: false);\r\n }\r\n catch (IntegrationXsltException ex)\r\n {\r\n log.Info(string.Format(\"An exception occurred while performing transform. client request id: '{0}' and exception: '{1}'\", clientRequestId, ex.ToString()));\r\n return req.CreateErrorResponse(ex.StatusCode, ex.Message);\r\n }\r\n catch (Exception ex)\r\n {\r\n log.Info(string.Format(\"An exception occurred while performing transform. client request id: '{0}' and exception: '{1}'\", clientRequestId, ex.ToString()));\r\n throw;\r\n }\r\n}\r\n", - "XsltInput.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing Newtonsoft.Json.Linq;\r\n\r\npublic class XsltInput\r\n{\r\n public JToken Content { get; set; }\r\n\r\n [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Usage\", \"CA2227:CollectionPropertiesShouldBeReadOnly\", Justification = \"By design\")]\r\n public IDictionary XsltParameters { get; set; }\r\n\r\n public ContentLinkDefinition MapContentLink { get; set; }\r\n}", - "Validation.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\nusing System.Globalization;\r\nusing System.Net;\r\n\r\npublic static class Validation\r\n{\r\n public static void XslTransformRequest(XsltInput xsltInput)\r\n {\r\n if (xsltInput == null || xsltInput.Content == null)\r\n {\r\n throw new IntegrationXsltException(\r\n statusCode: HttpStatusCode.BadRequest,\r\n message: \"The provided xml content to transform is null or empty.\");\r\n }\r\n\r\n if (xsltInput.MapContentLink == null)\r\n {\r\n throw new IntegrationXsltException(\r\n statusCode: HttpStatusCode.BadRequest,\r\n message: \"The provided content link for the map is null or empty.\");\r\n }\r\n\r\n if (xsltInput.MapContentLink.Uri == null)\r\n {\r\n throw new IntegrationXsltException(\r\n statusCode: HttpStatusCode.BadRequest,\r\n message: \"The provided uri in the content link for the map is null or empty.\");\r\n }\r\n\r\n if (!xsltInput.MapContentLink.Uri.IsAbsoluteUri)\r\n {\r\n throw new IntegrationXsltException(\r\n statusCode: HttpStatusCode.BadRequest,\r\n message: string.Format(CultureInfo.InvariantCulture, \"The provided uri '{0}' in the content link for the map is not a valid uri.\", xsltInput.MapContentLink.Uri));\r\n }\r\n }\r\n}\r\n", - "ContentEnvelope.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Net.Mime;\r\nusing System.Text;\r\nusing Newtonsoft.Json;\r\n\r\npublic class ContentEnvelope\r\n{\r\n [JsonProperty(PropertyName = \"$content-encoding\", Required = Required.Default)]\r\n public string ContentEncoding { get; set; }\r\n\r\n [JsonProperty(PropertyName = \"$content-type\", Required = Required.Always)]\r\n public string ContentType { get; set; }\r\n\r\n [JsonProperty(PropertyName = \"$content\", Required = Required.Always)]\r\n public string Content { get; set; }\r\n\r\n public string DecodeAsString()\r\n {\r\n var contentType = new ContentType(this.ContentType);\r\n var encoding = contentType.CharSet != null ? Encoding.GetEncoding(contentType.CharSet) : Encoding.UTF8;\r\n\r\n return encoding.GetString(Convert.FromBase64String(this.Content));\r\n }\r\n\r\n public byte[] DecodeAsBytes()\r\n {\r\n return Convert.FromBase64String(this.Content);\r\n }\r\n}", - "ContentLinkDefinition.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\n#load \"ContentHash.csx\"\r\n\r\nusing System;\r\nusing Newtonsoft.Json;\r\nusing Newtonsoft.Json.Linq;\r\n\r\npublic class ContentLinkDefinition\r\n{\r\n [JsonProperty(Required = Required.Always)]\r\n public Uri Uri { get; set; }\r\n\r\n public string ContentVersion { get; set; }\r\n\r\n public long? ContentSize { get; set; }\r\n\r\n public ContentHash ContentHash { get; set; }\r\n\r\n public JToken Metadata { get; set; }\r\n}" + { + "name": "res", + "direction": "out", + "type": "http" } + ] + }, + "files": { + "IntegrationXsltException.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Net;\r\n\r\n[System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\", \"CA1032:ImplementStandardExceptionConstructors\", Justification = \"Not needed.\")]\r\n[System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Usage\", \"CA2237:MarkISerializableTypesWithSerializable\", Justification = \"Not needed.\")]\r\npublic class IntegrationXsltException : Exception\r\n{\r\n public IntegrationXsltException()\r\n {\r\n }\r\n\r\n public IntegrationXsltException(string message) : base(message, null)\r\n {\r\n this.StatusCode = HttpStatusCode.InternalServerError;\r\n }\r\n\r\n public IntegrationXsltException(HttpStatusCode statusCode, string message)\r\n : base(message)\r\n {\r\n this.StatusCode = statusCode;\r\n }\r\n\r\n public IntegrationXsltException(HttpStatusCode statusCode, string message, Exception innerException)\r\n : base(message, innerException)\r\n {\r\n this.StatusCode = statusCode;\r\n }\r\n\r\n public HttpStatusCode StatusCode { get; set; }\r\n}", + "ContentHash.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\nusing Newtonsoft.Json;\r\n\r\npublic class ContentHash\r\n{\r\n public string Algorithm { get; set; }\r\n\r\n public string Value { get; set; }\r\n}\r\n", + "XsltHelper.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\n#load \"ContentEnvelope.csx\"\r\n#load \"ContentHash.csx\"\r\n#load \"ContentLinkDefinition.csx\"\r\n#load \"HttpRequestMessageExtensions.csx\"\r\n#load \"IntegrationXsltException.csx\"\r\n#load \"Validation.csx\"\r\n#load \"XsltInput.csx\"\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Net.Http;\r\nusing System.Runtime.Caching;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Xml;\r\nusing System.Xml.Linq;\r\nusing System.Xml.Xsl;\r\nusing Newtonsoft.Json;\r\nusing Newtonsoft.Json.Linq;\r\n\r\npublic static class XsltHelper\r\n{\r\n\tprivate static readonly MemoryCache CompiledTransformCache = new MemoryCache(\"CompiledTransformCache\");\r\n\r\n\tprivate static readonly CacheItemPolicy CachePolicy = new CacheItemPolicy()\r\n\t{\r\n\t\tSlidingExpiration = new TimeSpan(24, 0, 0)\r\n\t};\r\n\r\n\tpublic static async Task Transform(HttpRequestMessage request, CancellationToken cancellationToken)\r\n\t{\r\n\t\tvar transformRequest = await XsltHelper.GetXsltInput(request, cancellationToken).ConfigureAwait(continueOnCapturedContext: false);\r\n\r\n\t\tValidation.XslTransformRequest(transformRequest);\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tusing (var mapContent = await XsltHelper.GetMapContent(transformRequest.MapContentLink.Uri, cancellationToken).ConfigureAwait(continueOnCapturedContext: false))\r\n\t\t\tusing (var seekableMapContent = new MemoryStream())\r\n\t\t\t{\r\n\t\t\t\tawait mapContent.CopyToAsync(seekableMapContent).ConfigureAwait(continueOnCapturedContext: false);\r\n\r\n\t\t\t\tseekableMapContent.Position = 0;\r\n\r\n\t\t\t\t// NOTE(rarayudu): Using stream readers to take care of encoding issues.\r\n\t\t\t\t// In logic apps RP, we are always storing the schema/map contents using UTF8 encdoing. This will create problems for XMLs which have encoding of type other than UTF8.\r\n\t\t\t\t// Another possibility is to read the content as string and use the StringReader. - Not following that as don't want to load the entire string incase if the schema is large.\r\n\t\t\t\tusing (var transformStreamReader = new StreamReader(stream: seekableMapContent, detectEncodingFromByteOrderMarks: true))\r\n\t\t\t\t{\r\n\t\t\t\t\tvar arguments = XsltHelper.GetXsltArguments(\r\n\t\t\t\t\t\txsltParameters: transformRequest.XsltParameters,\r\n\t\t\t\t\t\ttransformStreamReader: transformStreamReader);\r\n\r\n\t\t\t\t\tvar inputXmlContent = transformRequest.Content.Type == JTokenType.String\r\n\t\t\t\t\t\t? Encoding.UTF8.GetBytes(transformRequest.Content.ToObject())\r\n\t\t\t\t\t\t: transformRequest.Content.ToObject().DecodeAsBytes();\r\n\r\n\t\t\t\t\tvar settings = new XsltSettings(enableDocumentFunction: true, enableScript: true);\r\n\r\n\t\t\t\t\t// NOTE(rarayudu): Set the transform stream reader stream postion to start for the XslCompiledTransform.\r\n\t\t\t\t\ttransformStreamReader.BaseStream.Position = 0;\r\n\r\n\t\t\t\t\tusing (var inputXmlStream = new MemoryStream(inputXmlContent))\r\n\t\t\t\t\tusing (var inputXmlStreamReader = new StreamReader(stream: inputXmlStream, detectEncodingFromByteOrderMarks: true))\r\n\t\t\t\t\tusing (var inputXmlReader = XmlReader.Create(inputXmlStreamReader))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvar xsltCompiler = GetCompiledTransformFromCache(mapAbsolutePath: transformRequest.MapContentLink.Uri.AbsolutePath, mapVersion: transformRequest.MapContentLink.ContentVersion);\r\n\r\n\t\t\t\t\t\tif (xsltCompiler == null)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tusing (var transformXmlReader = XmlReader.Create(transformStreamReader))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\txsltCompiler = new XslCompiledTransform();\r\n\t\t\t\t\t\t\t\txsltCompiler.Load(transformXmlReader, settings, new XmlUrlResolver());\r\n\r\n\t\t\t\t\t\t\t\tXsltHelper.CompiledTransformCache.Set(\r\n\t\t\t\t\t\t\t\t\tkey: transformRequest.MapContentLink.Uri.AbsolutePath,\r\n\t\t\t\t\t\t\t\t\tvalue: new TransformCachedItem(mapVersion: transformRequest.MapContentLink.ContentVersion, compiledTransform: xsltCompiler),\r\n\t\t\t\t\t\t\t\t\tpolicy: CachePolicy);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tusing (var outputStream = new MemoryStream())\r\n\t\t\t\t\t\tusing (var outputXmlWriter = XmlWriter.Create(outputStream))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\txsltCompiler.Transform(inputXmlReader, arguments, outputXmlWriter);\r\n\r\n\t\t\t\t\t\t\treturn HttpRequestMessageExtensions.CreateXmlResponse(\r\n\t\t\t\t\t\t\t\trequest: request,\r\n\t\t\t\t\t\t\t\tstatusCode: HttpStatusCode.OK,\r\n\t\t\t\t\t\t\t\tcontent: new ByteArrayContent(outputStream.ToArray()));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (XmlException ex)\r\n\t\t{\r\n\t\t\tthrow new IntegrationXsltException(\r\n\t\t\t\tstatusCode: HttpStatusCode.BadRequest,\r\n\t\t\t\tmessage: string.Format(CultureInfo.InvariantCulture, \"An error occurred while processing input xml. '{0}'\", ex.Message),\r\n\t\t\t\tinnerException: ex);\r\n\t\t}\r\n\t\tcatch (XsltException ex)\r\n\t\t{\r\n\t\t\tthrow new IntegrationXsltException(\r\n\t\t\t\tstatusCode: HttpStatusCode.BadRequest,\r\n\t\t\t\tmessage: string.Format(CultureInfo.InvariantCulture, \"An error occurred while processing map. '{0}'\", ex.Message),\r\n\t\t\t\tinnerException: ex);\r\n\t\t}\r\n\t\tcatch (IntegrationXsltException)\r\n\t\t{\r\n\t\t\tXsltHelper.CompiledTransformCache.Remove(key: transformRequest.MapContentLink.Uri.AbsolutePath);\r\n\r\n\t\t\tthrow;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static async Task GetXsltInput(HttpRequestMessage request, CancellationToken cancellationToken)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn await request.Content.ReadAsAsync(cancellationToken).ConfigureAwait(continueOnCapturedContext: false);\r\n\t\t}\r\n\t\tcatch (Exception ex)\r\n\t\t{\r\n\t\t\tif (ex is FormatException || ex is ArgumentException || ex is JsonException)\r\n\t\t\t{\r\n\t\t\t\tthrow new IntegrationXsltException(\r\n\t\t\t\t\tstatusCode: HttpStatusCode.BadRequest,\r\n\t\t\t\t\tmessage: string.Format(CultureInfo.InvariantCulture, \"The request content is not valid and could not be deserialized: '{0}'\", ex.Message),\r\n\t\t\t\t\tinnerException: ex);\r\n\t\t\t}\r\n\r\n\t\t\tthrow;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static async Task GetMapContent(Uri mapContentLink, CancellationToken cancellationToken)\r\n\t{\r\n\t\tvar httpClient = new HttpClient();\r\n\t\tvar response = await httpClient.GetAsync(mapContentLink, cancellationToken).ConfigureAwait(continueOnCapturedContext: false);\r\n\r\n\t\tif (response.StatusCode != HttpStatusCode.OK)\r\n\t\t{\r\n\t\t\tvar responseContent = response.Content != null\r\n\t\t\t\t? await response.Content.ReadAsStringAsync().ConfigureAwait(continueOnCapturedContext: false)\r\n\t\t\t\t: string.Empty;\r\n\r\n\t\t\tthrow new IntegrationXsltException(\r\n\t\t\t\tstatusCode: response.StatusCode,\r\n\t\t\t\tmessage: string.Format(CultureInfo.InvariantCulture, \"An error occurred while fetching the map content using the content link: '{0}'. Error: '{1}'\", mapContentLink, responseContent));\r\n\t\t}\r\n\r\n\t\treturn await response.Content.ReadAsStreamAsync().ConfigureAwait(continueOnCapturedContext: false);\r\n\t}\r\n\r\n\tprivate static XsltArgumentList GetXsltArguments(IDictionary xsltParameters, StreamReader transformStreamReader)\r\n\t{\r\n\t\tvar arguments = new XsltArgumentList();\r\n\t\tif (xsltParameters != null)\r\n\t\t{\r\n\t\t\tforeach (KeyValuePair parameter in xsltParameters)\r\n\t\t\t{\r\n\t\t\t\tif (parameter.Key.Contains(':'))\r\n\t\t\t\t{\r\n\t\t\t\t\tvar splitArgument = parameter.Key.Split(':');\r\n\t\t\t\t\tif (splitArgument.Length == 2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t transformStreamReader.BaseStream.Position = 0;\r\n\t\t\t\t\t\targuments.AddParam(splitArgument[1], GetParameterNamespace(splitArgument[0], transformStreamReader), parameter.Value ?? string.Empty);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\targuments.AddParam(parameter.Key, string.Empty, parameter.Value ?? string.Empty);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\targuments.AddParam(parameter.Key, string.Empty, parameter.Value ?? string.Empty);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn arguments;\r\n\t}\r\n\r\n\tprivate static string GetParameterNamespace(string namespacePrefix, TextReader transformStreamReader)\r\n\t{\r\n\t\tvar xsltDocument = XDocument.Load(transformStreamReader);\r\n\t\tif (xsltDocument.Root != null)\r\n\t\t{\r\n\t\t\tvar namespaceOfPrefix = xsltDocument.Root.GetNamespaceOfPrefix(namespacePrefix);\r\n\t\t\treturn namespaceOfPrefix != null ? namespaceOfPrefix.NamespaceName : string.Empty;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new IntegrationXsltException(HttpStatusCode.BadRequest, \"The provided map is not valid.\");\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static XslCompiledTransform GetCompiledTransformFromCache(string mapAbsolutePath, string mapVersion)\r\n\t{\r\n\t\tif (CompiledTransformCache.Contains(mapAbsolutePath))\r\n\t\t{\r\n\t\t\tvar cachedData = (TransformCachedItem)CompiledTransformCache.Get(key: mapAbsolutePath);\r\n\r\n\t\t\tif (cachedData.MapVersion == mapVersion)\r\n\t\t\t{\r\n\t\t\t\treturn cachedData.CompiledTransform;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}\r\n\r\n\tprivate class TransformCachedItem\r\n\t{\r\n\t\tpublic TransformCachedItem(string mapVersion, XslCompiledTransform compiledTransform)\r\n\t\t{\r\n\t\t\tthis.MapVersion = mapVersion;\r\n\t\t\tthis.CompiledTransform = compiledTransform;\r\n\t\t}\r\n\r\n\t\tpublic string MapVersion { get; set; }\r\n\r\n\t\tpublic XslCompiledTransform CompiledTransform { get; set; }\r\n\t}\r\n}", + "HttpRequestMessageExtensions.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\n\r\npublic static class HttpRequestMessageExtensions\r\n{\r\n public static readonly string HeaderClientRequestId = \"x-ms-client-request-id\";\r\n\r\n [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", Justification = \"By design. As this is a extension method caller has to take care of it.\")]\r\n public static string GetClientRequestId(HttpRequestMessage request)\r\n {\r\n return HttpRequestMessageExtensions.GetFirstOrDefaultHeader(request: request, name: HttpRequestMessageExtensions.HeaderClientRequestId, defaultValue: string.Empty);\r\n }\r\n\r\n [SuppressMessage(\"Microsoft.Design\", \"CA1026:DefaultParametersShouldNotBeUsed\", Justification = \"By design\")]\r\n [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", Justification = \"By design. As this is a extension method caller has to take care of it.\")]\r\n public static string GetFirstOrDefaultHeader(HttpRequestMessage request, string name, string defaultValue = null)\r\n {\r\n IEnumerable values = (IEnumerable)null;\r\n\r\n if (request.Headers.TryGetValues(name, out values) && values.Any())\r\n {\r\n return values.First();\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", Justification = \"By design. As this is a extension method caller has to take care of it.\")]\r\n public static HttpResponseMessage CreateXmlResponse(HttpRequestMessage request, HttpStatusCode statusCode, HttpContent content)\r\n {\r\n var response = request.CreateResponse(statusCode);\r\n\r\n try\r\n {\r\n if (content != null)\r\n {\r\n response.Content = content;\r\n response.Content.Headers.ContentType = new MediaTypeHeaderValue(\"application/xml\");\r\n }\r\n }\r\n catch\r\n {\r\n response.Dispose();\r\n response = null;\r\n throw;\r\n }\r\n\r\n return response;\r\n }\r\n}\r\n", + "run.csx": "#r \"Newtonsoft.Json\"\r\n#r \"System.Xml.Linq\"\r\n#r \"System.Runtime.Caching\"\r\n\r\n#load \"XsltHelper.csx\"\r\n#load \"HttpRequestMessageExtensions.csx\"\r\n#load \"IntegrationXsltException.csx\"\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Xml;\r\nusing System.Xml.Linq;\r\nusing System.Xml.Xsl;\r\nusing Newtonsoft.Json;\r\nusing Newtonsoft.Json.Linq;\r\n\r\npublic static async Task Run(HttpRequestMessage req, TraceWriter log, CancellationToken token)\r\n{\r\n var clientRequestId = string.Empty;\r\n\r\n try\r\n {\r\n clientRequestId = HttpRequestMessageExtensions.GetClientRequestId(request: req);\r\n log.Info(string.Format(\"Executing transform operation. client request id: '{0}'\", clientRequestId));\r\n return await XsltHelper.Transform(req, token).ConfigureAwait(continueOnCapturedContext: false);\r\n }\r\n catch (IntegrationXsltException ex)\r\n {\r\n log.Info(string.Format(\"An exception occurred while performing transform. client request id: '{0}' and exception: '{1}'\", clientRequestId, ex.ToString()));\r\n return req.CreateErrorResponse(ex.StatusCode, ex.Message);\r\n }\r\n catch (Exception ex)\r\n {\r\n log.Info(string.Format(\"An exception occurred while performing transform. client request id: '{0}' and exception: '{1}'\", clientRequestId, ex.ToString()));\r\n throw;\r\n }\r\n}\r\n", + "XsltInput.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing Newtonsoft.Json.Linq;\r\n\r\npublic class XsltInput\r\n{\r\n public JToken Content { get; set; }\r\n\r\n [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Usage\", \"CA2227:CollectionPropertiesShouldBeReadOnly\", Justification = \"By design\")]\r\n public IDictionary XsltParameters { get; set; }\r\n\r\n public ContentLinkDefinition MapContentLink { get; set; }\r\n}", + "Validation.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\nusing System.Globalization;\r\nusing System.Net;\r\n\r\npublic static class Validation\r\n{\r\n public static void XslTransformRequest(XsltInput xsltInput)\r\n {\r\n if (xsltInput == null || xsltInput.Content == null)\r\n {\r\n throw new IntegrationXsltException(\r\n statusCode: HttpStatusCode.BadRequest,\r\n message: \"The provided xml content to transform is null or empty.\");\r\n }\r\n\r\n if (xsltInput.MapContentLink == null)\r\n {\r\n throw new IntegrationXsltException(\r\n statusCode: HttpStatusCode.BadRequest,\r\n message: \"The provided content link for the map is null or empty.\");\r\n }\r\n\r\n if (xsltInput.MapContentLink.Uri == null)\r\n {\r\n throw new IntegrationXsltException(\r\n statusCode: HttpStatusCode.BadRequest,\r\n message: \"The provided uri in the content link for the map is null or empty.\");\r\n }\r\n\r\n if (!xsltInput.MapContentLink.Uri.IsAbsoluteUri)\r\n {\r\n throw new IntegrationXsltException(\r\n statusCode: HttpStatusCode.BadRequest,\r\n message: string.Format(CultureInfo.InvariantCulture, \"The provided uri '{0}' in the content link for the map is not a valid uri.\", xsltInput.MapContentLink.Uri));\r\n }\r\n }\r\n}\r\n", + "ContentEnvelope.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Net.Mime;\r\nusing System.Text;\r\nusing Newtonsoft.Json;\r\n\r\npublic class ContentEnvelope\r\n{\r\n [JsonProperty(PropertyName = \"$content-encoding\", Required = Required.Default)]\r\n public string ContentEncoding { get; set; }\r\n\r\n [JsonProperty(PropertyName = \"$content-type\", Required = Required.Always)]\r\n public string ContentType { get; set; }\r\n\r\n [JsonProperty(PropertyName = \"$content\", Required = Required.Always)]\r\n public string Content { get; set; }\r\n\r\n public string DecodeAsString()\r\n {\r\n var contentType = new ContentType(this.ContentType);\r\n var encoding = contentType.CharSet != null ? Encoding.GetEncoding(contentType.CharSet) : Encoding.UTF8;\r\n\r\n return encoding.GetString(Convert.FromBase64String(this.Content));\r\n }\r\n\r\n public byte[] DecodeAsBytes()\r\n {\r\n return Convert.FromBase64String(this.Content);\r\n }\r\n}", + "ContentLinkDefinition.csx": "//-----------------------------------------------------------------------\r\n// \r\n// All rights reserved.\r\n// \r\n//-----------------------------------------------------------------------\r\n\r\n#load \"ContentHash.csx\"\r\n\r\nusing System;\r\nusing Newtonsoft.Json;\r\nusing Newtonsoft.Json.Linq;\r\n\r\npublic class ContentLinkDefinition\r\n{\r\n [JsonProperty(Required = Required.Always)]\r\n public Uri Uri { get; set; }\r\n\r\n public string ContentVersion { get; set; }\r\n\r\n public long? ContentSize { get; set; }\r\n\r\n public ContentHash ContentHash { get; set; }\r\n\r\n public JToken Metadata { get; set; }\r\n}" } - }] -} \ No newline at end of file + } + } + ] +} diff --git a/201-logic-app-transform-function/prereqs/prereq.azuredeploy.json b/201-logic-app-transform-function/prereqs/prereq.azuredeploy.json index dc310b1ac45a..9e0b5de1edee 100644 --- a/201-logic-app-transform-function/prereqs/prereq.azuredeploy.json +++ b/201-logic-app-transform-function/prereqs/prereq.azuredeploy.json @@ -2,7 +2,13 @@ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { - + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } }, "variables": { "storageName": "[concat('stor',uniqueString(resourceGroup().id))]", @@ -13,7 +19,7 @@ "type": "Microsoft.Web/sites", "name": "[variables('name')]", "apiVersion": "2016-03-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "name": "[variables('name')]", "siteConfig": { @@ -55,13 +61,11 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" }, - "resources": [ - - ] + "resources": [] } ], "outputs": { @@ -69,6 +73,5 @@ "type": "string", "value": "[variables('name')]" } - } } diff --git a/201-nsg-add-to-existing-subnet/prereqs/prereq.azuredeploy.json b/201-nsg-add-to-existing-subnet/prereqs/prereq.azuredeploy.json index a3f0b40c0b9d..055e734b7e60 100644 --- a/201-nsg-add-to-existing-subnet/prereqs/prereq.azuredeploy.json +++ b/201-nsg-add-to-existing-subnet/prereqs/prereq.azuredeploy.json @@ -1,55 +1,62 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vNetName": { - "type": "string" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vNetName": { + "type": "string" }, - "variables": { - "vNetPrefix": "10.0.0.0/16", - "SubnetName": "default", - "SubnetPrefix": "10.0.0.0/24" - }, - "resources": [ - { - "name": "[parameters('vNetName')]", - "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", - "apiVersion": "2018-03-01", - "dependsOn": [], - "tags": { - "displayName": "vNet" - }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "vNetPrefix": "10.0.0.0/16", + "SubnetName": "default", + "SubnetPrefix": "10.0.0.0/24" + }, + "resources": [ + { + "name": "[parameters('vNetName')]", + "type": "Microsoft.Network/virtualNetworks", + "location": "[parameters('location')]", + "apiVersion": "2018-03-01", + "dependsOn": [], + "tags": { + "displayName": "vNet" + }, + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vNetPrefix')]" + ] + }, + "subnets": [ + { + "name": "[variables('SubnetName')]", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('vNetPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('SubnetName')]", - "properties": { - "addressPrefix": "[variables('SubnetPrefix')]" - } - } - ] + "addressPrefix": "[variables('SubnetPrefix')]" } - } - ], - "outputs": { - "virtualNetworkResourceGroupName": { - "type": "string", - "value": "[resourceGroup().name]" - }, - "virtualNetworkName": { - "type": "string", - "value": "[parameters('vNetName')]" - }, - "subnetName": { - "type": "string", - "value": "[variables('SubnetName')]" - } + } + ] + } + } + ], + "outputs": { + "virtualNetworkResourceGroupName": { + "type": "string", + "value": "[resourceGroup().name]" + }, + "virtualNetworkName": { + "type": "string", + "value": "[parameters('vNetName')]" + }, + "subnetName": { + "type": "string", + "value": "[variables('SubnetName')]" } -} \ No newline at end of file + } +} diff --git a/201-nsg-dmz-in-vnet/azuredeploy.json b/201-nsg-dmz-in-vnet/azuredeploy.json index e8645616dcd8..b37a5f211ca8 100644 --- a/201-nsg-dmz-in-vnet/azuredeploy.json +++ b/201-nsg-dmz-in-vnet/azuredeploy.json @@ -57,6 +57,13 @@ "metadata": { "description": "This is name of the networkSecurityGroup that will be assigned to Database Subnet" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -64,7 +71,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[parameters('FENSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -102,7 +109,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[parameters('AppNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -154,7 +161,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[parameters('DBNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -220,7 +227,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', parameters('FENSGName'))]", "[concat('Microsoft.Network/networkSecurityGroups/', parameters('AppNSGName'))]", diff --git a/201-oms-extension-ubuntu-vm/azuredeploy.json b/201-oms-extension-ubuntu-vm/azuredeploy.json index 7c566a6f0ddb..9863ce8dbb60 100644 --- a/201-oms-extension-ubuntu-vm/azuredeploy.json +++ b/201-oms-extension-ubuntu-vm/azuredeploy.json @@ -43,6 +43,13 @@ "metadata": { "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values: 12.04.5-LTS, 14.04.2-LTS, 15.10." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -70,7 +77,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -79,7 +86,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -91,7 +98,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -112,7 +119,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -138,7 +145,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -187,7 +194,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '/Microsoft.EnterpriseCloud.Monitoring')]", "apiVersion": "[variables('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -207,4 +214,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/201-oms-extension-windows-vm/azuredeploy.json b/201-oms-extension-windows-vm/azuredeploy.json index 758c318cffaa..a7fcd20ac075 100644 --- a/201-oms-extension-windows-vm/azuredeploy.json +++ b/201-oms-extension-windows-vm/azuredeploy.json @@ -38,6 +38,13 @@ "metadata": { "description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: 2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter, Windows-Server-Technical-Preview." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -66,7 +73,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -75,7 +82,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -87,7 +94,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -108,7 +115,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -134,7 +141,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -183,7 +190,7 @@ "type": "extensions", "name": "Microsoft.EnterpriseCloud.Monitoring", "apiVersion": "[variables('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -203,4 +210,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/201-oms-extension-windows-vm/prereqs/prereq.azuredeploy.json b/201-oms-extension-windows-vm/prereqs/prereq.azuredeploy.json index a2ce25b2243b..4ca89f922eeb 100644 --- a/201-oms-extension-windows-vm/prereqs/prereq.azuredeploy.json +++ b/201-oms-extension-windows-vm/prereqs/prereq.azuredeploy.json @@ -1,32 +1,32 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "omsWorkspacename": { - "type": "string", - "metadata": { - "description": "OMS Workspace name" - } - } - }, - "variables": { - - }, - "resources": [{ - "name": "[parameters('omsWorkspacename')]", - "type": "Microsoft.OperationalInsights/workspaces", - "apiVersion": "2015-11-01-preview", - "location": "East US", - "properties": { - "sku": { - "name": "Free" - } - } - }], - "outputs": { - "workSpaceName": { - "type": "string", - "value": "[parameters('omsWorkspacename')]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "omsWorkspacename": { + "type": "string", + "metadata": { + "description": "OMS Workspace name" + } + } + }, + "variables": {}, + "resources": [ + { + "name": "[parameters('omsWorkspacename')]", + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "2015-11-01-preview", + "location": "East US", + "properties": { + "sku": { + "name": "Free" } + } + } + ], + "outputs": { + "workSpaceName": { + "type": "string", + "value": "[parameters('omsWorkspacename')]" } + } } diff --git a/201-ospatching-extension-on-ubuntu/azuredeploy.json b/201-ospatching-extension-on-ubuntu/azuredeploy.json index a4e6d68f3dc5..5d13620c8dc4 100644 --- a/201-ospatching-extension-on-ubuntu/azuredeploy.json +++ b/201-ospatching-extension-on-ubuntu/azuredeploy.json @@ -125,12 +125,17 @@ "metadata": { "description": "The access key of storage account." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "extensionName": "OSPatching", "scenarioPrefix": "ospatchingLinux", - "apiVersion": "2015-05-01-preview", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "ubuntuOSVersion": "14.04.2-LTS", @@ -153,7 +158,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -162,7 +167,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -174,7 +179,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -195,7 +200,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -221,7 +226,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -264,7 +269,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/installospatching')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -295,4 +300,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-ospatching-extension-on-ubuntu/prereqs/prereq.azuredeploy.json b/201-ospatching-extension-on-ubuntu/prereqs/prereq.azuredeploy.json index f5fe9840c6ec..aa381417dd34 100644 --- a/201-ospatching-extension-on-ubuntu/prereqs/prereq.azuredeploy.json +++ b/201-ospatching-extension-on-ubuntu/prereqs/prereq.azuredeploy.json @@ -1,35 +1,43 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store VM disks", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + } + ], + "outputs": { + "storageAccountName": { + "type": "string", + "value": "[variables('storageAccountName')]" }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "comments": "Storage account used to store VM disks", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": { - - } - }], - "outputs": { - "storageAccountName": { - "type": "string", - "value": "[variables('storageAccountName')]" - }, - "storageAccountKey": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value]" - } + "storageAccountKey": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value]" } -} \ No newline at end of file + } +} diff --git a/201-premium-storage-windows-vm/azuredeploy.json b/201-premium-storage-windows-vm/azuredeploy.json index 7d1aa89ab71a..82bc5f5f07dd 100644 --- a/201-premium-storage-windows-vm/azuredeploy.json +++ b/201-premium-storage-windows-vm/azuredeploy.json @@ -38,6 +38,13 @@ "metadata": { "description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: 2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter, Windows-Server-Technical-Preview." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -63,7 +70,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -72,7 +79,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -84,7 +91,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -105,7 +112,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -131,7 +138,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" diff --git a/201-recovery-services-backup-classic-resource-manager-vms/azuredeploy.json b/201-recovery-services-backup-classic-resource-manager-vms/azuredeploy.json index bf314e139223..c088bd2d6319 100644 --- a/201-recovery-services-backup-classic-resource-manager-vms/azuredeploy.json +++ b/201-recovery-services-backup-classic-resource-manager-vms/azuredeploy.json @@ -1,57 +1,64 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "existingRecoveryServicesVaultName": { - "type": "string", - "metadata": { - "description": "Name of the Existing Recovery Services Vault (Vault and VM to be protected must be in same GEO)" - } - }, - "existingProtectionContainers": { - "type": "array", - "metadata": { - "description": "Array of iaasvm protection containers. This will take different input for classic and ARM vms. e.g. iaasvmcontainer;iaasvmcontainerv2;my-resource-group;my-arm-vm for ARM vm and iaasvmcontainer;iaasvmcontainer;my-classic-vm;my-classic-vm for classic vm" - } - }, - "existingProtectableItems": { - "type": "array", - "metadata": { - "description": "Array of iaasvm protectable items. This will take different input for classic and ARM vms. e.g. vm;iaasvmcontainerv2;my-resource-group;my-arm-vm for ARM vm and vm;iaasvmcontainer;my-classic-vm;my-classic-vm for classic vm" - } - }, - "existingSourceResourceIds": { - "type": "array", - "metadata": { - "description": "Array of resourceid of iaasvm protectable items. Provide resourceids of each VMs for which you want to configure protection. e.g. /subscriptions/subscriptionid/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/vmName" - } - }, - "existingBackupPolicyName": { - "type": "string", - "metadata": { - "description": "Name of existing Backup Policy in same Recovery Services Vault." - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "existingRecoveryServicesVaultName": { + "type": "string", + "metadata": { + "description": "Name of the Existing Recovery Services Vault (Vault and VM to be protected must be in same GEO)" + } }, - "variables": { - "backupFabric": "Azure", - "protectedItemType": "Microsoft.ClassicCompute/virtualMachines" + "existingProtectionContainers": { + "type": "array", + "metadata": { + "description": "Array of iaasvm protection containers. This will take different input for classic and ARM vms. e.g. iaasvmcontainer;iaasvmcontainerv2;my-resource-group;my-arm-vm for ARM vm and iaasvmcontainer;iaasvmcontainer;my-classic-vm;my-classic-vm for classic vm" + } }, - "resources": [ - { - "name": "[concat(parameters('existingRecoveryServicesVaultName'), '/', variables('backupFabric'), '/', parameters('existingProtectionContainers')[copyIndex()], '/', parameters('existingProtectableItems')[copyIndex()])]", - "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", - "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", - "copy": { - "name": "protectedItemsCopy", - "count": "[length(parameters('existingProtectableItems'))]" - }, - "properties": { - "protectedItemType": "[variables('protectedItemType')]", - "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies', parameters('existingRecoveryServicesVaultName'), parameters('existingBackupPolicyName'))]", - "sourceResourceId": "[parameters('existingSourceResourceIds')[copyIndex()]]" - } - } - ] + "existingProtectableItems": { + "type": "array", + "metadata": { + "description": "Array of iaasvm protectable items. This will take different input for classic and ARM vms. e.g. vm;iaasvmcontainerv2;my-resource-group;my-arm-vm for ARM vm and vm;iaasvmcontainer;my-classic-vm;my-classic-vm for classic vm" + } + }, + "existingSourceResourceIds": { + "type": "array", + "metadata": { + "description": "Array of resourceid of iaasvm protectable items. Provide resourceids of each VMs for which you want to configure protection. e.g. /subscriptions/subscriptionid/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/vmName" + } + }, + "existingBackupPolicyName": { + "type": "string", + "metadata": { + "description": "Name of existing Backup Policy in same Recovery Services Vault." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "backupFabric": "Azure", + "protectedItemType": "Microsoft.ClassicCompute/virtualMachines" + }, + "resources": [ + { + "name": "[concat(parameters('existingRecoveryServicesVaultName'), '/', variables('backupFabric'), '/', parameters('existingProtectionContainers')[copyIndex()], '/', parameters('existingProtectableItems')[copyIndex()])]", + "apiVersion": "2016-06-01", + "location": "[parameters('location')]", + "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", + "copy": { + "name": "protectedItemsCopy", + "count": "[length(parameters('existingProtectableItems'))]" + }, + "properties": { + "protectedItemType": "[variables('protectedItemType')]", + "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies', parameters('existingRecoveryServicesVaultName'), parameters('existingBackupPolicyName'))]", + "sourceResourceId": "[parameters('existingSourceResourceIds')[copyIndex()]]" + } + } + ] } diff --git a/201-redis-premium-cluster-diagnostics/prereqs/prereq.azuredeploy.json b/201-redis-premium-cluster-diagnostics/prereqs/prereq.azuredeploy.json index bfe57b2af4e7..a462f9fce101 100644 --- a/201-redis-premium-cluster-diagnostics/prereqs/prereq.azuredeploy.json +++ b/201-redis-premium-cluster-diagnostics/prereqs/prereq.azuredeploy.json @@ -1,32 +1,39 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - }, - "variables": { - "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" - }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "comments": "Storage account used to store VM disks", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": { - - } - }], - "outputs": { - "diagStorageName": { - "type": "string", - "value": "[variables('storageAccountName')]" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } + }, + "variables": { + "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store VM disks", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + } + ], + "outputs": { + "diagStorageName": { + "type": "string", + "value": "[variables('storageAccountName')]" + } + } } diff --git a/201-redis-premium-persistence/prereqs/prereq.azuredeploy.json b/201-redis-premium-persistence/prereqs/prereq.azuredeploy.json index 5e6286869120..fc0d56a743d3 100644 --- a/201-redis-premium-persistence/prereqs/prereq.azuredeploy.json +++ b/201-redis-premium-persistence/prereqs/prereq.azuredeploy.json @@ -1,62 +1,69 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "storageAccountName": "[concat('str1',uniqueString(resourceGroup().id))]", - "storageAccountName2": "[concat('str2',uniqueString(resourceGroup().id))]" - }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "West US", - "comments": "Premium Storage account used as Redis Backup storage", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Premium_LRS" - }, - "kind": "Storage", - "properties": { - "encryption": { - "services": { - "blob": { - "enabled": false - }, - "file": null - }, - "keySource": "Microsoft.Storage" - } - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName2')]", - "apiVersion": "2016-01-01", - "location": "West US", - "comments": "Storage account used for storing diagnostic logs", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountName": "[concat('str1',uniqueString(resourceGroup().id))]", + "storageAccountName2": "[concat('str2',uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Premium Storage account used as Redis Backup storage", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Premium_LRS" + }, + "kind": "Storage", + "properties": { + "encryption": { + "services": { + "blob": { + "enabled": false }, - "kind": "Storage", - "properties": { - - } - } - ], - "outputs": { - "diagStorageName": { - "type": "string", - "value": "[variables('storageAccountName2')]" - }, - "rdbBackupStorConnString": { - "type": "string", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value)]" + "file": null + }, + "keySource": "Microsoft.Storage" } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName2')]", + "apiVersion": "2016-01-01", + "location": "West US", + "comments": "Storage account used for storing diagnostic logs", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + } + ], + "outputs": { + "diagStorageName": { + "type": "string", + "value": "[variables('storageAccountName2')]" + }, + "rdbBackupStorConnString": { + "type": "string", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value)]" } + } } diff --git a/201-redis-premium-vnet-cluster-diagnostics/prereqs/prereq.azuredeploy.json b/201-redis-premium-vnet-cluster-diagnostics/prereqs/prereq.azuredeploy.json index 848ffd112ab2..45270ebe3507 100644 --- a/201-redis-premium-vnet-cluster-diagnostics/prereqs/prereq.azuredeploy.json +++ b/201-redis-premium-vnet-cluster-diagnostics/prereqs/prereq.azuredeploy.json @@ -1,76 +1,84 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "storageAccountName": { - "type": "string", - "metadata": { - "description": "The name of the Premium Storage." - } - } - }, - "variables": { - "existingVirtualNetworkName": "vnet", - "existingSubnetName": "subnet-1" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "storageAccountName": { + "type": "string", + "metadata": { + "description": "The name of the Premium Storage." + } }, - "resources": [{ - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('existingVirtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" - }, - "dependsOn": [], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "[variables('existingSubnetName')]", - "properties": { - "addressPrefix": "10.0.1.0/24" - } - }] - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "existingVirtualNetworkName": "vnet", + "existingSubnetName": "subnet-1" + }, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('existingVirtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "comments": "Storage account used to store VM disks", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", + "subnets": [ + { + "name": "[variables('existingSubnetName')]", "properties": { - + "addressPrefix": "10.0.1.0/24" } - } - ], - "outputs": { - "virtualNetwork": { - "type": "string", - "value": "[resourceId('Microsoft.Network/virtualNetworks',variables('existingVirtualNetworkName'))]" - }, - "subnet": { - "type": "string", - "value": "[variables('existingSubnetName')]" - }, - "existingDiagStorageName": { - "type": "string", - "value": "[parameters('storageAccountName')]" - }, - "redisCacheStaticIP": { - "type": "string", - "value": "10.0.1.5" - } + } + ] + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store VM disks", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + } + ], + "outputs": { + "virtualNetwork": { + "type": "string", + "value": "[resourceId('Microsoft.Network/virtualNetworks',variables('existingVirtualNetworkName'))]" + }, + "subnet": { + "type": "string", + "value": "[variables('existingSubnetName')]" + }, + "existingDiagStorageName": { + "type": "string", + "value": "[parameters('storageAccountName')]" + }, + "redisCacheStaticIP": { + "type": "string", + "value": "10.0.1.5" } -} \ No newline at end of file + } +} diff --git a/201-reserved-ip/azuredeploy.json b/201-reserved-ip/azuredeploy.json index 037c9e61820e..df17c7a0c407 100644 --- a/201-reserved-ip/azuredeploy.json +++ b/201-reserved-ip/azuredeploy.json @@ -1,151 +1,142 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "existingRIPSubId": { - "type": "string", - "metadata": { - "description": "The ID of the subscription containing your existing reserved IP." - } - }, - "existingRIPResourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the resource group containing your existing reserved IP." - } - }, - "existingRIPName": { - "type": "string", - "metadata": { - "description": "The name of your existing reserved IP." - } - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "existingRIPSubId": { + "type": "string", + "metadata": { + "description": "The ID of the subscription containing your existing reserved IP." + } + }, + "existingRIPResourceGroupName": { + "type": "string", + "metadata": { + "description": "The name of the resource group containing your existing reserved IP." + } }, - "variables": { - "network_LB_Public_Name": "publicLB", - "network_LB_Public_Id": "[resourceId('Microsoft.Network/loadBalancers',variables('network_LB_Public_Name'))]", - "network_LB_Public_FEName": "publicLBFE", - "network_LB_Public_FEId": "[concat(variables('network_LB_Public_Id'),'/frontendIPConfigurations/',variables('network_LB_Public_FEName'))]", - "network_LB_Public_BEName": "publicLBBE", - "network_LB_Public_BEId": "[concat(variables('network_LB_Public_Id'),'/backendIPConfigurations/',variables('network_LB_Public_FEName'))]", - "network_LB_Public_BEPoolName": "publicLBBEPool", - "network_LB_Public_BEPoolId": "[concat(variables('network_LB_Public_Id'),'/backendAddressPools/',variables('network_LB_Public_BEPoolName'))]", - - "network_LB_Public_NatRule_SSH_vm_Name": "fg1SSHNat", - "network_LB_Public_NatRule_SSH_vm_Id": "[concat(variables('network_LB_Public_Id'),'/inboundNatRules/',variables('network_LB_Public_NatRule_SSH_vm_Name'))]", - "network_LB_Public_NatRule_SSH_vm_PublicPort": "50101", - - "network_LB_Public_Name2": "publicLB2", - "network_LB_Public_Id2": "[resourceId('Microsoft.Network/loadBalancers',variables('network_LB_Public_Name2'))]", - "network_LB_Public_FEName2": "publicLBFE2", - "network_LB_Public_FEId2": "[concat(variables('network_LB_Public_Id2'),'/frontendIPConfigurations/',variables('network_LB_Public_FEName2'))]", - "network_LB_Public_BEName2": "publicLBBE2", - "network_LB_Public_BEId2": "[concat(variables('network_LB_Public_Id2'),'/backendIPConfigurations/',variables('network_LB_Public_FEName2'))]", - "network_LB_Public_BEPoolName2": "publicLBBEPool2", - "network_LB_Public_BEPoolId2": "[concat(variables('network_LB_Public_Id2'),'/backendAddressPools/',variables('network_LB_Public_BEPoolName2'))]", - - "network_LB_Public_NatRule_SSH_vm_Name2": "fg1SSHNat2", - "network_LB_Public_NatRule_SSH_vm_Id2": "[concat(variables('network_LB_Public_Id2'),'/inboundNatRules/',variables('network_LB_Public_NatRule_SSH_vm_Name2'))]", - "network_LB_Public_NatRule_SSH_vm_PublicPort2": "50101", - - "network_PIP_Reserved_Name": "goliveARMPIP", - "network_PIP_Reserved_Id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('network_PIP_Reserved_Name'))]", - "network_PIP_Reserved_FQDN": "golivereservedip", - - "network_PIP_Reserved_Name2": "[parameters('existingRIPName')]", - "network_PIP_Reserved_Id2": "[concat('/subscriptions/',parameters('existingRIPSubId'),'/resourceGroups/',parameters('existingRIPResourceGroupName'),'/providers/Microsoft.Network/publicIPAddresses/',parameters('existingRIPName'))]", - "network_PIP_Reserved_FQDN2": "golivereservedip2" - + "existingRIPName": { + "type": "string", + "metadata": { + "description": "The name of your existing reserved IP." + } }, - "resources": [ - { - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('network_PIP_Reserved_Name')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "network_LB_Public_Name": "publicLB", + "network_LB_Public_Id": "[resourceId('Microsoft.Network/loadBalancers',variables('network_LB_Public_Name'))]", + "network_LB_Public_FEName": "publicLBFE", + "network_LB_Public_FEId": "[concat(variables('network_LB_Public_Id'),'/frontendIPConfigurations/',variables('network_LB_Public_FEName'))]", + "network_LB_Public_BEPoolName": "publicLBBEPool", + "network_LB_Public_NatRule_SSH_vm_Name": "fg1SSHNat", + "network_LB_Public_NatRule_SSH_vm_PublicPort": "50101", + "network_LB_Public_Name2": "publicLB2", + "network_LB_Public_Id2": "[resourceId('Microsoft.Network/loadBalancers',variables('network_LB_Public_Name2'))]", + "network_LB_Public_FEName2": "publicLBFE2", + "network_LB_Public_FEId2": "[concat(variables('network_LB_Public_Id2'),'/frontendIPConfigurations/',variables('network_LB_Public_FEName2'))]", + "network_LB_Public_BEPoolName2": "publicLBBEPool2", + "network_LB_Public_NatRule_SSH_vm_Name2": "fg1SSHNat2", + "network_LB_Public_NatRule_SSH_vm_PublicPort2": "50101", + "network_PIP_Reserved_Name": "goliveARMPIP", + "network_PIP_Reserved_Id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('network_PIP_Reserved_Name'))]", + "network_PIP_Reserved_FQDN": "golivereservedip", + "network_PIP_Reserved_Id2": "[concat('/subscriptions/',parameters('existingRIPSubId'),'/resourceGroups/',parameters('existingRIPResourceGroupName'),'/providers/Microsoft.Network/publicIPAddresses/',parameters('existingRIPName'))]", + }, + "resources": [ + { + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('network_PIP_Reserved_Name')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[variables('network_PIP_Reserved_FQDN')]" + } + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "name": "[variables('network_LB_Public_Name')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[variables('network_PIP_Reserved_Id')]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('network_LB_Public_FEName')]", "properties": { - "publicIPAllocationMethod": "Static", - "dnsSettings": { - "domainNameLabel": "[variables('network_PIP_Reserved_FQDN')]" - } + "publicIPAddress": { + "id": "[variables('network_PIP_Reserved_Id')]" + } } - }, - { - "type": "Microsoft.Network/loadBalancers", - "name": "[variables('network_LB_Public_Name')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[variables('network_PIP_Reserved_Id')]" - ], + } + ], + "backendAddressPools": [ + { + "name": "[variables('network_LB_Public_BEPoolName')]" + } + ], + "inboundNatRules": [ + { + "name": "[variables('network_LB_Public_NatRule_SSH_vm_Name')]", "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('network_LB_Public_FEName')]", - "properties": { - "publicIPAddress": { - "id": "[variables('network_PIP_Reserved_Id')]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('network_LB_Public_BEPoolName')]" - } - ], - "inboundNatRules": [ - { - "name": "[variables('network_LB_Public_NatRule_SSH_vm_Name')]", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('network_LB_Public_FEId')]" - }, - "protocol": "tcp", - "frontendPort": "[variables('network_LB_Public_NatRule_SSH_vm_PublicPort')]", - "backendPort": 22, - "enableFloatingIP": false - } - } - ] + "frontendIPConfiguration": { + "id": "[variables('network_LB_Public_FEId')]" + }, + "protocol": "tcp", + "frontendPort": "[variables('network_LB_Public_NatRule_SSH_vm_PublicPort')]", + "backendPort": 22, + "enableFloatingIP": false } - }, - { - "type": "Microsoft.Network/loadBalancers", - "name": "[variables('network_LB_Public_Name2')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + } + ] + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "name": "[variables('network_LB_Public_Name2')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('network_LB_Public_FEName2')]", "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('network_LB_Public_FEName2')]", - "properties": { - "publicIPAddress": { - "id": "[variables('network_PIP_Reserved_Id2')]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('network_LB_Public_BEPoolName2')]" - } - ], - "inboundNatRules": [ - { - "name": "[variables('network_LB_Public_NatRule_SSH_vm_Name2')]", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('network_LB_Public_FEId2')]" - }, - "protocol": "tcp", - "frontendPort": "[variables('network_LB_Public_NatRule_SSH_vm_PublicPort2')]", - "backendPort": 22, - "enableFloatingIP": false - } - } - ] + "publicIPAddress": { + "id": "[variables('network_PIP_Reserved_Id2')]" + } } - } - ] + } + ], + "backendAddressPools": [ + { + "name": "[variables('network_LB_Public_BEPoolName2')]" + } + ], + "inboundNatRules": [ + { + "name": "[variables('network_LB_Public_NatRule_SSH_vm_Name2')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('network_LB_Public_FEId2')]" + }, + "protocol": "tcp", + "frontendPort": "[variables('network_LB_Public_NatRule_SSH_vm_PublicPort2')]", + "backendPort": 22, + "enableFloatingIP": false + } + } + ] + } + } + ] } diff --git a/201-reserved-ip/prereqs/prereq.azuredeploy.json b/201-reserved-ip/prereqs/prereq.azuredeploy.json index 2dc9c7cfe759..75cda64b0ea1 100644 --- a/201-reserved-ip/prereqs/prereq.azuredeploy.json +++ b/201-reserved-ip/prereqs/prereq.azuredeploy.json @@ -1,40 +1,50 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "existingpipname": "[concat(uniqueString(resourceGroup().id),'pip')]", - "existingpiplabel": "[concat(uniqueString(resourceGroup().id),'pip')]" - }, - "resources": [{ - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('existingpipname')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": " Public IP used by LB", - "tags": { - "displayName": "Public IP" - }, - "properties": { - "publicIPAllocationMethod": "Static", - "dnsSettings": { - "domainNameLabel": "[variables('existingpiplabel')]" - }, - "idleTimeoutInMinutes": 4 - } - }], - "outputs": { - "existingPipRgName": { - "type": "string", - "value": "[resourceGroup().name]" - }, - "existingPipName": { - "type": "string", - "value": "[variables('existingpipname')]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "existingpipname": "[concat(uniqueString(resourceGroup().id),'pip')]", + "existingpiplabel": "[concat(uniqueString(resourceGroup().id),'pip')]" + }, + "resources": [ + { + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('existingpipname')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": " Public IP used by LB", + "tags": { + "displayName": "Public IP" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[variables('existingpiplabel')]" }, - "existingPipSubId": { - "type": "string", - "value": "[subscription().subscriptionId]" - } + "idleTimeoutInMinutes": 4 + } + } + ], + "outputs": { + "existingPipRgName": { + "type": "string", + "value": "[resourceGroup().name]" + }, + "existingPipName": { + "type": "string", + "value": "[variables('existingpipname')]" + }, + "existingPipSubId": { + "type": "string", + "value": "[subscription().subscriptionId]" } + } } diff --git a/201-servicebus-create-queue/azuredeploy.json b/201-servicebus-create-queue/azuredeploy.json index cde7f7cf0089..d83f722ba66a 100644 --- a/201-servicebus-create-queue/azuredeploy.json +++ b/201-servicebus-create-queue/azuredeploy.json @@ -13,19 +13,26 @@ "metadata": { "description": "Name of the Queue" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "defaultSASKeyName": "RootManageSharedAccessKey", "authRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('serviceBusNamespaceName'), variables('defaultSASKeyName'))]", - "sbVersion": "2017-04-01" + "sbVersion": "2017-04-01" }, "resources": [ { "apiVersion": "2017-04-01", "name": "[parameters('serviceBusNamespaceName')]", "type": "Microsoft.ServiceBus/namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard" }, @@ -65,4 +72,4 @@ "value": "[listkeys(variables('authRuleResourceId'), variables('sbVersion')).primaryKey]" } } -} \ No newline at end of file +} diff --git a/201-servicebus-create-topic-and-subscription/azuredeploy.json b/201-servicebus-create-topic-and-subscription/azuredeploy.json index a7725549c99d..2e64548b3692 100644 --- a/201-servicebus-create-topic-and-subscription/azuredeploy.json +++ b/201-servicebus-create-topic-and-subscription/azuredeploy.json @@ -19,19 +19,26 @@ "metadata": { "description": "Name of the Subscription" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "defaultSASKeyName": "RootManageSharedAccessKey", "authRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('serviceBusNamespaceName'), variables('defaultSASKeyName'))]", - "sbVersion": "2017-04-01" + "sbVersion": "2017-04-01" }, "resources": [ { "apiVersion": "2017-04-01", "name": "[parameters('serviceBusNamespaceName')]", "type": "Microsoft.ServiceBus/namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard" }, @@ -87,4 +94,4 @@ "value": "[listkeys(variables('authRuleResourceId'), variables('sbVersion')).primaryKey]" } } -} \ No newline at end of file +} diff --git a/201-servicebus-create-topic-subscription-rule/azuredeploy.json b/201-servicebus-create-topic-subscription-rule/azuredeploy.json index c1a0993edc07..fbb904275039 100644 --- a/201-servicebus-create-topic-subscription-rule/azuredeploy.json +++ b/201-servicebus-create-topic-subscription-rule/azuredeploy.json @@ -25,20 +25,27 @@ "metadata": { "description": "Name of the Rule" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "defaultSASKeyName": "RootManageSharedAccessKey", "authRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('serviceBusNamespaceName'), variables('defaultSASKeyName'))]", - "sbVersion": "2017-04-01" + "sbVersion": "2017-04-01" }, "resources": [ { "apiVersion": "2017-04-01", "name": "[parameters('serviceBusNamespaceName')]", "type": "Microsoft.ServiceBus/namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard" }, diff --git a/201-spinnaker-acr-k8s/azuredeploy.json b/201-spinnaker-acr-k8s/azuredeploy.json index b1ed8d2aad0a..08e71bc8d8a1 100644 --- a/201-spinnaker-acr-k8s/azuredeploy.json +++ b/201-spinnaker-acr-k8s/azuredeploy.json @@ -60,6 +60,13 @@ "description": "If including a pipeline, the repository in your registry used to trigger the pipeline. It will only be triggered when a new tag is pushed." }, "defaultValue": "lwander/spin-kub-demo" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -86,7 +93,7 @@ { "apiVersion": "2016-09-30", "type": "Microsoft.ContainerService/containerServices", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[variables('kubernetesName')]", "properties": { "orchestratorProfile": { @@ -124,7 +131,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, @@ -135,7 +142,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -147,7 +154,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -168,7 +175,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" @@ -194,7 +201,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" @@ -253,7 +260,7 @@ "type": "extensions", "name": "[variables('vmExtensionName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]", "[resourceId('Microsoft.ContainerService/containerServices', variables('kubernetesName'))]", @@ -280,7 +287,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('acrStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "kind": "Storage", "sku": { "name": "Standard_LRS" @@ -299,7 +306,7 @@ { "name": "[variables('acrPrefix')]", "type": "Microsoft.ContainerRegistry/registries", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-03-01", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('acrStorageAccountName'))]" @@ -338,4 +345,4 @@ "value": "[reference(resourceId('Microsoft.ContainerRegistry/registries', variables('acrPrefix'))).loginServer]" } } -} \ No newline at end of file +} diff --git a/201-sql-database-transparent-encryption-create/azuredeploy.json b/201-sql-database-transparent-encryption-create/azuredeploy.json index 4a22977ee774..8914815f71da 100644 --- a/201-sql-database-transparent-encryption-create/azuredeploy.json +++ b/201-sql-database-transparent-encryption-create/azuredeploy.json @@ -24,6 +24,13 @@ "metadata": { "description": "Enable or disable Transparent Data Encryption (TDE) for the database." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -38,7 +45,7 @@ "name": "[variables('sqlServerName')]", "type": "Microsoft.Sql/servers", "apiVersion": "2014-04-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "SqlServer" }, @@ -52,7 +59,7 @@ "name": "[variables('databaseName')]", "type": "databases", "apiVersion": "2015-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "Database" }, @@ -83,7 +90,7 @@ "name": "AllowAllMicrosoftAzureIps", "type": "firewallrules", "apiVersion": "2014-04-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "endIpAddress": "0.0.0.0", "startIpAddress": "0.0.0.0" @@ -105,4 +112,4 @@ "value": "[variables('databaseName')]" } } -} \ No newline at end of file +} diff --git a/201-storage-account-service-encryption-create/azuredeploy.json b/201-storage-account-service-encryption-create/azuredeploy.json index 2743b3a7b9c0..51789371dbc3 100644 --- a/201-storage-account-service-encryption-create/azuredeploy.json +++ b/201-storage-account-service-encryption-create/azuredeploy.json @@ -22,6 +22,13 @@ "metadata": { "description": "Enable or disable Blob encryption at Rest." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -32,7 +39,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-12-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[parameters('storageAccountType')]" }, @@ -55,4 +62,4 @@ "value": "[variables('storageAccountName')]" } } -} \ No newline at end of file +} diff --git a/201-timeseriesinsights-environment-with-eventhub/azuredeploy.json b/201-timeseriesinsights-environment-with-eventhub/azuredeploy.json index 002cd039b5de..1cd2ed566aeb 100644 --- a/201-timeseriesinsights-environment-with-eventhub/azuredeploy.json +++ b/201-timeseriesinsights-environment-with-eventhub/azuredeploy.json @@ -112,6 +112,13 @@ "metadata": { "description": "A list of object ids of the users or applications in AAD that should have Contributor access to the environment. The service principal objectId can be obtained by calling the Get-AzureRMADUser or the Get-AzureRMADServicePrincipal cmdlets. Creating an access policy for AAD groups is not yet supported." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -138,7 +145,7 @@ "apiVersion": "2017-04-01", "name": "[parameters('eventHubNamespaceName')]", "type": "Microsoft.EventHub/Namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard" }, @@ -165,7 +172,7 @@ "type": "AuthorizationRules", "name": "[parameters('eventSourceKeyName')]", "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[parameters('eventHubName')]" ], @@ -194,7 +201,7 @@ "type": "Microsoft.TimeSeriesInsights/environments", "name": "[parameters('environmentName')]", "apiVersion": "2017-11-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "dataRetentionTime": "[parameters('environmentDataRetentionTime')]" }, @@ -208,12 +215,12 @@ "type": "eventsources", "name": "[parameters('eventSourceName')]", "apiVersion": "2017-11-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "kind": "Microsoft.EventHub", "properties": { "eventSourceResourceId": "[variables('eventSourceResourceId')]", "eventHubName": "[parameters('eventHubName')]", - "serviceBusNamespace" : "[parameters('eventHubNamespaceName')]", + "serviceBusNamespace": "[parameters('eventHubNamespaceName')]", "consumerGroupName": "[parameters('consumerGroupName')]", "keyName": "[parameters('eventSourceKeyName')]", "sharedAccessKey": "[listkeys(variables('authorizationRuleResourceId'), '2017-04-01').primaryKey]", @@ -232,14 +239,16 @@ "condition": "[not(empty(parameters('accessPolicyReaderObjectIds')))]", "type": "Microsoft.TimeSeriesInsights/environments/accesspolicies", "name": "[concat(parameters('environmentName'), '/', 'readerAccessPolicy', copyIndex())]", - "copy": { - "name": "accessPolicyReaderCopy", + "copy": { + "name": "accessPolicyReaderCopy", "count": "[if(empty(parameters('accessPolicyReaderObjectIds')), 1, length(parameters('accessPolicyReaderObjectIds')))]" }, "apiVersion": "2017-11-15", "properties": { "principalObjectId": "[parameters('accessPolicyReaderObjectIds')[copyIndex()]]", - "roles": ["Reader"] + "roles": [ + "Reader" + ] }, "dependsOn": [ "[concat('Microsoft.TimeSeriesInsights/environments/', parameters('environmentName'))]" @@ -249,14 +258,16 @@ "condition": "[not(empty(parameters('accessPolicyContributorObjectIds')))]", "type": "Microsoft.TimeSeriesInsights/environments/accesspolicies", "name": "[concat(parameters('environmentName'), '/', 'contributorAccessPolicy', copyIndex())]", - "copy": { - "name": "accessPolicyReaderCopy", + "copy": { + "name": "accessPolicyReaderCopy", "count": "[if(empty(parameters('accessPolicyContributorObjectIds')), 1, length(parameters('accessPolicyContributorObjectIds')))]" }, "apiVersion": "2017-11-15", "properties": { "principalObjectId": "[parameters('accessPolicyContributorObjectIds')[copyIndex()]]", - "roles": ["Contributor"] + "roles": [ + "Contributor" + ] }, "dependsOn": [ "[concat('Microsoft.TimeSeriesInsights/environments/', parameters('environmentName'))]" @@ -269,4 +280,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/201-userdefined-routes-appliance/azuredeploy.json b/201-userdefined-routes-appliance/azuredeploy.json index e2dc9f64db41..00e3f3f43e01 100644 --- a/201-userdefined-routes-appliance/azuredeploy.json +++ b/201-userdefined-routes-appliance/azuredeploy.json @@ -49,6 +49,13 @@ "metadata": { "description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: 2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -78,7 +85,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('uniqueDnsPrefixForVM'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "pubIPLoop", "count": "[variables('scaleNumber')]" @@ -94,7 +101,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "DefaultNSG", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -118,7 +125,7 @@ "type": "Microsoft.Network/routeTables", "name": "[variables('routeTableName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "routes": [ { @@ -136,7 +143,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('VNetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/routeTables/', variables('routeTableName'))]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgname'))]" @@ -185,7 +192,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "Nic0", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('VNetName'))]", "[concat('Microsoft.Network/publicIPAddresses/', parameters('uniqueDnsPrefixForVM'), '0')]" @@ -211,7 +218,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "Nic1", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('uniqueDnsPrefixForVM'), '1')]", "[concat('Microsoft.Network/virtualNetworks/', variables('VNetName'))]" @@ -239,7 +246,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "Nic2", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('uniqueDnsPrefixForVM'), '2')]", "[concat('Microsoft.Network/virtualNetworks/', variables('VNetName'))]" @@ -265,7 +272,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('vmNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "vmLoop", "count": "[variables('scaleNumber')]" @@ -305,4 +312,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-vm-copy-index-loops/azuredeploy.json b/201-vm-copy-index-loops/azuredeploy.json index 75d3c1575a1e..93c15800786e 100644 --- a/201-vm-copy-index-loops/azuredeploy.json +++ b/201-vm-copy-index-loops/azuredeploy.json @@ -33,6 +33,13 @@ "metadata": { "description": "OS Platform for the VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -61,18 +68,18 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", - "properties": { - "platformFaultDomainCount": 2, - "platformUpdateDomainCount": 2, - "managed" : true - } + "location": "[parameters('location')]", + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 2, + "managed": true + } }, { "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -93,7 +100,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nic', copyindex())]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[parameters('numberOfInstances')]" @@ -119,7 +126,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('myvm', copyIndex())]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineLoop", "count": "[parameters('numberOfInstances')]" diff --git a/201-vm-copy-managed-disks/azuredeploy.json b/201-vm-copy-managed-disks/azuredeploy.json index 9d9960c1c2ac..ae3bdd6fa8ec 100644 --- a/201-vm-copy-managed-disks/azuredeploy.json +++ b/201-vm-copy-managed-disks/azuredeploy.json @@ -70,6 +70,13 @@ "metadata": { "description": "Globally unique DNS prefix for the Public IPs used to access the Virtual Machines" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -99,7 +106,7 @@ { "name": "[variables('myVNETName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [], "tags": { @@ -124,7 +131,7 @@ { "name": "[variables('diagnosticStorageAccountName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-01-01", "sku": { "name": "Standard_LRS" @@ -139,7 +146,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('availabilitySetName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": "[variables('availabilitySetPlatformFaultDomainCount')]", "platformUpdateDomainCount": "[variables('availabilitySetPlatformUpdateDomainCount')]" @@ -152,7 +159,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('virtualMachineNamePrefix'), copyIndex(1))]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "VMcopy", "count": "[parameters('virtualMachineCount')]" @@ -200,7 +207,6 @@ "bootDiagnostics": { "enabled": true, "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('diagnosticStorageAccountName')), '2016-01-01').primaryEndpoints.blob]" - } } }, @@ -214,7 +220,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('virtualMachineNamePrefix'), copyIndex(1), '-NIC1')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "NICCopy", "count": "[parameters('virtualMachineCount')]" @@ -228,11 +234,11 @@ "publicIPAddress": { "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('virtualMachineNamePrefix'), copyIndex(1), '-PIP1'))]" }, - "subnet": { - "id": "[variables('subnetRef')]" - } + "subnet": { + "id": "[variables('subnetRef')]" } } + } ], "dnsSettings": { "dnsServers": [] @@ -248,7 +254,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('virtualMachineNamePrefix'), copyIndex(1), '-PIP1')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "PIPCopy", "count": "[parameters('virtualMachineCount')]" @@ -264,5 +270,5 @@ } } ], - "outputs": {} - } + "outputs": {} +} diff --git a/201-vm-custom-image-new-storage-account/azuredeploy.json b/201-vm-custom-image-new-storage-account/azuredeploy.json index 9e0988aed9e0..28b879b56b9b 100644 --- a/201-vm-custom-image-new-storage-account/azuredeploy.json +++ b/201-vm-custom-image-new-storage-account/azuredeploy.json @@ -73,6 +73,13 @@ "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": { @@ -105,9 +112,9 @@ { "name": "[variables('StorageAccountName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-10-01", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "StorageAccount" }, @@ -119,7 +126,7 @@ { "name": "[variables('VirtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-11-01", "tags": { "displayName": "vnet" @@ -143,9 +150,9 @@ { "name": "[variables('publicIpNames')[copyIndex()]]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-11-01", - "dependsOn": [ ], + "dependsOn": [], "copy": { "count": "[variables('vmCount')]", "name": "pipCopy" @@ -160,7 +167,7 @@ { "name": "[variables('nicNames')[copyIndex()]]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-11-01", "copy": { "count": "[variables('vmCount')]", @@ -194,7 +201,7 @@ "comments": "# TRANSFER VM", "name": "[variables('vmNames')[0]]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-12-01", "dependsOn": [ "[variables('storageAccountName')]", @@ -242,7 +249,7 @@ "apiVersion": "2017-12-01", "type": "extensions", "name": "[concat(variables('VMNames')[0],'CustomScriptExtension')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('vmNames')[0]]" ], @@ -254,7 +261,7 @@ "settings": { "fileUris": [ "[concat(parameters('_artifactsLocation'), '/ImageTransfer.ps1', parameters('_artifactsLocationSasToken'))]" - ] + ] }, "protectedSettings": { "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File ', 'ImageTransfer.ps1 -SourceImage ', parameters('sourceImageURI'), ' -SourceSAKey ', listKeys(resourceId(parameters('sourceStorageAccountResourceGroup'), 'Microsoft.Storage/storageAccounts', variables('sourceStorageAccountName')), '2017-10-01').keys[0].value, ' -DestinationURI ', concat(reference(variables('storageAccountName')).primaryEndpoints.blob, variables('vhdStorageAccountContainerName')), ' -DestinationSAKey ', listKeys(concat('Microsoft.Storage/storageAccounts/', variables('StorageAccountName')), '2017-10-01').keys[0].value)]" @@ -267,7 +274,7 @@ "comments": "# New Windows VM based on custom image", "name": "[variables('vmNames')[1]]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-12-01", "dependsOn": [ "[variables('StorageAccountName')]", @@ -310,6 +317,5 @@ } } ], - "outputs": { - } + "outputs": {} } diff --git a/201-vm-custom-script-windows/azuredeploy.json b/201-vm-custom-script-windows/azuredeploy.json index babd9b46ac69..954e46bb0234 100644 --- a/201-vm-custom-script-windows/azuredeploy.json +++ b/201-vm-custom-script-windows/azuredeploy.json @@ -1,174 +1,181 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "metadata": { - "description": "Username for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vm-custom-script-windows" - }, - "_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": "" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username for the Virtual Machine." + } }, - "variables": { - "nicName": "myVMNic", - "addressPrefix": "10.0.0.0/16", - "subnetName": "Subnet", - "subnetPrefix": "10.0.0.0/24", - "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]", - "vmName": "MyVM", - "virtualNetworkName": "MyVNET", - "publicIPAddressName": "myPublicIP", - "dnsNameForPublicIP": "[uniqueString(resourceGroup().id)]", - "scriptFolder": ".", - "scriptFileName": "Copy-FileFromAzure.ps1", - "fileToBeCopied": "FileToBeCopied.txt", - "scriptParameters": "[concat('-artifactsLocation ', parameters('_artifactsLocation'), ' -artifactsLocationSasToken \"', parameters('_artifactsLocationSasToken'), '\" -folderName ', variables('scriptFolder'), ' -fileToInstall ', variables('fileToBeCopied'))]" + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the Virtual Machine." + } }, - "resources": [ - { - "apiVersion": "2016-09-01", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('dnsNameForPublicIP')]" - } - } + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vm-custom-script-windows" + }, + "_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": { + "nicName": "myVMNic", + "addressPrefix": "10.0.0.0/16", + "subnetName": "Subnet", + "subnetPrefix": "10.0.0.0/24", + "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]", + "vmName": "MyVM", + "virtualNetworkName": "MyVNET", + "publicIPAddressName": "myPublicIP", + "dnsNameForPublicIP": "[uniqueString(resourceGroup().id)]", + "scriptFolder": ".", + "scriptFileName": "Copy-FileFromAzure.ps1", + "fileToBeCopied": "FileToBeCopied.txt", + "scriptParameters": "[concat('-artifactsLocation ', parameters('_artifactsLocation'), ' -artifactsLocationSasToken \"', parameters('_artifactsLocationSasToken'), '\" -folderName ', variables('scriptFolder'), ' -fileToInstall ', variables('fileToBeCopied'))]" + }, + "resources": [ + { + "apiVersion": "2016-09-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[variables('dnsNameForPublicIP')]" + } + } + }, + { + "apiVersion": "2016-09-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] }, - { - "apiVersion": "2016-09-01", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "subnets": [ + { + "name": "[variables('subnetName')]", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] + "addressPrefix": "[variables('subnetPrefix')]" } - }, - { - "apiVersion": "2016-09-01", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[variables('publicIPAddressName')]", - "[variables('virtualNetworkName')]" - ], + } + ] + } + }, + { + "apiVersion": "2016-09-01", + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('nicName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[variables('publicIPAddressName')]", + "[variables('virtualNetworkName')]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ] + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" + }, + "subnet": { + "id": "[variables('subnetRef')]" + } } + } + ] + } + }, + { + "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[variables('nicName')]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" }, - { - "apiVersion": "2016-04-30-preview", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[variables('nicName')]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "Standard_D1_v2" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "MicrosoftWindowsServer", - "offer": "WindowsServer", - "sku": "2016-Datacenter", - "version": "latest" - }, - "osDisk": { - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" - } - ] - } - }, - "resources": [ - { - "type": "extensions", - "name": "CustomScriptExtension", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[variables('vmName')]" - ], - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.8", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'), '/', variables('ScriptFolder'), '/', variables('ScriptFileName'), parameters('_artifactsLocationSasToken'))]" - ], - "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File ', variables('scriptFolder'), '/', variables('scriptFileName'), ' ', variables('scriptParameters'))]" - } - } - } - ] + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "MicrosoftWindowsServer", + "offer": "WindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" + } + ] } - ], - "outputs": { - "vm-fqdn": { - "type": "string", - "value": "[reference(variables('publicIPAddressName'), '2016-03-30').dnsSettings.fqdn]" + }, + "resources": [ + { + "type": "extensions", + "name": "CustomScriptExtension", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[variables('vmName')]" + ], + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.8", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'), '/', variables('ScriptFolder'), '/', variables('ScriptFileName'), parameters('_artifactsLocationSasToken'))]" + ], + "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File ', variables('scriptFolder'), '/', variables('scriptFileName'), ' ', variables('scriptParameters'))]" + } + } } + ] + } + ], + "outputs": { + "vm-fqdn": { + "type": "string", + "value": "[reference(variables('publicIPAddressName'), '2016-03-30').dnsSettings.fqdn]" } + } } diff --git a/201-vm-diagnostics-extension-windows/azuredeploy.json b/201-vm-diagnostics-extension-windows/azuredeploy.json index d1887f4376b9..951fa0015ae8 100644 --- a/201-vm-diagnostics-extension-windows/azuredeploy.json +++ b/201-vm-diagnostics-extension-windows/azuredeploy.json @@ -38,6 +38,13 @@ "metadata": { "description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: 2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter, Windows-Server-Technical-Preview." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -68,7 +75,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('vmDiagnosticsStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -77,7 +84,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -89,7 +96,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -110,7 +117,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -136,7 +143,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('vmDiagnosticsStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -180,7 +187,7 @@ "type": "extensions", "name": "Microsoft.Insights.VMDiagnosticsSettings", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/201-vm-different-rg-vnet/azuredeploy.json b/201-vm-different-rg-vnet/azuredeploy.json index 34500eeae875..edcd24f0d401 100644 --- a/201-vm-different-rg-vnet/azuredeploy.json +++ b/201-vm-different-rg-vnet/azuredeploy.json @@ -111,6 +111,13 @@ "metadata": { "description": "Network Interface Name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -122,7 +129,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -131,7 +138,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIPName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } @@ -140,7 +147,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPName'))]" ], @@ -165,7 +172,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]" diff --git a/201-vm-different-rg-vnet/prereqs/prereq.azuredeploy.json b/201-vm-different-rg-vnet/prereqs/prereq.azuredeploy.json index 803d2327dbf3..7e5765029c56 100644 --- a/201-vm-different-rg-vnet/prereqs/prereq.azuredeploy.json +++ b/201-vm-different-rg-vnet/prereqs/prereq.azuredeploy.json @@ -1,49 +1,59 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "existingVirtualNetworkName": "existing-vnet", - "existingSubnetName": "existing-subnet-1" - }, - "resources": [{ - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('existingVirtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" - }, - "dependsOn": [], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "[variables('existingSubnetName')]", - "properties": { - "addressPrefix": "10.0.1.0/24" - } - }] - } - }], - "outputs": { - "virtualNetworkName": { - "type": "string", - "value": "[variables('existingVirtualNetworkName')]" - }, - "virtualNetworkResourceGroup": { - "type": "string", - "value": "[resourceGroup().name]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "existingVirtualNetworkName": "existing-vnet", + "existingSubnetName": "existing-subnet-1" + }, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('existingVirtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - "subnet1Name": { - "type": "string", - "value": "[variables('existingSubnetName')]" - } - - + "subnets": [ + { + "name": "[variables('existingSubnetName')]", + "properties": { + "addressPrefix": "10.0.1.0/24" + } + } + ] + } + } + ], + "outputs": { + "virtualNetworkName": { + "type": "string", + "value": "[variables('existingVirtualNetworkName')]" + }, + "virtualNetworkResourceGroup": { + "type": "string", + "value": "[resourceGroup().name]" + }, + "subnet1Name": { + "type": "string", + "value": "[variables('existingSubnetName')]" } -} \ No newline at end of file + } +} diff --git a/201-vm-domain-join-existing/azuredeploy.json b/201-vm-domain-join-existing/azuredeploy.json index be35877e7993..fae783359107 100644 --- a/201-vm-domain-join-existing/azuredeploy.json +++ b/201-vm-domain-join-existing/azuredeploy.json @@ -1,77 +1,78 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmList": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "List of virtual machines to be domain joined, if using multiple VMs, make their names comma separate. E.g. VM01, VM02, VM03." - } - }, - "location": { - "type": "string", - "metadata": { - "description": "Location name of the virtual machine" - } - }, - "domainJoinUserName": { - "type": "string", - "metadata": { - "description": "Domain NetBiosName plus User name of a domain user with sufficient rights to perfom domain join operation. E.g. domain\\username" - } - }, - "domainJoinUserPassword": { - "type": "securestring", - "metadata": { - "description": "Domain user password" - } - }, - "domainFQDN": { - "type": "string", - "metadata": { - "description": "Domain FQDN where the virtual machine will be joined" - } - }, - "ouPath": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Specifies an organizational unit (OU) for the domain account. Enter the full distinguished name of the OU in quotation marks. Example: \"OU=testOU; DC=domain; DC=Domain; DC=com\"" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmList": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "List of virtual machines to be domain joined, if using multiple VMs, make their names comma separate. E.g. VM01, VM02, VM03." + } + }, + "location": { + "type": "string", + "metadata": { + "description": "Location name of the virtual machine" + }, + "defaultValue": "[resourceGroup().location]" + }, + "domainJoinUserName": { + "type": "string", + "metadata": { + "description": "Domain NetBiosName plus User name of a domain user with sufficient rights to perfom domain join operation. E.g. domain\\username" + } }, - "variables": { - "domainJoinOptions": 3, - "vmListArray" : "[split(parameters('vmList'),',')]" + "domainJoinUserPassword": { + "type": "securestring", + "metadata": { + "description": "Domain user password" + } }, - "resources": [ - { - "comments": "Join domain - JsonADDomainExtension", - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(trim(variables('vmListArray')[copyIndex()]),'/joindomain')]", - "location": "[parameters('location')]", - "copy": { - "name": "vmDomainJoinCopy", - "count": "[length(variables('vmListArray'))]" - }, - "properties": { - "publisher": "Microsoft.Compute", - "type": "JsonADDomainExtension", - "typeHandlerVersion": "1.3", - "autoUpgradeMinorVersion": true, - "settings": { - "Name": "[parameters('domainFQDN')]", - "User": "[parameters('domainJoinUserName')]", - "Restart": "true", - "Options": "[variables('domainJoinOptions')]", - "OUPath": "[parameters('ouPath')]" - }, - "protectedSettings": { - "Password": "[parameters('domainJoinUserPassword')]" - } - } + "domainFQDN": { + "type": "string", + "metadata": { + "description": "Domain FQDN where the virtual machine will be joined" + } + }, + "ouPath": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Specifies an organizational unit (OU) for the domain account. Enter the full distinguished name of the OU in quotation marks. Example: \"OU=testOU; DC=domain; DC=Domain; DC=com\"" + } + } + }, + "variables": { + "domainJoinOptions": 3, + "vmListArray": "[split(parameters('vmList'),',')]" + }, + "resources": [ + { + "comments": "Join domain - JsonADDomainExtension", + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(trim(variables('vmListArray')[copyIndex()]),'/joindomain')]", + "location": "[parameters('location')]", + "copy": { + "name": "vmDomainJoinCopy", + "count": "[length(variables('vmListArray'))]" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "JsonADDomainExtension", + "typeHandlerVersion": "1.3", + "autoUpgradeMinorVersion": true, + "settings": { + "Name": "[parameters('domainFQDN')]", + "User": "[parameters('domainJoinUserName')]", + "Restart": "true", + "Options": "[variables('domainJoinOptions')]", + "OUPath": "[parameters('ouPath')]" + }, + "protectedSettings": { + "Password": "[parameters('domainJoinUserPassword')]" } - ] + } + } + ] } diff --git a/201-vm-domain-join/azuredeploy.json b/201-vm-domain-join/azuredeploy.json index 298818d5b86f..4498d0c3403e 100644 --- a/201-vm-domain-join/azuredeploy.json +++ b/201-vm-domain-join/azuredeploy.json @@ -70,6 +70,13 @@ "metadata": { "description": "The password for the administrator account of the new VM and the domain" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -87,7 +94,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -99,7 +106,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -108,7 +115,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPName'))]" ], @@ -133,7 +140,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('dnsLabelPrefix')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts',variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" @@ -194,7 +201,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('dnsLabelPrefix'),'/joindomain')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('dnsLabelPrefix'))]" ], diff --git a/201-vm-dynamic-data-disks-selection/azuredeploy.json b/201-vm-dynamic-data-disks-selection/azuredeploy.json index 705e7d64aca2..ee8fd1cee8a0 100644 --- a/201-vm-dynamic-data-disks-selection/azuredeploy.json +++ b/201-vm-dynamic-data-disks-selection/azuredeploy.json @@ -33,13 +33,13 @@ } }, "numberOfVms": { - "type": "int", - "defaultValue": 2, - "minValue": 1, - "maxValue": 10, - "metadata": { - "description": "The number of VMs to create." - } + "type": "int", + "defaultValue": 2, + "minValue": 1, + "maxValue": 10, + "metadata": { + "description": "The number of VMs to create." + } }, "numDataDisks": { "type": "int", @@ -49,6 +49,13 @@ "metadata": { "description": "This parameter allows the user to select the number of disks they want" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -76,7 +83,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[concat(variables('storageAccountName'), copyIndex())]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "storageLoop", "count": "[parameters('numberOfVms')]" @@ -84,14 +91,14 @@ "sku": { "name": "[variables('storageAccountType')]" }, - "kind": "Storage", - "properties": { } + "kind": "Storage", + "properties": {} }, { "apiVersion": "2017-03-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "ipLoop", "count": "[parameters('numberOfVms')]" @@ -107,7 +114,7 @@ "apiVersion": "2017-03-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -128,7 +135,7 @@ "apiVersion": "2017-03-01", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[parameters('numberOfVms')]" @@ -158,7 +165,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "vmLoop", "count": "[parameters('numberOfVms')]" diff --git a/201-vm-efficientip-vhd/azuredeploy.json b/201-vm-efficientip-vhd/azuredeploy.json index b98417b02f78..459a9dd521ba 100644 --- a/201-vm-efficientip-vhd/azuredeploy.json +++ b/201-vm-efficientip-vhd/azuredeploy.json @@ -32,14 +32,15 @@ } }, "vmDiskSizeGB": { - "type": "string", - "defaultValue": "150", - "allowedValues": [ - "150","300" - ], - "metadata": { - "description": "Diskspace size of the VM" - } + "type": "string", + "defaultValue": "150", + "allowedValues": [ + "150", + "300" + ], + "metadata": { + "description": "Diskspace size of the VM" + } }, "existingVirtualNetworkName": { "type": "string", @@ -70,6 +71,13 @@ "metadata": { "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -85,7 +93,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('diagStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_GRS" }, @@ -96,7 +104,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "PublicIPAddress" }, @@ -111,17 +119,17 @@ "apiVersion": "2017-03-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" ], "tags": { "displayName": "NetworkInterface" }, - "properties": { - "networkSecurityGroup": { + "properties": { + "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('existingSecurityGroupName'))]" - }, + }, "ipConfigurations": [ { "name": "ipconfig1", @@ -142,7 +150,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "VirtualMachine" }, diff --git a/201-vm-efficientip-vhd/prereqs/prereq.azuredeploy.json b/201-vm-efficientip-vhd/prereqs/prereq.azuredeploy.json index 7265c8f1bde4..9313ea08a3d1 100644 --- a/201-vm-efficientip-vhd/prereqs/prereq.azuredeploy.json +++ b/201-vm-efficientip-vhd/prereqs/prereq.azuredeploy.json @@ -1,80 +1,92 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "existingVirtualNetworkName": "vnet", - "existingSubnetName": "subnet-1", - "existingSGN": "NSG" - }, - "resources": [{ - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('existingVirtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "existingVirtualNetworkName": "vnet", + "existingSubnetName": "subnet-1", + "existingSGN": "NSG" + }, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('existingVirtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - "dependsOn": [], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "[variables('existingSubnetName')]", - "properties": { - "addressPrefix": "10.0.1.0/24" - } - }] - } + "subnets": [ + { + "name": "[variables('existingSubnetName')]", + "properties": { + "addressPrefix": "10.0.1.0/24" + } + } + ] + } }, - { - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('existingSGN')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" - }, - "dependsOn": [], - "properties": { - "securityRules": [ - { - "name": "rule1", - "properties": { - "protocol": "*", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "destinationPortRange": "80", - "sourcePortRange": "*", - "priority": 130, - "direction": "Inbound" - } - } - ] - } - }], - "outputs": { - "existingVnetName": { - "type": "string", - "value": "[variables('existingVirtualNetworkName')]" - }, - "existingVnetRG": { - "type": "string", - "value": "[resourceGroup().name]" - }, - "subnetName": { - "type": "string", - "value": "[variables('existingSubnetName')]" - }, - "existingSecurityGroupName": { - "type": "string", - "value": "[variables('existingSGN')]" - } + { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('existingSGN')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [], + "properties": { + "securityRules": [ + { + "name": "rule1", + "properties": { + "protocol": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "destinationPortRange": "80", + "sourcePortRange": "*", + "priority": 130, + "direction": "Inbound" + } + } + ] + } + } + ], + "outputs": { + "existingVnetName": { + "type": "string", + "value": "[variables('existingVirtualNetworkName')]" + }, + "existingVnetRG": { + "type": "string", + "value": "[resourceGroup().name]" + }, + "subnetName": { + "type": "string", + "value": "[variables('existingSubnetName')]" + }, + "existingSecurityGroupName": { + "type": "string", + "value": "[variables('existingSGN')]" } -} \ No newline at end of file + } +} diff --git a/201-vm-linux-dynamic-data-disks/azuredeploy.json b/201-vm-linux-dynamic-data-disks/azuredeploy.json index 016d1cb81f9c..3d490b9ce502 100644 --- a/201-vm-linux-dynamic-data-disks/azuredeploy.json +++ b/201-vm-linux-dynamic-data-disks/azuredeploy.json @@ -213,6 +213,13 @@ "metadata": { "description": "This parameter allows the user to select the number of disks wanted" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -244,13 +251,12 @@ "storageAccountType": "[parameters('storageType')]", "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]" }, - "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -259,14 +265,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2017-03-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -287,7 +293,7 @@ "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2017-03-01", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -299,7 +305,7 @@ "apiVersion": "2017-03-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('networkSettings').virtualNetworkName)]" @@ -326,7 +332,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('masterVMName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]", @@ -363,7 +369,9 @@ }, "osDisk": { "name": "[variables('OSDiskName')]", - "vhd": { "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]" }, + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]" + }, "caching": "ReadWrite", "createOption": "FromImage" }, @@ -397,7 +405,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('masterVMName'), '/Installation')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('masterVMName'))]" ], diff --git a/201-vm-monitoring-diagnostics-extension/azuredeploy.json b/201-vm-monitoring-diagnostics-extension/azuredeploy.json index 0dd335f4de51..e96f841c72aa 100644 --- a/201-vm-monitoring-diagnostics-extension/azuredeploy.json +++ b/201-vm-monitoring-diagnostics-extension/azuredeploy.json @@ -49,6 +49,13 @@ "metadata": { "description": "The resource group for the storage account specified in existingdiagnosticsStorageAccountName" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -82,7 +89,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -91,7 +98,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -103,7 +110,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -124,7 +131,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -150,7 +157,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -198,7 +205,7 @@ { "name": "Microsoft.Insights.VMDiagnosticsSettings", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "[variables('apiVersion')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" @@ -225,4 +232,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/201-vm-monitoring-diagnostics-extension/prereqs/prereq.azuredeploy.json b/201-vm-monitoring-diagnostics-extension/prereqs/prereq.azuredeploy.json index d073b66f71dd..716d36c5adfb 100644 --- a/201-vm-monitoring-diagnostics-extension/prereqs/prereq.azuredeploy.json +++ b/201-vm-monitoring-diagnostics-extension/prereqs/prereq.azuredeploy.json @@ -1,34 +1,42 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - - }, - "variables": { - "diagnosticsStorageAccountName": "[concat(uniquestring(resourceGroup().id), 'stor')]", - "diagnosticsStorageAccountType": "Standard_LRS" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "diagnosticsStorageAccountName": "[concat(uniquestring(resourceGroup().id), 'stor')]", + "diagnosticsStorageAccountType": "Standard_LRS" + }, + "resources": [ + { + "name": "[variables('diagnosticsStorageAccountName')]", + "type": "Microsoft.Storage/storageAccounts", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [], + "tags": { + "displayName": "diagnosticsStorageAccount" + }, + "properties": { + "accountType": "[variables('diagnosticsStorageAccountType')]" + } + } + ], + "outputs": { + "existingdiagStorName": { + "type": "string", + "value": "[variables('diagnosticsStorageAccountName')]" }, - "resources": [{ - "name": "[variables('diagnosticsStorageAccountName')]", - "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [], - "tags": { - "displayName": "diagnosticsStorageAccount" - }, - "properties": { - "accountType": "[variables('diagnosticsStorageAccountType')]" - } - }], - "outputs": { - "existingdiagStorName": { - "type": "string", - "value": "[variables('diagnosticsStorageAccountName')]" - }, - "existingdiagStorRG": { - "type": "string", - "value": "[resourceGroup().name]" - } + "existingdiagStorRG": { + "type": "string", + "value": "[resourceGroup().name]" } -} \ No newline at end of file + } +} diff --git a/201-vm-msi-linux-terraform/azuredeploy.json b/201-vm-msi-linux-terraform/azuredeploy.json index 90908fd98f3c..6e3dd94e9399 100644 --- a/201-vm-msi-linux-terraform/azuredeploy.json +++ b/201-vm-msi-linux-terraform/azuredeploy.json @@ -60,6 +60,13 @@ "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": { @@ -86,20 +93,19 @@ ] } }, - "contributor" : "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", + "contributor": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", "installParm1": "[concat(' -u ', parameters('adminUsername'))]", "installParm2": "[concat(' -s ', subscription().subscriptionId)]", "installParm3": "[concat(' -a ', variables('stateStorageAccountName'))]", "installParm4": "[if(equals(parameters('desktopInstall'), bool('true')), concat(' -d ', parameters('desktopInstall')), '')]", "installParm5": "[concat(' -t ', subscription().tenantId)]" - - }, + }, "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('infraStorageAccountName')]", "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, @@ -110,7 +116,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('stateStorageAccountName')]", "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, @@ -121,7 +127,7 @@ "apiVersion": "2017-11-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -133,7 +139,7 @@ "apiVersion": "2017-11-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -154,7 +160,7 @@ "name": "[variables('networkSecurityGroupName')]", "type": "Microsoft.Network/networkSecurityGroups", "apiVersion": "2017-11-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -191,7 +197,7 @@ "apiVersion": "2017-11-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -220,7 +226,7 @@ "apiVersion": "2017-12-01", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "identity": { "type": "SystemAssigned" }, @@ -261,7 +267,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/MSILinuxExtension')]", "apiVersion": "2017-12-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -283,7 +289,7 @@ "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines/extensions/', variables('vmName'),'MSILinuxExtension')]" ], - "properties": { + "properties": { "roleDefinitionId": "[variables('contributor')]", "principalId": "[reference(concat(resourceId('Microsoft.Compute/virtualMachines/', variables('vmName')),'/providers/Microsoft.ManagedIdentity/Identities/default'),'2015-08-31-PREVIEW').principalId]", "scope": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name)]" @@ -293,7 +299,7 @@ "name": "[concat(variables('vmName'),'/customscriptextension')]", "type": "Microsoft.Compute/virtualMachines/extensions", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Authorization/roleAssignments', guid(resourceGroup().id))]" ], diff --git a/201-vm-msi-linux/nestedtemplates/createVM.json b/201-vm-msi-linux/nestedtemplates/createVM.json index da3c21acf3ee..b86f2facac48 100644 --- a/201-vm-msi-linux/nestedtemplates/createVM.json +++ b/201-vm-msi-linux/nestedtemplates/createVM.json @@ -18,14 +18,14 @@ "type": "string", "metadata": { "description": "The Location For the resources" - }, + }, "defaultValue": "[resourceGroup().location]" }, "vmSize": { "type": "string", "metadata": { "description": "The size of the VM to create" - }, + }, "defaultValue": "Standard_DS1_V2" }, "vmName": { @@ -34,19 +34,19 @@ "description": "The name of the VM to create" } }, - "nicName": { + "nicName": { "type": "string", "metadata": { "description": "The name of the NIC to create" } }, - "storageAccountName": { + "storageAccountName": { "type": "string", "metadata": { "description": "The name of the storage account to create" } }, - "linuxConfiguration": { + "linuxConfiguration": { "type": "object", "metadata": { "description": "The Linux configuration object" @@ -71,16 +71,15 @@ } } }, - "variables": { - }, + "variables": {}, "resources": [ { "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "location": "[parameters('Location')]", - "identity": { - "type": "systemAssigned" + "identity": { + "type": "systemAssigned" }, "properties": { "hardwareProfile": { @@ -116,27 +115,27 @@ } }, { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('vmName'),'/MSILinuxExtension')]", - "apiVersion": "2017-03-30", - "location": "[parameters('Location')]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" - ], - "properties": { - "publisher": "Microsoft.ManagedIdentity", - "type": "ManagedIdentityExtensionForLinux", - "typeHandlerVersion": "1.0", - "autoUpgradeMinorVersion": true , - "settings": { - "port": 50342 - }, - "protectedSettings": {} - } - } + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('vmName'),'/MSILinuxExtension')]", + "apiVersion": "2017-03-30", + "location": "[parameters('Location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" + ], + "properties": { + "publisher": "Microsoft.ManagedIdentity", + "type": "ManagedIdentityExtensionForLinux", + "typeHandlerVersion": "1.0", + "autoUpgradeMinorVersion": true, + "settings": { + "port": 50342 + }, + "protectedSettings": {} + } + } ], "outputs": { - "principalId": { + "principalId": { "type": "string", "value": "[reference(concat(resourceId('Microsoft.Compute/virtualMachines/', parameters('vmName')),'/providers/Microsoft.ManagedIdentity/Identities/default'),'2015-08-31-PREVIEW').principalId]" } diff --git a/201-vm-msi-linux/nestedtemplates/setUpRBAC.json b/201-vm-msi-linux/nestedtemplates/setUpRBAC.json index 861d4c4b8228..6b5a3f215c09 100644 --- a/201-vm-msi-linux/nestedtemplates/setUpRBAC.json +++ b/201-vm-msi-linux/nestedtemplates/setUpRBAC.json @@ -17,7 +17,7 @@ }, "variables": { "owner": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "RBACResourceName":"[concat(parameters('storageAccountName'),'/Microsoft.Authorization/',parameters('principalId'))]" + "RBACResourceName": "[concat(parameters('storageAccountName'),'/Microsoft.Authorization/',parameters('principalId'))]" }, "resources": [ { @@ -31,4 +31,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-vm-msi-windows/nestedtemplates/createVM.json b/201-vm-msi-windows/nestedtemplates/createVM.json index 261f8d9db41f..eb710d22bc27 100644 --- a/201-vm-msi-windows/nestedtemplates/createVM.json +++ b/201-vm-msi-windows/nestedtemplates/createVM.json @@ -33,14 +33,14 @@ "type": "string", "metadata": { "description": "The Location For the resources" - }, + }, "defaultValue": "[resourceGroup().location]" }, "vmSize": { "type": "string", "metadata": { "description": "The size of the VM to create" - }, + }, "defaultValue": "Standard_DS1_V2" }, "vmName": { @@ -49,29 +49,28 @@ "description": "The name of the VM to create" } }, - "nicName": { + "nicName": { "type": "string", "metadata": { "description": "The name of the NIC" } }, - "storageAccountName": { + "storageAccountName": { "type": "string", "metadata": { "description": "The name of the Storage Account to create" } } }, - "variables": { - }, + "variables": {}, "resources": [ { "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "location": "[parameters('Location')]", - "identity": { - "type": "systemAssigned" + "identity": { + "type": "systemAssigned" }, "properties": { "hardwareProfile": { @@ -123,7 +122,7 @@ }, "protectedSettings": {} } - } + } ], "outputs": { "principalId": { diff --git a/201-vm-msi-windows/nestedtemplates/setUpRBAC.json b/201-vm-msi-windows/nestedtemplates/setUpRBAC.json index 861d4c4b8228..6b5a3f215c09 100644 --- a/201-vm-msi-windows/nestedtemplates/setUpRBAC.json +++ b/201-vm-msi-windows/nestedtemplates/setUpRBAC.json @@ -17,7 +17,7 @@ }, "variables": { "owner": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "RBACResourceName":"[concat(parameters('storageAccountName'),'/Microsoft.Authorization/',parameters('principalId'))]" + "RBACResourceName": "[concat(parameters('storageAccountName'),'/Microsoft.Authorization/',parameters('principalId'))]" }, "resources": [ { @@ -31,4 +31,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-vm-new-or-existing-conditions/azuredeploy.json b/201-vm-new-or-existing-conditions/azuredeploy.json index 18e87c645f46..f4a511bd7bd7 100644 --- a/201-vm-new-or-existing-conditions/azuredeploy.json +++ b/201-vm-new-or-existing-conditions/azuredeploy.json @@ -90,7 +90,9 @@ }, "addressPrefixes": { "type": "array", - "defaultValue": [ "10.0.0.0/16" ], + "defaultValue": [ + "10.0.0.0/16" + ], "metadata": { "description": "Address prefix of the virtual network" } @@ -278,4 +280,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-vm-os-disk-and-data-disk-existing-vnet/azuredeploy.json b/201-vm-os-disk-and-data-disk-existing-vnet/azuredeploy.json index 906ce6505524..d5a6d4059e08 100644 --- a/201-vm-os-disk-and-data-disk-existing-vnet/azuredeploy.json +++ b/201-vm-os-disk-and-data-disk-existing-vnet/azuredeploy.json @@ -53,10 +53,17 @@ "metadata": { "description": "Name of the subnet in the virtual network you want to use" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "diagStorageAccountName": "[concat(parameters('vmName'), 'diag')]", + "diagStorageAccountName": "[concat(parameters('vmName'), 'diag')]", "publicIPAddressType": "Dynamic", "vnetID": "[resourceId(parameters('existingVirtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks', parameters('existingVirtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/', parameters('subnetName'))]", @@ -68,7 +75,7 @@ "apiVersion": "2016-01-01", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('diagStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_GRS" }, @@ -79,7 +86,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "PublicIPAddress" }, @@ -91,7 +98,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" ], @@ -119,7 +126,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "VirtualMachine" }, @@ -168,4 +175,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-vm-os-disk-and-data-disk-existing-vnet/prereqs/prereq.azuredeploy.json b/201-vm-os-disk-and-data-disk-existing-vnet/prereqs/prereq.azuredeploy.json index a206bbbe00ee..d432a8b11958 100644 --- a/201-vm-os-disk-and-data-disk-existing-vnet/prereqs/prereq.azuredeploy.json +++ b/201-vm-os-disk-and-data-disk-existing-vnet/prereqs/prereq.azuredeploy.json @@ -1,47 +1,59 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "existingVirtualNetworkName": "vnet", - "existingSubnetName": "subnet-1" - }, - "resources": [{ - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('existingVirtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" - }, - "dependsOn": [], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "[variables('existingSubnetName')]", - "properties": { - "addressPrefix": "10.0.1.0/24" - } - }] - } - }], - "outputs": { - "virtualNetwork": { - "type": "string", - "value": "[variables('existingVirtualNetworkName')]" - }, - "subnet": { - "type": "string", - "value": "[variables('existingSubnetName')]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "existingVirtualNetworkName": "vnet", + "existingSubnetName": "subnet-1" + }, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('existingVirtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - "rgName": { - "type": "string", - "value": "[resourceGroup().name]" - } + "subnets": [ + { + "name": "[variables('existingSubnetName')]", + "properties": { + "addressPrefix": "10.0.1.0/24" + } + } + ] + } + } + ], + "outputs": { + "virtualNetwork": { + "type": "string", + "value": "[variables('existingVirtualNetworkName')]" + }, + "subnet": { + "type": "string", + "value": "[variables('existingSubnetName')]" + }, + "rgName": { + "type": "string", + "value": "[resourceGroup().name]" } -} \ No newline at end of file + } +} diff --git a/201-vm-push-certificate-windows/azuredeploy.json b/201-vm-push-certificate-windows/azuredeploy.json index 59e82ed521b4..9006cee31b7a 100644 --- a/201-vm-push-certificate-windows/azuredeploy.json +++ b/201-vm-push-certificate-windows/azuredeploy.json @@ -39,6 +39,13 @@ "metadata": { "description": "Url of the certificate in Key Vault" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -55,7 +62,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -64,7 +71,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -85,7 +92,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -111,7 +118,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], diff --git a/201-vm-specialized-vhd-existing-vnet/azuredeploy.json b/201-vm-specialized-vhd-existing-vnet/azuredeploy.json index 63c564f3a134..ef361dbd5c6a 100644 --- a/201-vm-specialized-vhd-existing-vnet/azuredeploy.json +++ b/201-vm-specialized-vhd-existing-vnet/azuredeploy.json @@ -53,11 +53,17 @@ "metadata": { "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "diagStorageAccountName": "[concat(uniquestring(resourceGroup().id), 'specvm')]", - "api-version": "2015-06-15", "publicIPAddressType": "Dynamic", "vnetID": "[resourceId(parameters('existingVirtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks', parameters('existingVirtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/', parameters('subnetName'))]", @@ -69,7 +75,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('diagStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_GRS" }, @@ -80,7 +86,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "PublicIPAddress" }, @@ -95,7 +101,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" ], @@ -123,7 +129,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "VirtualMachine" }, @@ -161,4 +167,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-vm-specialized-vhd-existing-vnet/prereqs/prereq.azuredeploy.json b/201-vm-specialized-vhd-existing-vnet/prereqs/prereq.azuredeploy.json index 3674a55a6bb1..80d3b11fdab9 100644 --- a/201-vm-specialized-vhd-existing-vnet/prereqs/prereq.azuredeploy.json +++ b/201-vm-specialized-vhd-existing-vnet/prereqs/prereq.azuredeploy.json @@ -1,47 +1,59 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "existingVirtualNetworkName": "vnet", - "existingSubnetName": "subnet-1" - }, - "resources": [{ - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('existingVirtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" - }, - "dependsOn": [], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "[variables('existingSubnetName')]", - "properties": { - "addressPrefix": "10.0.1.0/24" - } - }] - } - }], - "outputs": { - "existingVnetName": { - "type": "string", - "value": "[variables('existingVirtualNetworkName')]" - }, - "existingVnetRG": { - "type": "string", - "value": "[resourceGroup().name]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "existingVirtualNetworkName": "vnet", + "existingSubnetName": "subnet-1" + }, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('existingVirtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - "subnetName": { - "type": "string", - "value": "[variables('existingSubnetName')]" - } + "subnets": [ + { + "name": "[variables('existingSubnetName')]", + "properties": { + "addressPrefix": "10.0.1.0/24" + } + } + ] + } + } + ], + "outputs": { + "existingVnetName": { + "type": "string", + "value": "[variables('existingVirtualNetworkName')]" + }, + "existingVnetRG": { + "type": "string", + "value": "[resourceGroup().name]" + }, + "subnetName": { + "type": "string", + "value": "[variables('existingSubnetName')]" } -} \ No newline at end of file + } +} diff --git a/201-vm-specialized-vhd/azuredeploy.json b/201-vm-specialized-vhd/azuredeploy.json index 3b072b683bde..1ce64dcb5f28 100644 --- a/201-vm-specialized-vhd/azuredeploy.json +++ b/201-vm-specialized-vhd/azuredeploy.json @@ -30,11 +30,17 @@ "metadata": { "description": "Name of the VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "diagStorageAccountName": "[concat(uniquestring(resourceGroup().id), 'specvm')]", - "api-version": "2015-06-15", "addressPrefix": "10.0.0.0/16", "subnetName": "Subnet", "subnetPrefix": "10.0.0.0/24", @@ -50,7 +56,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('diagStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_GRS" }, @@ -61,7 +67,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -82,7 +88,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -108,7 +114,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]" } @@ -117,7 +123,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -152,4 +158,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-vm-sql-full-autobackup/azuredeploy.json b/201-vm-sql-full-autobackup/azuredeploy.json index d6b517fdec2c..913a41ec28eb 100644 --- a/201-vm-sql-full-autobackup/azuredeploy.json +++ b/201-vm-sql-full-autobackup/azuredeploy.json @@ -196,6 +196,13 @@ "metadata": { "description": "SQL Server Authentication Login Account Password" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -207,7 +214,7 @@ "name": "[parameters('virtualMachineName')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]" ], @@ -270,7 +277,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('virtualMachineName'), '/SqlIaasExtension')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]" ], @@ -281,7 +288,7 @@ "autoUpgradeMinorVersion": true, "settings": { "AutoTelemetrySettings": { - "Region": "[resourceGroup().location]" + "Region": "[parameters('location')]" }, "AutoBackupSettings": { "Enable": true, @@ -313,7 +320,7 @@ "value": "[parameters('virtualMachineName')]" }, "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" @@ -355,7 +362,7 @@ "name": "[parameters('sqlAutobackupStorageAccountName')]", "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "['Standard_LRS']" } @@ -364,7 +371,7 @@ "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -385,7 +392,7 @@ "name": "[parameters('networkInterfaceName')]", "type": "Microsoft.Network/networkInterfaces", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]", @@ -415,7 +422,7 @@ "name": "[parameters('publicIpAddressName')]", "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIpAddressType')]" } @@ -424,7 +431,7 @@ "name": "[parameters('networkSecurityGroupName')]", "type": "Microsoft.Network/networkSecurityGroups", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { diff --git a/201-vm-sql-full-autobackup/nested/preparingSqlServerSa.json b/201-vm-sql-full-autobackup/nested/preparingSqlServerSa.json index b9fe5ba79b86..616d6289cf64 100644 --- a/201-vm-sql-full-autobackup/nested/preparingSqlServerSa.json +++ b/201-vm-sql-full-autobackup/nested/preparingSqlServerSa.json @@ -1,89 +1,86 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "sqlVMName": { - "type": "string" - }, - "location": { - "type": "string" - }, - "adminUsername": { - "type": "string" - }, - "adminPassword": { - "type": "securestring" - }, - "sqlUsername": { - "type": "string" - }, - "sqlPassword": { - "type": "securestring" - }, - "disksCount": { - "type": "int" - }, - "diskSizeInGB": { - "type": "int" - }, - "sqlEnginePort": { - "type": "int" - }, - "workloadType": { - "type": "string" - }, - "connectionType": { - "type": "string" - }, - "sqlVMPrepareModulesURL": { - "type": "string" - }, - "sqlVMPrepareConfigurationFunction": { - "type": "string" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "sqlVMName": { + "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]" }, - "resources":[ - { - "type":"Microsoft.Compute/virtualMachines/extensions", - - "name": "[concat(parameters('sqlVMName'),'/dscExtension')]", - - "apiVersion":"2015-06-15", - - "location": "[parameters('location')]", - "properties":{ - "publisher":"Microsoft.Powershell", - "type":"DSC", - "typeHandlerVersion":"2.19", - "autoUpgradeMinorVersion":false, - "settings":{ - "ModulesUrl":"[parameters('sqlVMPrepareModulesURL')]", - "ConfigurationFunction":"[parameters('sqlVMPrepareConfigurationFunction')]", - "properties": { - "SQLAdminAuthCreds": { - "userName": "[parameters('adminUsername')]", - "Password": "privateSettingsRef:AdminPassword" - }, - "SQLAuthCreds": { - "userName": "[parameters('sqlUsername')]", - "Password": "privateSettingsRef:SqlAuthPassword" - }, - "DisksCount": "[parameters('disksCount')]", - "DiskSizeInGB": "[parameters('diskSizeInGB')]", - "DatabaseEnginePort": "[parameters('sqlEnginePort')]", - "WorkloadType": "[parameters('workloadType')]", - "ConnectionType": "[parameters('connectionType')]" - } + "adminUsername": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "sqlUsername": { + "type": "string" + }, + "sqlPassword": { + "type": "securestring" + }, + "disksCount": { + "type": "int" + }, + "diskSizeInGB": { + "type": "int" + }, + "sqlEnginePort": { + "type": "int" + }, + "workloadType": { + "type": "string" + }, + "connectionType": { + "type": "string" + }, + "sqlVMPrepareModulesURL": { + "type": "string" + }, + "sqlVMPrepareConfigurationFunction": { + "type": "string" + } + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('sqlVMName'),'/dscExtension')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.19", + "autoUpgradeMinorVersion": false, + "settings": { + "ModulesUrl": "[parameters('sqlVMPrepareModulesURL')]", + "ConfigurationFunction": "[parameters('sqlVMPrepareConfigurationFunction')]", + "properties": { + "SQLAdminAuthCreds": { + "userName": "[parameters('adminUsername')]", + "Password": "privateSettingsRef:AdminPassword" }, - "protectedSettings":{ - "items":{ - "AdminPassword": "[parameters('adminPassword')]", - "SqlAuthPassword": "[parameters('sqlPassword')]" - } - } - } + "SQLAuthCreds": { + "userName": "[parameters('sqlUsername')]", + "Password": "privateSettingsRef:SqlAuthPassword" + }, + "DisksCount": "[parameters('disksCount')]", + "DiskSizeInGB": "[parameters('diskSizeInGB')]", + "DatabaseEnginePort": "[parameters('sqlEnginePort')]", + "WorkloadType": "[parameters('workloadType')]", + "ConnectionType": "[parameters('connectionType')]" + } + }, + "protectedSettings": { + "items": { + "AdminPassword": "[parameters('adminPassword')]", + "SqlAuthPassword": "[parameters('sqlPassword')]" + } + } } - ], - "outputs":{ - } -} \ No newline at end of file + } + ], + "outputs": {} +} diff --git a/201-vm-sql-full-autopatching/azuredeploy.json b/201-vm-sql-full-autopatching/azuredeploy.json index 044e3c240e8f..0a5e1649cea2 100644 --- a/201-vm-sql-full-autopatching/azuredeploy.json +++ b/201-vm-sql-full-autopatching/azuredeploy.json @@ -212,6 +212,13 @@ "metadata": { "description": "SQL Server Authentication Login Account Password" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -223,7 +230,7 @@ "name": "[parameters('virtualMachineName')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]" ], @@ -286,7 +293,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('virtualMachineName'), '/SqlIaasExtension')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]" ], @@ -297,7 +304,7 @@ "autoUpgradeMinorVersion": true, "settings": { "AutoTelemetrySettings": { - "Region": "[resourceGroup().location]" + "Region": "[parameters('location')]" }, "AutoPatchingSettings": { "PatchCategory": "WindowsMandatoryUpdates", @@ -326,7 +333,7 @@ "value": "[parameters('virtualMachineName')]" }, "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" @@ -368,7 +375,7 @@ "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -389,7 +396,7 @@ "name": "[parameters('networkInterfaceName')]", "type": "Microsoft.Network/networkInterfaces", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]", @@ -419,7 +426,7 @@ "name": "[parameters('publicIpAddressName')]", "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIpAddressType')]" } @@ -428,7 +435,7 @@ "name": "[parameters('networkSecurityGroupName')]", "type": "Microsoft.Network/networkSecurityGroups", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { diff --git a/201-vm-sql-full-autopatching/nested/preparingSqlServerSa.json b/201-vm-sql-full-autopatching/nested/preparingSqlServerSa.json index b9fe5ba79b86..616d6289cf64 100644 --- a/201-vm-sql-full-autopatching/nested/preparingSqlServerSa.json +++ b/201-vm-sql-full-autopatching/nested/preparingSqlServerSa.json @@ -1,89 +1,86 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "sqlVMName": { - "type": "string" - }, - "location": { - "type": "string" - }, - "adminUsername": { - "type": "string" - }, - "adminPassword": { - "type": "securestring" - }, - "sqlUsername": { - "type": "string" - }, - "sqlPassword": { - "type": "securestring" - }, - "disksCount": { - "type": "int" - }, - "diskSizeInGB": { - "type": "int" - }, - "sqlEnginePort": { - "type": "int" - }, - "workloadType": { - "type": "string" - }, - "connectionType": { - "type": "string" - }, - "sqlVMPrepareModulesURL": { - "type": "string" - }, - "sqlVMPrepareConfigurationFunction": { - "type": "string" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "sqlVMName": { + "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]" }, - "resources":[ - { - "type":"Microsoft.Compute/virtualMachines/extensions", - - "name": "[concat(parameters('sqlVMName'),'/dscExtension')]", - - "apiVersion":"2015-06-15", - - "location": "[parameters('location')]", - "properties":{ - "publisher":"Microsoft.Powershell", - "type":"DSC", - "typeHandlerVersion":"2.19", - "autoUpgradeMinorVersion":false, - "settings":{ - "ModulesUrl":"[parameters('sqlVMPrepareModulesURL')]", - "ConfigurationFunction":"[parameters('sqlVMPrepareConfigurationFunction')]", - "properties": { - "SQLAdminAuthCreds": { - "userName": "[parameters('adminUsername')]", - "Password": "privateSettingsRef:AdminPassword" - }, - "SQLAuthCreds": { - "userName": "[parameters('sqlUsername')]", - "Password": "privateSettingsRef:SqlAuthPassword" - }, - "DisksCount": "[parameters('disksCount')]", - "DiskSizeInGB": "[parameters('diskSizeInGB')]", - "DatabaseEnginePort": "[parameters('sqlEnginePort')]", - "WorkloadType": "[parameters('workloadType')]", - "ConnectionType": "[parameters('connectionType')]" - } + "adminUsername": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "sqlUsername": { + "type": "string" + }, + "sqlPassword": { + "type": "securestring" + }, + "disksCount": { + "type": "int" + }, + "diskSizeInGB": { + "type": "int" + }, + "sqlEnginePort": { + "type": "int" + }, + "workloadType": { + "type": "string" + }, + "connectionType": { + "type": "string" + }, + "sqlVMPrepareModulesURL": { + "type": "string" + }, + "sqlVMPrepareConfigurationFunction": { + "type": "string" + } + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('sqlVMName'),'/dscExtension')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.19", + "autoUpgradeMinorVersion": false, + "settings": { + "ModulesUrl": "[parameters('sqlVMPrepareModulesURL')]", + "ConfigurationFunction": "[parameters('sqlVMPrepareConfigurationFunction')]", + "properties": { + "SQLAdminAuthCreds": { + "userName": "[parameters('adminUsername')]", + "Password": "privateSettingsRef:AdminPassword" }, - "protectedSettings":{ - "items":{ - "AdminPassword": "[parameters('adminPassword')]", - "SqlAuthPassword": "[parameters('sqlPassword')]" - } - } - } + "SQLAuthCreds": { + "userName": "[parameters('sqlUsername')]", + "Password": "privateSettingsRef:SqlAuthPassword" + }, + "DisksCount": "[parameters('disksCount')]", + "DiskSizeInGB": "[parameters('diskSizeInGB')]", + "DatabaseEnginePort": "[parameters('sqlEnginePort')]", + "WorkloadType": "[parameters('workloadType')]", + "ConnectionType": "[parameters('connectionType')]" + } + }, + "protectedSettings": { + "items": { + "AdminPassword": "[parameters('adminPassword')]", + "SqlAuthPassword": "[parameters('sqlPassword')]" + } + } } - ], - "outputs":{ - } -} \ No newline at end of file + } + ], + "outputs": {} +} diff --git a/201-vm-sql-full-keyvault/azuredeploy.json b/201-vm-sql-full-keyvault/azuredeploy.json index 07db0270e2c9..d462f8de9929 100644 --- a/201-vm-sql-full-keyvault/azuredeploy.json +++ b/201-vm-sql-full-keyvault/azuredeploy.json @@ -48,11 +48,11 @@ "metadata": { "description": "SQL Server Virtual Machine Storage Account Type" }, - "allowedValues":[ - "Premium_LRS", - "Standard_LRS" - ], - "defaultValue":"Premium_LRS" + "allowedValues": [ + "Premium_LRS", + "Standard_LRS" + ], + "defaultValue": "Premium_LRS" }, "virtualNetworkName": { "type": "string", @@ -175,6 +175,13 @@ "metadata": { "description": "SQL Server Authentication Login Account Password" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -186,7 +193,7 @@ "name": "[parameters('virtualMachineName')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]", "[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]" @@ -253,7 +260,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('virtualMachineName'), '/SqlIaasExtension')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]" ], @@ -264,7 +271,7 @@ "autoUpgradeMinorVersion": true, "settings": { "AutoTelemetrySettings": { - "Region": "[resourceGroup().location]" + "Region": "[parameters('location')]" }, "KeyVaultCredentialSettings": { "Enable": true, @@ -297,7 +304,7 @@ "value": "[parameters('virtualMachineName')]" }, "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" @@ -339,7 +346,7 @@ "name": "[parameters('storageAccountName')]", "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -348,7 +355,7 @@ "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -369,7 +376,7 @@ "name": "[parameters('networkInterfaceName')]", "type": "Microsoft.Network/networkInterfaces", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]", @@ -399,7 +406,7 @@ "name": "[parameters('publicIpAddressName')]", "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIpAddressType')]" } @@ -408,7 +415,7 @@ "name": "[parameters('networkSecurityGroupName')]", "type": "Microsoft.Network/networkSecurityGroups", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -447,4 +454,4 @@ "value": "[parameters('adminUsername')]" } } -} \ No newline at end of file +} diff --git a/201-vm-sql-full-keyvault/nested/preparingSqlServerSa.json b/201-vm-sql-full-keyvault/nested/preparingSqlServerSa.json index b9fe5ba79b86..616d6289cf64 100644 --- a/201-vm-sql-full-keyvault/nested/preparingSqlServerSa.json +++ b/201-vm-sql-full-keyvault/nested/preparingSqlServerSa.json @@ -1,89 +1,86 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "sqlVMName": { - "type": "string" - }, - "location": { - "type": "string" - }, - "adminUsername": { - "type": "string" - }, - "adminPassword": { - "type": "securestring" - }, - "sqlUsername": { - "type": "string" - }, - "sqlPassword": { - "type": "securestring" - }, - "disksCount": { - "type": "int" - }, - "diskSizeInGB": { - "type": "int" - }, - "sqlEnginePort": { - "type": "int" - }, - "workloadType": { - "type": "string" - }, - "connectionType": { - "type": "string" - }, - "sqlVMPrepareModulesURL": { - "type": "string" - }, - "sqlVMPrepareConfigurationFunction": { - "type": "string" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "sqlVMName": { + "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]" }, - "resources":[ - { - "type":"Microsoft.Compute/virtualMachines/extensions", - - "name": "[concat(parameters('sqlVMName'),'/dscExtension')]", - - "apiVersion":"2015-06-15", - - "location": "[parameters('location')]", - "properties":{ - "publisher":"Microsoft.Powershell", - "type":"DSC", - "typeHandlerVersion":"2.19", - "autoUpgradeMinorVersion":false, - "settings":{ - "ModulesUrl":"[parameters('sqlVMPrepareModulesURL')]", - "ConfigurationFunction":"[parameters('sqlVMPrepareConfigurationFunction')]", - "properties": { - "SQLAdminAuthCreds": { - "userName": "[parameters('adminUsername')]", - "Password": "privateSettingsRef:AdminPassword" - }, - "SQLAuthCreds": { - "userName": "[parameters('sqlUsername')]", - "Password": "privateSettingsRef:SqlAuthPassword" - }, - "DisksCount": "[parameters('disksCount')]", - "DiskSizeInGB": "[parameters('diskSizeInGB')]", - "DatabaseEnginePort": "[parameters('sqlEnginePort')]", - "WorkloadType": "[parameters('workloadType')]", - "ConnectionType": "[parameters('connectionType')]" - } + "adminUsername": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "sqlUsername": { + "type": "string" + }, + "sqlPassword": { + "type": "securestring" + }, + "disksCount": { + "type": "int" + }, + "diskSizeInGB": { + "type": "int" + }, + "sqlEnginePort": { + "type": "int" + }, + "workloadType": { + "type": "string" + }, + "connectionType": { + "type": "string" + }, + "sqlVMPrepareModulesURL": { + "type": "string" + }, + "sqlVMPrepareConfigurationFunction": { + "type": "string" + } + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('sqlVMName'),'/dscExtension')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.19", + "autoUpgradeMinorVersion": false, + "settings": { + "ModulesUrl": "[parameters('sqlVMPrepareModulesURL')]", + "ConfigurationFunction": "[parameters('sqlVMPrepareConfigurationFunction')]", + "properties": { + "SQLAdminAuthCreds": { + "userName": "[parameters('adminUsername')]", + "Password": "privateSettingsRef:AdminPassword" }, - "protectedSettings":{ - "items":{ - "AdminPassword": "[parameters('adminPassword')]", - "SqlAuthPassword": "[parameters('sqlPassword')]" - } - } - } + "SQLAuthCreds": { + "userName": "[parameters('sqlUsername')]", + "Password": "privateSettingsRef:SqlAuthPassword" + }, + "DisksCount": "[parameters('disksCount')]", + "DiskSizeInGB": "[parameters('diskSizeInGB')]", + "DatabaseEnginePort": "[parameters('sqlEnginePort')]", + "WorkloadType": "[parameters('workloadType')]", + "ConnectionType": "[parameters('connectionType')]" + } + }, + "protectedSettings": { + "items": { + "AdminPassword": "[parameters('adminPassword')]", + "SqlAuthPassword": "[parameters('sqlPassword')]" + } + } } - ], - "outputs":{ - } -} \ No newline at end of file + } + ], + "outputs": {} +} diff --git a/201-vm-vsts-agent/azuredeploy.json b/201-vm-vsts-agent/azuredeploy.json index d5643a41eea7..2a885b09629e 100644 --- a/201-vm-vsts-agent/azuredeploy.json +++ b/201-vm-vsts-agent/azuredeploy.json @@ -1,291 +1,317 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "modules": { - "type": "array", - "metadata": { - "description": "Enter the Module(s) to install including the Version" - }, - "defaultValue": [ - {"name": "AzureRM", "version": "5.6.0"}, - {"name": "AzureAD", "version": "2.0.1.3"}, - {"name": "Bitbucket.v2", "version": "1.1.2"}, - {"name": "GetPassword", "version": "1.0.0.0"}, - {"name": "posh-git", "version": "0.7.1"} - ] - }, - "publicIPDnsName": { - "type": "string", - "metadata": { - "description": "Enter a DNS name to resolve to the Public IP Address" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "modules": { + "type": "array", + "metadata": { + "description": "Enter the Module(s) to install including the Version" + }, + "defaultValue": [ + { + "name": "AzureRM", + "version": "5.6.0" }, - "vmAdminUser": { - "type": "string", - "metadata": { - "description": "The name of the Administrator Account to be created" - } + { + "name": "AzureAD", + "version": "2.0.1.3" }, - "vmAdminPassword": { - "type": "securestring", - "metadata": { - "description": "The password for the Admin Account. Must be at least 12 characters long" - }, - "minLength": 12 + { + "name": "Bitbucket.v2", + "version": "1.1.2" }, - "vmSize": { - "type": "string", - "metadata": { - "description": "Specifiy the size of VM required for the VM(s)" - }, - "defaultValue": "Standard_D1_v2" + { + "name": "GetPassword", + "version": "1.0.0.0" }, - "vstsAccount": { - "type": "string", - "metadata": { - "description": "The Visual Studio Team Services account name, that is, the first part of your VSTSAccount.visualstudio.com" - } + { + "name": "posh-git", + "version": "0.7.1" + } + ] + }, + "publicIPDnsName": { + "type": "string", + "metadata": { + "description": "Enter a DNS name to resolve to the Public IP Address" + } + }, + "vmAdminUser": { + "type": "string", + "metadata": { + "description": "The name of the Administrator Account to be created" + } + }, + "vmAdminPassword": { + "type": "securestring", + "metadata": { + "description": "The password for the Admin Account. Must be at least 12 characters long" + }, + "minLength": 12 + }, + "vmSize": { + "type": "string", + "metadata": { + "description": "Specifiy the size of VM required for the VM(s)" + }, + "defaultValue": "Standard_D1_v2" + }, + "vstsAccount": { + "type": "string", + "metadata": { + "description": "The Visual Studio Team Services account name, that is, the first part of your VSTSAccount.visualstudio.com" + } + }, + "vstsAgentCount": { + "type": "int", + "metadata": { + "description": "The number of Visual Studio Team Services agents to be coonfigured on the Virtual Machine. Defialt is 3" + }, + "allowedValues": [ + 1, + 2, + 3, + 4 + ], + "defaultValue": 3 + }, + "vstsPersonalAccessToken": { + "type": "securestring", + "metadata": { + "description": "The personal access token to connect to VSTS" + } + }, + "vstsPoolName": { + "type": "string", + "defaultValue": "Default", + "metadata": { + "description": "The Visual Studio Team Services build agent pool for this build agent to join. Use 'Default' if you don't have a separate pool." + } + }, + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vm-vsts-agent" + }, + "_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": { + "ids": { + "avs": "[resourceId('Microsoft.Compute/availabilitySets', variables('names').avs)]", + "nic": "[resourceId('Microsoft.Network/networkInterfaces', variables('names').nic)]", + "pip": "[resourceId('Microsoft.Network/publicIPAddresses', variables('names').pip)]", + "subnet": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('names').vnet.name),'/subnets/', variables('names').vnet.subnet)]" + }, + "names": { + "avs": "[concat('avs-vsts-', uniqueString(resourceGroup().id))]", + "nic": "[concat('nic-vsts-', uniqueString(resourceGroup().id))]", + "pip": "[concat('pip-vsts-', uniqueString(resourceGroup().id))]", + "vm": "[concat('vm-vsts-', substring(uniqueString(resourceGroup().id), 0, 6))]", + "vnet": { + "name": "[concat('vn-vsts-', uniqueString(resourceGroup().id))]", + "addressPrefix": "10.0.0.0/16", + "subnet": "subnet-0", + "subnetPrefix": "10.0.0.0/24" + }, + "vsts": "[concat('agent-', uniqueString(resourceGroup().id))]" + }, + "powerShell": { + "script": "InstallVstsAgent.ps1", + "folder": "Scripts", + "parameters": "[concat('-vstsAccount ', parameters('vstsAccount'), ' -personalAccessToken ', parameters('vstsPersonalAccessToken'), ' -AgentName ', variables('names').vsts,' -PoolName ', parameters('vstsPoolName'), ' -AgentCount ', parameters('vstsAgentCount'), ' -AdminUser ', parameters('vmAdminUser'), ' -Modules ', variables('modules'))]" + }, + "singleQuote": "'", + "modules": "[replace(replace(replace(replace(replace(string(parameters('modules')), '[{\"', '@(@{'), '\":\"', concat(' = ', variables('singleQuote'))), '\",\"', concat(variables('singleQuote'), '; ')), '\"},{\"', concat(variables('singleQuote'), '}, @{')), '\"}]', concat(variables('singleQuote'), '})'))]" + }, + "resources": [ + { + "name": "[variables('names').avs]", + "type": "Microsoft.Compute/availabilitySets", + "location": "[parameters('location')]", + "apiVersion": "2017-12-01", + "dependsOn": [], + "tags": { + "displayName": "availabilitySets" + }, + "properties": { + "platformUpdateDomainCount": 5, + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + } + }, + { + "name": "[variables('names').pip]", + "type": "Microsoft.Network/publicIPAddresses", + "location": "[parameters('location')]", + "apiVersion": "2017-10-01", + "dependsOn": [], + "tags": { + "displayName": "publicIP" + }, + "properties": { + "dnsSettings": { + "domainNameLabel": "[parameters('publicIPDnsName')]" }, - "vstsAgentCount": { - "type": "int", - "metadata": { - "description": "The number of Visual Studio Team Services agents to be coonfigured on the Virtual Machine. Defialt is 3" - }, - "allowedValues": [1, 2, 3, 4], - "defaultValue": 3 + "idleTimeoutInMinutes": 4, + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic" + } + }, + { + "name": "[variables('names').vnet.name]", + "type": "Microsoft.Network/virtualNetworks", + "location": "[parameters('location')]", + "apiVersion": "2017-10-01", + "dependsOn": [], + "tags": { + "displayName": "virtualNetwork" + }, + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('names').vnet.addressPrefix]" + ] }, - "vstsPersonalAccessToken": { - "type": "securestring", - "metadata": { - "description": "The personal access token to connect to VSTS" + "subnets": [ + { + "name": "[variables('names').vnet.subnet]", + "properties": { + "addressPrefix": "[variables('names').vnet.subnetPrefix]" } - }, - "vstsPoolName": { - "type": "string", - "defaultValue": "Default", - "metadata": { - "description": "The Visual Studio Team Services build agent pool for this build agent to join. Use 'Default' if you don't have a separate pool." + } + ] + } + }, + { + "name": "[variables('names').nic]", + "type": "Microsoft.Network/networkInterfaces", + "location": "[parameters('location')]", + "apiVersion": "2017-10-01", + "dependsOn": [ + "[variables('names').pip]", + "[variables('names').vnet.name]" + ], + "tags": { + "displayName": "networkInterfaces" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[variables('ids').pip]" + }, + "subnet": { + "id": "[variables('ids').subnet]" + } } + } + ], + "dnsSettings": { + "dnsServers": [] }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vm-vsts-agent" - }, - "_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": "" - } + "enableIPForwarding": false + } }, - "variables": { - "ids": { - "avs": "[resourceId('Microsoft.Compute/availabilitySets', variables('names').avs)]", - "nic": "[resourceId('Microsoft.Network/networkInterfaces', variables('names').nic)]", - "pip": "[resourceId('Microsoft.Network/publicIPAddresses', variables('names').pip)]", - "subnet": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('names').vnet.name),'/subnets/', variables('names').vnet.subnet)]" + { + "name": "[variables('names').vm]", + "type": "Microsoft.Compute/virtualMachines", + "location": "[parameters('location')]", + "apiVersion": "2017-12-01", + "dependsOn": [ + "[variables('names').avs]", + "[variables('names').nic]" + ], + "tags": { + "displayName": "virtualMachines" + }, + "properties": { + "availabilitySet": { + "id": "[variables('ids').avs]" }, - "names": { - "avs": "[concat('avs-vsts-', uniqueString(resourceGroup().id))]", - "nic": "[concat('nic-vsts-', uniqueString(resourceGroup().id))]", - "pip": "[concat('pip-vsts-', uniqueString(resourceGroup().id))]", - "vm": "[concat('vm-vsts-', substring(uniqueString(resourceGroup().id), 0, 6))]", - "vnet": { - "name": "[concat('vn-vsts-', uniqueString(resourceGroup().id))]", - "addressPrefix": "10.0.0.0/16", - "subnet": "subnet-0", - "subnetPrefix": "10.0.0.0/24" - }, - "vsts": "[concat('agent-', uniqueString(resourceGroup().id))]" + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" }, - "powerShell": { - "script": "InstallVstsAgent.ps1", - "folder": "Scripts", - "parameters": "[concat('-vstsAccount ', parameters('vstsAccount'), ' -personalAccessToken ', parameters('vstsPersonalAccessToken'), ' -AgentName ', variables('names').vsts,' -PoolName ', parameters('vstsPoolName'), ' -AgentCount ', parameters('vstsAgentCount'), ' -AdminUser ', parameters('vmAdminUser'), ' -Modules ', variables('modules'))]" + "osProfile": { + "computerName": "[variables('names').vm]", + "adminUsername": "[parameters('vmAdminUser')]", + "adminPassword": "[parameters('vmAdminPassword')]", + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } }, - "singleQuote": "'", - "modules": "[replace(replace(replace(replace(replace(string(parameters('modules')), '[{\"', '@(@{'), '\":\"', concat(' = ', variables('singleQuote'))), '\",\"', concat(variables('singleQuote'), '; ')), '\"},{\"', concat(variables('singleQuote'), '}, @{')), '\"}]', concat(variables('singleQuote'), '})'))]" - }, - "resources": [ - { - "name": "[variables('names').avs]", - "type": "Microsoft.Compute/availabilitySets", - "location": "[resourceGroup().location]", - "apiVersion": "2017-12-01", - "dependsOn": [], - "tags": { - "displayName": "availabilitySets" - }, - "properties": { - "platformUpdateDomainCount": 5, - "platformFaultDomainCount": 2 - }, - "sku": { - "name": "Aligned" - } - }, - { - "name": "[variables('names').pip]", - "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", - "apiVersion": "2017-10-01", - "dependsOn": [], - "tags": { - "displayName": "publicIP" - }, - "properties": { - "dnsSettings": { - "domainNameLabel": "[parameters('publicIPDnsName')]" - }, - "idleTimeoutInMinutes": 4, - "publicIPAddressVersion": "IPv4", - "publicIPAllocationMethod": "Dynamic" + "storageProfile": { + "imageReference": { + "publisher": "MicrosoftVisualStudio", + "offer": "VisualStudio", + "sku": "VS-2017-Ent-WS2016", + "version": "latest" + }, + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" } + } }, - { - "name": "[variables('names').vnet.name]", - "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", - "apiVersion": "2017-10-01", - "dependsOn": [], - "tags": { - "displayName": "virtualNetwork" - }, - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('names').vnet.addressPrefix]" - ] - }, - "subnets": [ - { - "name": "[variables('names').vnet.subnet]", - "properties": { - "addressPrefix": "[variables('names').vnet.subnetPrefix]" - } - } - ] + "networkProfile": { + "networkInterfaces": [ + { + "id": "[variables('ids').nic]" } - }, + ] + } + }, + "resources": [ { - "name": "[variables('names').nic]", - "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", - "apiVersion": "2017-10-01", - "dependsOn": [ - "[variables('names').pip]", - "[variables('names').vnet.name]" - ], - "tags": { - "displayName": "networkInterfaces" + "name": "vstsAgent", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "2017-12-01", + "dependsOn": [ + "[variables('names').vm]" + ], + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.9", + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'), '/', variables('powerShell').folder, '/', variables('powerShell').script, parameters('_artifactsLocationSasToken'))]" + ] }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[variables('ids').pip]" - }, - "subnet": { - "id": "[variables('ids').subnet]" - } - } - } - ], - "dnsSettings": { - "dnsServers": [] - }, - "enableIPForwarding": false + "protectedSettings": { + "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -Command \"& {', './', variables('powerShell').script, ' ', variables('powerShell').parameters, '}\"')]" } - }, - { - "name": "[variables('names').vm]", - "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", - "apiVersion": "2017-12-01", - "dependsOn": [ - "[variables('names').avs]", - "[variables('names').nic]" - ], - "tags": { - "displayName": "virtualMachines" - }, - "properties": { - "availabilitySet": { - "id": "[variables('ids').avs]" - }, - "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" - }, - "osProfile": { - "computerName": "[variables('names').vm]", - "adminUsername": "[parameters('vmAdminUser')]", - "adminPassword": "[parameters('vmAdminPassword')]", - "windowsConfiguration": { - "provisionVMAgent": true, - "enableAutomaticUpdates": true - } - }, - "storageProfile": { - "imageReference": { - "publisher": "MicrosoftVisualStudio", - "offer": "VisualStudio", - "sku": "VS-2017-Ent-WS2016", - "version": "latest" - }, - "osDisk": { - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "Standard_LRS" - } - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[variables('ids').nic]" - } - ] - } - - }, - "resources": [ - { - "name": "vstsAgent", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "2017-12-01", - "dependsOn": [ - "[variables('names').vm]" - ], - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.9", - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'), '/', variables('powerShell').folder, '/', variables('powerShell').script, parameters('_artifactsLocationSasToken'))]" - ] - }, - "protectedSettings": { - "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -Command \"& {', './', variables('powerShell').script, ' ', variables('powerShell').parameters, '}\"')]" - } - } - } - ] - } - ], - "outputs": { - "Modules": { - "type" : "string", - "value": "[variables('modules')]" + } } + ] + } + ], + "outputs": { + "Modules": { + "type": "string", + "value": "[variables('modules')]" } + } } diff --git a/201-vm-win-iis-app-ssl/azuredeploy.json b/201-vm-win-iis-app-ssl/azuredeploy.json index 7b45e4113ce3..938a0c99e25a 100644 --- a/201-vm-win-iis-app-ssl/azuredeploy.json +++ b/201-vm-win-iis-app-ssl/azuredeploy.json @@ -12,14 +12,14 @@ "Standard_RAGRS", "Premium_LRS" ], - "metadata": { + "metadata": { "description": "Set this value for the storage account type" } }, "appVMName": { "type": "string", - "minLength": 1, - "metadata": { + "minLength": 1, + "metadata": { "description": "Set this value for the VM name" } }, @@ -83,7 +83,7 @@ "metadata": { "description": "Set this value for the VM size" } - }, + }, "_artifactsLocation": { "type": "string", "metadata": { @@ -131,6 +131,13 @@ "metadata": { "description": "name of the domain the certificate is created for" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -161,7 +168,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "appNetworkSecurityGroup", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -212,7 +219,7 @@ { "name": "appVnet", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[resourceId('Microsoft.Network/networkSecurityGroups', 'appNetworkSecurityGroup')]" @@ -248,7 +255,7 @@ { "name": "[variables('appStorageName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -261,7 +268,7 @@ { "name": "[variables('appVMNicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks', 'appVnet')]", @@ -290,7 +297,7 @@ { "name": "[parameters('appVMName')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('appStorageName'))]", @@ -308,9 +315,9 @@ "adminUsername": "[parameters('appVMAdminUsername')]", "adminPassword": "[parameters('appVMAdminPassword')]", "secrets": [ - { + { "sourceVault": { - "id": "[resourceId(parameters('vaultResourceGroup'), 'Microsoft.KeyVault/vaults', parameters('vaultName'))]" + "id": "[resourceId(parameters('vaultResourceGroup'), 'Microsoft.KeyVault/vaults', parameters('vaultName'))]" }, "vaultCertificates": [ { @@ -330,7 +337,7 @@ }, "osDisk": { "name": "appVMOSDisk", - "vhd": { + "vhd": { "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('appStorageName')), '2015-06-15').primaryEndpoints.blob, variables('appVMStorageAccountContainerName'),'/',variables('appVMOSDiskName'),'.vhd')]" }, "caching": "ReadWrite", @@ -349,7 +356,7 @@ { "name": "Microsoft.Powershell.DSC", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', parameters('appVMName'))]" @@ -386,7 +393,7 @@ { "name": "[variables('appPublicIPName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -400,6 +407,5 @@ } } ], - "outputs": { - } + "outputs": {} } diff --git a/201-vm-winrm-windows/azuredeploy.json b/201-vm-winrm-windows/azuredeploy.json index e89d58b307ad..dcb1baaff4e5 100644 --- a/201-vm-winrm-windows/azuredeploy.json +++ b/201-vm-winrm-windows/azuredeploy.json @@ -66,6 +66,13 @@ "metadata": { "description": "The name for the VM's Subnet." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -83,14 +90,14 @@ "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", "apiVersion": "2015-06-15", - "hostDNSNameScriptArgument": "[concat('*.',resourceGroup().location,'.cloudapp.azure.com')]" + "hostDNSNameScriptArgument": "[concat('*.',parameters('location'),'.cloudapp.azure.com')]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -102,7 +109,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -123,7 +130,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -149,7 +156,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -186,7 +193,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/WinRMCustomScriptExtension')]", "apiVersion": "[variables('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/201-vmaccess-on-ubuntu/azuredeploy.json b/201-vmaccess-on-ubuntu/azuredeploy.json index 085b5e491fee..783b29822bac 100644 --- a/201-vmaccess-on-ubuntu/azuredeploy.json +++ b/201-vmaccess-on-ubuntu/azuredeploy.json @@ -92,10 +92,16 @@ "metadata": { "description": "The user name you want to remove" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "api-version": "2015-06-15", "virtualNetworkName": "vnet-vmaccess", "nicName": "[parameters('vmName')]", "publicIPAddressName": "[parameters('vmName')]", @@ -115,7 +121,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -124,7 +130,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -136,7 +142,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -157,7 +163,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -183,7 +189,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -227,7 +233,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/enablevmaccess')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -247,4 +253,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-vmss-automation-dsc/azuredeploy.json b/201-vmss-automation-dsc/azuredeploy.json index 1189b50516ad..089e57ab076d 100644 --- a/201-vmss-automation-dsc/azuredeploy.json +++ b/201-vmss-automation-dsc/azuredeploy.json @@ -174,13 +174,16 @@ "metadata": { "description": "The job id to compile the configuration" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "computeApi": "2017-03-30", - "networkApi": "2017-04-01", - "storageApi": "2015-06-15", - "insightsApi": "2015-04-01", "automationApiVersion": "2015-10-31", "storageAccountType": "Standard_LRS", "saCount": 5, @@ -314,7 +317,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[concat(variables('uniqueStringArray')[copyIndex()], variables('newStorageAccountSuffix'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "copy": { "name": "storageLoop", @@ -327,7 +330,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('diagnosticsStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "properties": { "accountType": "[variables('storageAccountType')]" @@ -336,7 +339,7 @@ { "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-04-01", "properties": { "addressSpace": { @@ -357,7 +360,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-04-01", "properties": { "publicIPAllocationMethod": "Dynamic", @@ -369,7 +372,7 @@ { "type": "Microsoft.Network/loadBalancers", "name": "[variables('loadBalancerName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-04-01", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -454,7 +457,7 @@ { "type": "Microsoft.Compute/virtualMachineScaleSets", "name": "[variables('namingInfix')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-03-30", "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))]", @@ -614,7 +617,7 @@ "type": "Microsoft.Insights/autoscaleSettings", "apiVersion": "2015-04-01", "name": "autoscalehost", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachineScaleSets/', parameters('vmSSName'))]" ], @@ -685,4 +688,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/201-vmss-custom-image-existing-vnet-existing-app-gateway/azuredeploy.json b/201-vmss-custom-image-existing-vnet-existing-app-gateway/azuredeploy.json index 066f3948e7ae..832c2b550072 100644 --- a/201-vmss-custom-image-existing-vnet-existing-app-gateway/azuredeploy.json +++ b/201-vmss-custom-image-existing-vnet-existing-app-gateway/azuredeploy.json @@ -95,6 +95,13 @@ "description": "The name of the Backend Pool in the existing Application Gateway that will load-balance the instances of this VM Scale Set." }, "defaultValue": "appGatewayBackendPool" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -109,7 +116,7 @@ { "type": "Microsoft.Compute/virtualMachineScaleSets", "name": "[variables('vmssName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-04-30-preview", "sku": { "name": "[parameters('vmSku')]", @@ -118,7 +125,7 @@ }, "properties": { "overprovision": true, - "singlePlacementGroup": false, + "singlePlacementGroup": false, "upgradePolicy": { "mode": "[parameters('upgradePolicy')]" }, @@ -130,7 +137,7 @@ }, "osProfile": { "computerNamePrefix": "[variables('vmssName')]", - "adminUsername": "[parameters('adminUsername')]", + "adminUsername": "[parameters('adminUsername')]", "adminPassword": "[parameters('adminPassword')]" }, "networkProfile": { diff --git a/201-vmss-existing-vnet/prereqs/prereq.azuredeploy.json b/201-vmss-existing-vnet/prereqs/prereq.azuredeploy.json index 79678bee6f30..08911f24221f 100644 --- a/201-vmss-existing-vnet/prereqs/prereq.azuredeploy.json +++ b/201-vmss-existing-vnet/prereqs/prereq.azuredeploy.json @@ -1,52 +1,60 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "existingVnetName": "existingVirtualNetwork", - "existingVnetPrefix": "10.0.0.0/16", - "existingVnetFESubnetName": "subnet-1", - "existingVnetFESubnetPrefix": "10.0.1.0/24" - }, - "resources": [ - { - "name": "[variables('existingVnetName')]", - "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", - "apiVersion": "2017-04-01", - "dependsOn": [], - "tags": { - "displayName": "VirtualNetwork" - }, + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "existingVnetName": "existingVirtualNetwork", + "existingVnetPrefix": "10.0.0.0/16", + "existingVnetFESubnetName": "subnet-1", + "existingVnetFESubnetPrefix": "10.0.1.0/24" + }, + "resources": [ + { + "name": "[variables('existingVnetName')]", + "type": "Microsoft.Network/virtualNetworks", + "location": "[parameters('location')]", + "apiVersion": "2017-04-01", + "dependsOn": [], + "tags": { + "displayName": "VirtualNetwork" + }, + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('existingVnetPrefix')]" + ] + }, + "subnets": [ + { + "name": "[variables('existingVnetFESubnetName')]", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('existingVnetPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('existingVnetFESubnetName')]", - "properties": { - "addressPrefix": "[variables('existingVnetFESubnetPrefix')]" - } - } - ] + "addressPrefix": "[variables('existingVnetFESubnetPrefix')]" } - } - ], - "outputs": { - "existingVnetResourceGroupName": { - "type": "string", - "value": "[resourceGroup().name]" - }, - "existingVnetName": { - "type": "string", - "value": "[variables('existingVnetName')]" - }, - "existingSubnetName": { - "type": "string", - "value": "[variables('existingVnetFESubnetName')]" - } + } + ] + } + } + ], + "outputs": { + "existingVnetResourceGroupName": { + "type": "string", + "value": "[resourceGroup().name]" + }, + "existingVnetName": { + "type": "string", + "value": "[variables('existingVnetName')]" + }, + "existingSubnetName": { + "type": "string", + "value": "[variables('existingVnetFESubnetName')]" } -} \ No newline at end of file + } +} diff --git a/201-vmss-linux-customimage-autoscale/azuredeploy.json b/201-vmss-linux-customimage-autoscale/azuredeploy.json index e148095e5335..c0091f7da600 100644 --- a/201-vmss-linux-customimage-autoscale/azuredeploy.json +++ b/201-vmss-linux-customimage-autoscale/azuredeploy.json @@ -64,59 +64,66 @@ }, "appPackage": { "type": "string", - "metadata":{ + "metadata": { "description": "The source of the application package to copy using the configuration.sh script it should be inside the _artifacts/app folder" }, "defaultValue": "package.tar.gz" }, "destinationFolder": { "type": "string", - "metadata":{ - "description":"path were the appPackage will be copied inside the Linux machine" + "metadata": { + "description": "path were the appPackage will be copied inside the Linux machine" }, "defaultValue": "/nodeserver" }, "serviceName": { "type": "string", - "metadata":{ - "description":"name of the service that needs restart when the new package is copied" + "metadata": { + "description": "name of the service that needs restart when the new package is copied" }, "defaultValue": "mainsite.service" }, - "customScriptName":{ - "type":"string", + "customScriptName": { + "type": "string", "metadata": { "description": "name of the custom script to be run by bash" }, "defaultValue": "updateapp.sh" }, "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vmss-linux-customimage-autoscale" + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vmss-linux-customimage-autoscale" }, "_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": "" + "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": { - "vmssuniqueName": "[toLower(substring(concat(substring(parameters('vmssName'),0,6), uniqueString(resourceGroup().id)), 0, 9))]", - "vmssaccountType": "Standard_LRS", - "vmssnewAccountSuffix": "[concat(replace(variables('vmssuniqueName'),'-',''), 'sa')]", - "vmssstorageAccounts": [ + "vmssuniqueName": "[toLower(substring(concat(substring(parameters('vmssName'),0,6), uniqueString(resourceGroup().id)), 0, 9))]", + "vmssaccountType": "Standard_LRS", + "vmssnewAccountSuffix": "[concat(replace(variables('vmssuniqueName'),'-',''), 'sa')]", + "vmssstorageAccounts": [ "[concat(uniqueString(concat(variables('vmssnewAccountSuffix'), '0')))]", "[concat(uniqueString(concat(variables('vmssnewAccountSuffix'), '1')))]", "[concat(uniqueString(concat(variables('vmssnewAccountSuffix'), '2')))]", "[concat(uniqueString(concat(variables('vmssnewAccountSuffix'), '3')))]", "[concat(uniqueString(concat(variables('vmssnewAccountSuffix'), '4')))]" - ], - "vmsssaCount": "[length(variables('vmssstorageAccounts'))]", + ], + "vmsssaCount": "[length(variables('vmssstorageAccounts'))]", "addressPrefix": "10.0.0.0/16", "subnetPrefix": "10.0.0.0/24", "virtualNetworkName": "[concat(variables('vmssuniqueName'), 'vnet')]", @@ -140,7 +147,7 @@ { "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "properties": { "addressSpace": { @@ -161,7 +168,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[concat(variables('vmssStorageAccounts')[copyIndex()], variables('vmssnewAccountSuffix'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "copy": { "name": "storageLoop", @@ -174,7 +181,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('pipName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "properties": { "publicIPAllocationMethod": "Dynamic", @@ -186,7 +193,7 @@ { "type": "Microsoft.Network/loadBalancers", "name": "[variables('lbName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('pipName'))]" @@ -291,7 +298,7 @@ { "type": "Microsoft.Compute/virtualMachineScaleSets", "name": "[variables('vmssuniqueName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "storageLoop", @@ -380,7 +387,7 @@ "type": "Microsoft.Insights/autoscaleSettings", "apiVersion": "2015-04-01", "name": "autoscalesettings", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachineScaleSets/', variables('vmssuniqueName'))]" ], diff --git a/201-vmss-msi-linux/nestedtemplates/createVMSS.json b/201-vmss-msi-linux/nestedtemplates/createVMSS.json index b7bae1cc74b7..1021c52c46d2 100644 --- a/201-vmss-msi-linux/nestedtemplates/createVMSS.json +++ b/201-vmss-msi-linux/nestedtemplates/createVMSS.json @@ -18,7 +18,8 @@ "type": "string", "metadata": { "description": "The Location For the resources" - } + }, + "defaultValue": "[resourceGroup().location]" }, "vmSize": { "type": "string", @@ -68,7 +69,7 @@ "description": "The storage account URI for boot diagnostics for the VMs in the scale set" } }, - "linuxConfiguration": { + "linuxConfiguration": { "type": "object", "metadata": { "description": "The Linux configuration object" @@ -93,8 +94,7 @@ } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Compute/virtualMachineScaleSets", @@ -106,14 +106,14 @@ "tier": "Standard", "capacity": 0 }, - "identity": { - "type": "systemAssigned" + "identity": { + "type": "systemAssigned" }, "properties": { "upgradePolicy": { "mode": "Manual" }, - "overprovision":"[parameters('overProvision')]", + "overprovision": "[parameters('overProvision')]", "virtualMachineProfile": { "storageProfile": { "osDisk": { @@ -138,7 +138,7 @@ { "name": "[parameters('nicName')]", "properties": { - "primary":true, + "primary": true, "ipConfigurations": [ { "name": "ipconfig1", @@ -159,7 +159,7 @@ } ], "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', Parameters('networkSecurityGroupName'))]" + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', Parameters('networkSecurityGroupName'))]" } } } diff --git a/201-vmss-msi-linux/nestedtemplates/setUpRBAC.json b/201-vmss-msi-linux/nestedtemplates/setUpRBAC.json index 861d4c4b8228..6b5a3f215c09 100644 --- a/201-vmss-msi-linux/nestedtemplates/setUpRBAC.json +++ b/201-vmss-msi-linux/nestedtemplates/setUpRBAC.json @@ -17,7 +17,7 @@ }, "variables": { "owner": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "RBACResourceName":"[concat(parameters('storageAccountName'),'/Microsoft.Authorization/',parameters('principalId'))]" + "RBACResourceName": "[concat(parameters('storageAccountName'),'/Microsoft.Authorization/',parameters('principalId'))]" }, "resources": [ { @@ -31,4 +31,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-vmss-msi-windows/nestedtemplates/createVMSS.json b/201-vmss-msi-windows/nestedtemplates/createVMSS.json index b04b47202cd2..aeed62f3685e 100644 --- a/201-vmss-msi-windows/nestedtemplates/createVMSS.json +++ b/201-vmss-msi-windows/nestedtemplates/createVMSS.json @@ -28,7 +28,8 @@ "type": "string", "metadata": { "description": "The Location For the resources" - } + }, + "defaultValue": "[resourceGroup().location]" }, "vmSize": { "type": "string", @@ -79,8 +80,7 @@ } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Compute/virtualMachineScaleSets", @@ -92,14 +92,14 @@ "tier": "Standard", "capacity": 0 }, - "identity": { - "type": "systemAssigned" + "identity": { + "type": "systemAssigned" }, "properties": { "upgradePolicy": { "mode": "Manual" }, - "overprovision":"[parameters('overProvision')]", + "overprovision": "[parameters('overProvision')]", "virtualMachineProfile": { "storageProfile": { "osDisk": { @@ -123,14 +123,14 @@ { "name": "[parameters('nicName')]", "properties": { - "primary":true, + "primary": true, "ipConfigurations": [ { "name": "ipconfig1", "properties": { "subnet": { "id": "[parameters('subnetRef')]" - }, + }, "publicipaddressconfiguration": { "name": "publicip", "properties": { @@ -144,7 +144,7 @@ } ], "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', Parameters('networkSecurityGroupName'))]" + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', Parameters('networkSecurityGroupName'))]" } } } diff --git a/201-vmss-msi-windows/nestedtemplates/setUpRBAC.json b/201-vmss-msi-windows/nestedtemplates/setUpRBAC.json index 861d4c4b8228..6b5a3f215c09 100644 --- a/201-vmss-msi-windows/nestedtemplates/setUpRBAC.json +++ b/201-vmss-msi-windows/nestedtemplates/setUpRBAC.json @@ -17,7 +17,7 @@ }, "variables": { "owner": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "RBACResourceName":"[concat(parameters('storageAccountName'),'/Microsoft.Authorization/',parameters('principalId'))]" + "RBACResourceName": "[concat(parameters('storageAccountName'),'/Microsoft.Authorization/',parameters('principalId'))]" }, "resources": [ { @@ -31,4 +31,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-vmss-ubuntu-web-gitpull/azuredeploy.json b/201-vmss-ubuntu-web-gitpull/azuredeploy.json index 7640c4cf56de..7d8db4ab1de8 100644 --- a/201-vmss-ubuntu-web-gitpull/azuredeploy.json +++ b/201-vmss-ubuntu-web-gitpull/azuredeploy.json @@ -72,6 +72,13 @@ "metadata": { "description": "Repo in form user@repo.gitservice.com" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -105,7 +112,7 @@ { "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "properties": { "addressSpace": { @@ -126,7 +133,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('pipName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "properties": { "publicIPAllocationMethod": "Dynamic", @@ -138,7 +145,7 @@ { "type": "Microsoft.Network/loadBalancers", "name": "[variables('lbName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('pipName'))]" @@ -243,7 +250,7 @@ { "type": "Microsoft.Compute/virtualMachineScaleSets", "name": "[variables('namingInfix')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-04-30-preview", "dependsOn": [ "[concat('Microsoft.Network/loadBalancers/', variables('lbName'))]", diff --git a/201-vmss-ubuntu-web-ssl/azuredeploy.json b/201-vmss-ubuntu-web-ssl/azuredeploy.json index e437c9df2059..693dc0173530 100644 --- a/201-vmss-ubuntu-web-ssl/azuredeploy.json +++ b/201-vmss-ubuntu-web-ssl/azuredeploy.json @@ -100,6 +100,13 @@ "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": { @@ -133,7 +140,7 @@ { "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "properties": { "addressSpace": { @@ -154,7 +161,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('pipName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "properties": { "publicIPAllocationMethod": "Dynamic", @@ -166,7 +173,7 @@ { "type": "Microsoft.Network/loadBalancers", "name": "[variables('lbName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('pipName'))]" @@ -271,7 +278,7 @@ { "type": "Microsoft.Compute/virtualMachineScaleSets", "name": "[variables('namingInfix')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-04-30-preview", "dependsOn": [ "[concat('Microsoft.Network/loadBalancers/', variables('lbName'))]", diff --git a/201-vmss-win-iis-app-ssl/azuredeploy.json b/201-vmss-win-iis-app-ssl/azuredeploy.json index cf43878ad906..6e7762efb3d4 100644 --- a/201-vmss-win-iis-app-ssl/azuredeploy.json +++ b/201-vmss-win-iis-app-ssl/azuredeploy.json @@ -209,6 +209,13 @@ "metadata": { "description": "name of the domain the certificate is created for" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -219,7 +226,6 @@ "appVnetSubnet2Prefix": "10.0.1.0/24", "appVMImagePublisher": "MicrosoftWindowsServer", "appVMImageOffer": "WindowsServer", - "appVMOSDiskName": "appVMOSDisk", "frontEndVMSize": "[parameters('frontEndVMSize')]", "serviceVMSize": "[parameters('serviceVMSize')]", "appVMVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'appVnet')]", @@ -227,8 +233,6 @@ "serviceVMSubnetRef": "[concat(variables('appVMVnetID'), '/subnets/', variables('appVnetSubnet1Name'))]", "appPublicIPName": "appPublicIP", "servicePublicIPName": "servicePublicIP", - "appDSCArchiveFolder": "dsc", - "appDSCArchiveFileName": "appDSC.zip", "frontEndVMSSName": "[parameters('frontEndVMSSName')]", "serviceVMSSName": "[parameters('serviceVMSSName')]", "publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('appPublicIPName'))]", @@ -247,24 +251,16 @@ "lbFEServiceIPConfigID": "[concat(variables('lbServiceID'),'/frontendIPConfigurations/',variables('lbFEServiceName'))]", "lbBEAddressPoolID": "[concat(variables('lbID'),'/backendAddressPools/',variables('lbBEAddressPool'))]", "lbBEServiceAddressPoolID": "[concat(variables('lbServiceID'),'/backendAddressPools/',variables('lbBEServiceAddressPool'))]", - "lbWebProbeID": "[concat(variables('lbID'),'/probes/',variables('lbWebProbeName'))]", "lbWebServiceProbeID": "[concat(variables('lbServiceID'),'/probes/',variables('lbWebServiceProbeName'))]", - "frontEndDSCConfigurationFunction": "frontEndDSCConfiguration.ps1\\Main", "frontEndDSCVMSSArchiveFolder": "dsc", "frontEndDSCVMSSArchiveFileName": "frontEndDSCVMSS.zip", - "serviceDSCConfigurationFunction": "serviceDSCConfiguration.ps1\\Main", "serviceDSCVMSSArchiveFolder": "dsc", "serviceDSCVMSSArchiveFileName": "serviceDSCVMSS.zip", - "wadProcessorMetricName": "\\Processor(_Total)\\% Processor Time", - "namingInfixFrontEnd": "[toLower(substring(concat(parameters('frontEndVMSSName'), uniqueString(resourceGroup().id)), 0, 9))]", - "longNamingInfixFrontEnd": "[toLower(parameters('frontEndVMSSName'))]", "natPoolNameFrontEnd": "natpoolfe", - "bePoolNameFrontEnd": "bepoolfe", "natStartPortFrontEnd": 50000, "natEndPortFrontEnd": 50119, "natBackendPortFrontEnd": 3389, "natPoolNameService": "natpoolsvc", - "bePoolNameService": "bepoolsvc", "natStartPortService": 51000, "natEndPortService": 51119, "natBackendPortService": 3389, @@ -273,10 +269,7 @@ "lbWebInboundNatPoolId": "[concat(variables('lbID'), '/inboundNatPools/', variables('natPoolNameFrontEnd'))]", "lbServiceInboundNatPoolId": "[concat(variables('lbServiceID'), '/inboundNatPools/', variables('natPoolNameService'))]", "wadProcessorMetricName2": "Percentage CPU", - "wadProcessorMetricName3": "Percentage CPU", - "wadMemoryMetricName1": "Percentage Memory", - "profileName": "testCDNProfile", - "endpointName": "[concat('testCDNEP', uniqueString(resourceGroup().id))]", + "wadProcessorMetricName3": "Percentage CPU" "lbWebHttpsProbeName": "loadBalancerWebHttpsProbe", "lbWebHttpsProbeID": "[concat(variables('lbID'),'/probes/',variables('lbWebHttpsProbeName'))]" }, @@ -285,7 +278,7 @@ "apiVersion": "2015-06-15", "name": "[variables('lbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('appPublicIPName'))]" ], @@ -386,7 +379,7 @@ "apiVersion": "2015-06-15", "name": "[variables('lbServiceName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('servicePublicIPName'))]" ], @@ -459,7 +452,7 @@ "type": "Microsoft.Compute/virtualMachineScaleSets", "apiVersion": "2016-04-30-preview", "name": "[variables('frontEndVMSSName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "vmsstag1": "Rev VMSS FE" }, @@ -577,7 +570,7 @@ "type": "Microsoft.Compute/virtualMachineScaleSets", "apiVersion": "2016-04-30-preview", "name": "[variables('serviceVMSSName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "vmsstag1": "rev Service" }, @@ -680,7 +673,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "appNetworkSecurityGroup", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -731,7 +724,7 @@ { "name": "appVnet", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[resourceId('Microsoft.Network/networkSecurityGroups', 'appNetworkSecurityGroup')]" @@ -770,7 +763,7 @@ { "name": "[variables('appPublicIPName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -786,7 +779,7 @@ { "name": "[variables('servicePublicIPName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -804,7 +797,7 @@ "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachineScaleSets', variables('frontEndVMSSName'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[concat(variables('frontEndVMSSName'), 'autoscale')]", "properties": { "name": "[concat(variables('frontEndVMSSName'), 'autoscale')]", @@ -869,7 +862,7 @@ { "name": "[concat(variables('serviceVMSSName'), 'autoscale')]", "type": "Microsoft.Insights/autoscaleSettings", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-04-01", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachineScaleSets', variables('serviceVMSSName'))]" diff --git a/201-vmss-windows-customimage/templates/storageaccount.json b/201-vmss-windows-customimage/templates/storageaccount.json index 3da76208c893..a3e3423653eb 100644 --- a/201-vmss-windows-customimage/templates/storageaccount.json +++ b/201-vmss-windows-customimage/templates/storageaccount.json @@ -19,6 +19,13 @@ "metadata": { "description": "Storage Account type" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -26,10 +33,10 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } } ] -} \ No newline at end of file +} diff --git a/201-vmss-windows-webapp-dsc-autoscale/azuredeploy.json b/201-vmss-windows-webapp-dsc-autoscale/azuredeploy.json index dbfc3b573009..a422ece15ecd 100644 --- a/201-vmss-windows-webapp-dsc-autoscale/azuredeploy.json +++ b/201-vmss-windows-webapp-dsc-autoscale/azuredeploy.json @@ -85,6 +85,13 @@ "metadata": { "description": "Version number of the DSC deployment. Changing this value on subsequent deployments will trigger the extension to run." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -124,7 +131,7 @@ { "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "properties": { "addressSpace": { @@ -145,7 +152,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "properties": { "publicIPAllocationMethod": "Static", @@ -157,7 +164,7 @@ { "type": "Microsoft.Network/loadBalancers", "name": "[variables('loadBalancerName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" @@ -229,7 +236,7 @@ { "type": "Microsoft.Compute/virtualMachineScaleSets", "name": "[variables('namingInfix')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-04-30-preview", "dependsOn": [ "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'))]", @@ -320,7 +327,7 @@ "type": "Microsoft.Insights/autoscaleSettings", "apiVersion": "2015-04-01", "name": "autoscalehost", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachineScaleSets/', variables('namingInfix'))]" ], diff --git a/201-vnet-2subnets-service-endpoints-storage-integration/azuredeploy.json b/201-vnet-2subnets-service-endpoints-storage-integration/azuredeploy.json index 7573eb51ac4a..97b4db231341 100644 --- a/201-vnet-2subnets-service-endpoints-storage-integration/azuredeploy.json +++ b/201-vnet-2subnets-service-endpoints-storage-integration/azuredeploy.json @@ -1,246 +1,254 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "metadata": { - "description": "VM admin user name" - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "VM admin password" - } - }, - "vnetName": { - "type": "string", - "defaultValue": "VNet1", - "metadata": { - "description": "Name of the virtual network" - } - }, - "vnetAddressPrefix": { - "type": "string", - "defaultValue": "10.0.0.0/16", - "metadata": { - "description": "Address prefix for the virtual network" - } - }, - "subnet1Name": { - "type": "string", - "defaultValue": "subnet1", - "metadata": { - "description": "Name of the first subnet in the VNet" - } - }, - "subnet1Prefix": { - "type": "string", - "defaultValue": "10.0.1.0/24", - "metadata": { - "description": "Address prefix for subnet1" - } - }, - "subnet2Name": { - "type": "string", - "defaultValue": "subnet2", - "metadata": { - "description": "Name of the second subnet in the VNet" - } - }, - "subnet2Prefix": { - "type": "string", - "defaultValue": "10.0.2.0/24", - "metadata": { - "description": "Address prefix for subnet2" - } - }, - "storageAccountType": { - "type": "string", - "defaultValue": "Standard_LRS", - "metadata": { - "description": "Geo-replication type of Storage account" - }, - "allowedValues": [ - "Standard_LRS", - "Standard_GRS", - "Standard_ZRS", - "Premium_LRS" - ] + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "type": "string", + "metadata": { + "description": "VM admin user name" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "VM admin password" + } + }, + "vnetName": { + "type": "string", + "defaultValue": "VNet1", + "metadata": { + "description": "Name of the virtual network" + } + }, + "vnetAddressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/16", + "metadata": { + "description": "Address prefix for the virtual network" + } + }, + "subnet1Name": { + "type": "string", + "defaultValue": "subnet1", + "metadata": { + "description": "Name of the first subnet in the VNet" + } + }, + "subnet1Prefix": { + "type": "string", + "defaultValue": "10.0.1.0/24", + "metadata": { + "description": "Address prefix for subnet1" + } + }, + "subnet2Name": { + "type": "string", + "defaultValue": "subnet2", + "metadata": { + "description": "Name of the second subnet in the VNet" + } + }, + "subnet2Prefix": { + "type": "string", + "defaultValue": "10.0.2.0/24", + "metadata": { + "description": "Address prefix for subnet2" } }, - "variables": { - "storageAccountName": "[uniqueString(resourceGroup().id)]", - "publicIpAddressName": "pip", - "vmName": "testvm", - "subnetId": [ - "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnet1Name'))]", - "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnet2Name'))]" + "storageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Geo-replication type of Storage account" + }, + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_ZRS", + "Premium_LRS" ] }, - "resources": [ - { - "apiVersion": "2017-09-01", - "type": "Microsoft.Network/virtualNetworks", - "name": "[parameters('vnetName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[parameters('vnetAddressPrefix')]" - ] + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountName": "[uniqueString(resourceGroup().id)]", + "publicIpAddressName": "pip", + "vmName": "testvm", + "subnetId": [ + "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnet1Name'))]", + "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnet2Name'))]" + ] + }, + "resources": [ + { + "apiVersion": "2017-09-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('vnetName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('vnetAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "subnet1", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "serviceEndpoints": [ + { + "service": "Microsoft.Storage" + } + ] + } }, - "subnets": [ - { - "name": "subnet1", - "properties": { - "addressPrefix": "[parameters('subnet1Prefix')]", - "serviceEndpoints": [ { "service": "Microsoft.Storage" } ] - } - }, - { - "name": "subnet2", - "properties": { - "addressPrefix": "[parameters('subnet2Prefix')]" - } + { + "name": "subnet2", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]" } - ] - } + } + ] + } + }, + { + "apiVersion": "2017-09-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(variables('publicIPAddressName'), copyIndex())]", + "location": "[parameters('location')]", + "copy": { + "name": "pipLoop", + "count": 2 }, - { - "apiVersion": "2017-09-01", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[concat(variables('publicIPAddressName'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "pipLoop", - "count": 2 - }, - "properties": { - "publicIPAllocationMethod": "Dynamic" - } + "properties": { + "publicIPAllocationMethod": "Dynamic" + } + }, + { + "apiVersion": "2016-10-01", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat('nic', copyIndex())]", + "location": "[parameters('location')]", + "dependsOn": [ + "[parameters('vnetName')]", + "pipLoop" + ], + "copy": { + "name": "nicLoop", + "count": 2 }, - { - "apiVersion": "2016-10-01", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat('nic', copyIndex())]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[parameters('vnetName')]", - "pipLoop" - ], - "copy": { - "name": "nicLoop", - "count": 2 - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": - { - "privateIPAllocationMethod": "Dynamic", - "subnet": - { - "id": "[variables('subnetId')[copyIndex()]]" - }, - "publicIPAddress": - { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(variables('publicIPAddressName'), copyIndex()))]" - } + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[variables('subnetId')[copyIndex()]]" + }, + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(variables('publicIPAddressName'), copyIndex()))]" } } - ] - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', parameters('vnetName'))]" - ], - "sku": { - "name": "[parameters('storageAccountType')]" - }, - "kind": "Storage", - "properties": { - "networkAcls": { - "bypass": "None", - "virtualNetworkRules": [ - { - "id": "[variables('subnetId')[0]]", - "action": "Allow" - } - ], - "defaultAction": "Deny" } - } + ] + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', parameters('vnetName'))]" + ], + "sku": { + "name": "[parameters('storageAccountType')]" }, - { - "apiVersion": "2017-03-30", - "type": "Microsoft.Compute/availabilitySets", - "name": "as1", - "location": "[resourceGroup().location]", - "sku": { - "name": "Aligned" - }, - "properties": { - "platformFaultDomainCount": 2, - "platformUpdateDomainCount": 2 + "kind": "Storage", + "properties": { + "networkAcls": { + "bypass": "None", + "virtualNetworkRules": [ + { + "id": "[variables('subnetId')[0]]", + "action": "Allow" + } + ], + "defaultAction": "Deny" } + } + }, + { + "apiVersion": "2017-03-30", + "type": "Microsoft.Compute/availabilitySets", + "name": "as1", + "location": "[parameters('location')]", + "sku": { + "name": "Aligned" }, - { - "apiVersion": "2017-03-30", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('vmName'), copyIndex())]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", - "nicLoop", - "Microsoft.Compute/availabilitySets/as1" - ], - "copy": { - "name": "vmLoop", - "count": 2 - }, - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets', 'as1')]" - }, - "hardwareProfile": { - "vmSize": "Standard_A1" - }, - "osProfile": { - "computername": "[concat(variables('vmName'), copyIndex())]", - "adminUsername": "[parameters('adminUserName')]", - "adminPassword": "[parameters('adminPassword')]" + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 2 + } + }, + { + "apiVersion": "2017-03-30", + "type": "Microsoft.Compute/virtualMachines", + "name": "[concat(variables('vmName'), copyIndex())]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "nicLoop", + "Microsoft.Compute/availabilitySets/as1" + ], + "copy": { + "name": "vmLoop", + "count": 2 + }, + "properties": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', 'as1')]" + }, + "hardwareProfile": { + "vmSize": "Standard_A1" + }, + "osProfile": { + "computername": "[concat(variables('vmName'), copyIndex())]", + "adminUsername": "[parameters('adminUserName')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "MicrosoftWindowsServer", + "offer": "WindowsServer", + "sku": "2016-Datacenter", + "version": "latest" }, - "storageProfile": { - "imageReference": { - "publisher": "MicrosoftWindowsServer", - "offer": "WindowsServer", - "sku": "2016-Datacenter", - "version": "latest" - }, - "osDisk": { - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "Standard_LRS" - } - }, - "dataDisks": [ ] + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat('nic',copyIndex()))]" - } - ] - } + "dataDisks": [] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat('nic',copyIndex()))]" + } + ] } } - ] - } + } + ] +} diff --git a/201-vsts-cloudloadtest-rig-existing-vnet/azuredeploy.json b/201-vsts-cloudloadtest-rig-existing-vnet/azuredeploy.json index 48b7059edc44..a8ad51d3a8b9 100644 --- a/201-vsts-cloudloadtest-rig-existing-vnet/azuredeploy.json +++ b/201-vsts-cloudloadtest-rig-existing-vnet/azuredeploy.json @@ -1,232 +1,236 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vstsAccountName": { - "type": "String", - "metadata": { - "description": "Please enter the VSTS account name. If you access your VSTS account using 'https://yourAccountName.visualstudio.com', enter yourAccountName." - } - }, - "vstsPersonalAccessToken": { - "type": "SecureString", - "metadata": { - "description": "Personal Access Token (PAT) for the VSTS account. You should select the scope as 'Load test (read and write)'. Please refer 'https://www.visualstudio.com/en-us/get-started/setup/use-personal-access-tokens-to-authenticate' for more details." - } - }, - "agentCount": { - "defaultValue": 1, - "type": "Int", - "metadata": { - "description":"Number of load generating agent machines to provision" - } - }, - "publicIPAddressType": { - "type": "string", - "defaultValue": "Dynamic", - "allowedValues": [ - "Dynamic", - "Static" - ], - "metadata": { - "description": "Type of public IP allocation method" - } - }, - "adminUsername": { - "type": "String", - "metadata": { - "description":"Username for the virtual machine." - } - }, - "adminPassword": { - "type": "SecureString", - "metadata": { - "description":"Password for the virtual machine." - } - }, - "existingVNetResourceGroupName": { - "type": "String", - "metadata": { - "description": "Name of the existing VNET resource group" - } - }, - "existingVNetName": { - "type": "String", - "metadata": { - "description": "Name of the existing VNet" - } - }, - "subnetName": { - "type": "String", - "metadata": { - "description": "Name of the subnet in the virtual network you want to use" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vstsAccountName": { + "type": "String", + "metadata": { + "description": "Please enter the VSTS account name. If you access your VSTS account using 'https://yourAccountName.visualstudio.com', enter yourAccountName." + } + }, + "vstsPersonalAccessToken": { + "type": "SecureString", + "metadata": { + "description": "Personal Access Token (PAT) for the VSTS account. You should select the scope as 'Load test (read and write)'. Please refer 'https://www.visualstudio.com/en-us/get-started/setup/use-personal-access-tokens-to-authenticate' for more details." + } + }, + "agentCount": { + "defaultValue": 1, + "type": "Int", + "metadata": { + "description": "Number of load generating agent machines to provision" + } + }, + "publicIPAddressType": { + "type": "string", + "defaultValue": "Dynamic", + "allowedValues": [ + "Dynamic", + "Static" + ], + "metadata": { + "description": "Type of public IP allocation method" + } + }, + "adminUsername": { + "type": "String", + "metadata": { + "description": "Username for the virtual machine." + } }, - "variables": { - "sizeOfDiskInGB": "100", - "imagePublisher": "MicrosoftWindowsServer", - "imageOffer": "WindowsServer", - "addressPrefix": "10.0.0.0/16", - "sequenceVersion": "[uniqueString(resourceGroup().id)]", - "uniqueStringValue": "[substring(variables('sequenceVersion'), 3, 7)]", - "subnetPrefix": "10.0.0.0/24", - "storageAccountType": "Standard_LRS", - "vmName": "[concat('vm', variables('uniqueStringValue'))]", - "vmSize": "Standard_D4_v2", - "storageAccountName": "[concat('storage', variables('uniqueStringValue'))]", - "vmStorageAccountContainerName": "vhd", - "publicIPAddressName": "[concat('publicip', variables('uniqueStringValue'))]", - "publicIPAddressType":"[parameters('publicIPAddressType')]", - "nicName": "[concat('nic', variables('uniqueStringValue'))]", - "dataDisk1VhdName": "datadisk", - "windowsOSVersion": "2012-R2-Datacenter", - "OSDiskName": "osdisk", - "vnetID": "[resourceId(parameters('existingVNetResourceGroupName'), 'Microsoft.Network/virtualNetworks', parameters('existingVNetName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/', parameters('subnetName'))]", - "apiVersion": "2015-06-15", - "agentGroupName":"[resourceGroup().name]" + "adminPassword": { + "type": "SecureString", + "metadata": { + "description": "Password for the virtual machine." + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "existingVNetResourceGroupName": { + "type": "String", + "metadata": { + "description": "Name of the existing VNET resource group" + } + }, + "existingVNetName": { + "type": "String", + "metadata": { + "description": "Name of the existing VNet" + } + }, + "subnetName": { + "type": "String", + "metadata": { + "description": "Name of the subnet in the virtual network you want to use" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "sizeOfDiskInGB": "100", + "imagePublisher": "MicrosoftWindowsServer", + "imageOffer": "WindowsServer", + "sequenceVersion": "[uniqueString(resourceGroup().id)]", + "uniqueStringValue": "[substring(variables('sequenceVersion'), 3, 7)]", + "storageAccountType": "Standard_LRS", + "vmName": "[concat('vm', variables('uniqueStringValue'))]", + "vmSize": "Standard_D4_v2", + "storageAccountName": "[concat('storage', variables('uniqueStringValue'))]", + "vmStorageAccountContainerName": "vhd", + "publicIPAddressName": "[concat('publicip', variables('uniqueStringValue'))]", + "publicIPAddressType": "[parameters('publicIPAddressType')]", + "nicName": "[concat('nic', variables('uniqueStringValue'))]", + "dataDisk1VhdName": "datadisk", + "windowsOSVersion": "2012-R2-Datacenter", + "OSDiskName": "osdisk", + "vnetID": "[resourceId(parameters('existingVNetResourceGroupName'), 'Microsoft.Network/virtualNetworks', parameters('existingVNetName'))]", + "subnetRef": "[concat(variables('vnetID'),'/subnets/', parameters('subnetName'))]", + "agentGroupName": "[resourceGroup().name]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "accountType": "[variables('storageAccountType')]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(variables('publicIPAddressName'),'i', copyIndex())]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "copy": { + "name": "publicAddressCopy", + "count": "[parameters('agentCount')]" + }, + "properties": { + "publicIPAllocationMethod": "[variables('publicIPAddressType')]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('nicName'), 'i', copyIndex())]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "copy": { + "name": "nicCopy", + "count": "[parameters('agentCount')]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "accountType": "[variables('storageAccountType')]" + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('publicIPAddressName'),'i', copyIndex()))]" + }, + "subnet": { + "id": "[variables('subnetRef')]" + } } + } + ] + }, + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/', concat(variables('publicIPAddressName'),'i', copyIndex()))]" + ] + }, + { + "type": "Microsoft.Compute/virtualMachines", + "name": "[concat(variables('vmName'), 'i',copyIndex())]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "copy": { + "name": "vmCopy", + "count": "[parameters('agentCount')]" + }, + "properties": { + "hardwareProfile": { + "vmSize": "[variables('vmSize')]" }, - { - "type": "Microsoft.Network/publicIPAddresses", - "name": "[concat(variables('publicIPAddressName'),'i', copyIndex())]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "publicAddressCopy", - "count": "[parameters('agentCount')]" - }, - "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]" - } + "osProfile": { + "computerName": "[concat(variables('vmName'), 'i',copyIndex())]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" }, - { - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('nicName'), 'i', copyIndex())]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicCopy", - "count": "[parameters('agentCount')]" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('publicIPAddressName'),'i', copyIndex()))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ] + "storageProfile": { + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[variables('windowsOSVersion')]", + "version": "latest" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',concat(variables('vmName'), copyIndex(), variables('OSDiskName')),'.vhd')]" }, - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', concat(variables('publicIPAddressName'),'i', copyIndex()))]" - ] + "caching": "ReadWrite", + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "datadisk", + "diskSizeGB": "[variables('sizeOfDiskInGB')]", + "lun": 0, + "vhd": { + "uri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', concat(variables('vmName'), copyIndex(), variables('dataDisk1VhdName')),'.vhd')]" + }, + "createOption": "Empty" + } + ] }, - { - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('vmName'), 'i',copyIndex())]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmCopy", - "count": "[parameters('agentCount')]" - }, - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computerName": "[concat(variables('vmName'), 'i',copyIndex())]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[variables('windowsOSVersion')]", - "version": "latest" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',concat(variables('vmName'), copyIndex(), variables('OSDiskName')),'.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "datadisk", - "diskSizeGB": "[variables('sizeOfDiskInGB')]", - "lun": 0, - "vhd": { - "uri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', concat(variables('vmName'), copyIndex(), variables('dataDisk1VhdName')),'.vhd')]" - }, - "createOption": "Empty" - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('nicName'), 'i', copyIndex()))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net')]" - } - } - }, - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', concat(variables('nicName'), 'i', copyIndex()))]" - ] + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('nicName'), 'i', copyIndex()))]" + } + ] }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'), 'i', copyIndex(), '/StartupScript')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmCopy", - "count": "[parameters('agentCount')]" - }, - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "forceUpdateTag": "[variables('sequenceVersion')]", - "typeHandlerVersion": "1.8", - "autoUpgradeMinorVersion": false, - "settings": { - "fileUris": [ - "https://elsprodch2su1.blob.core.windows.net/ets-containerfor-loadagentresources/bootstrap/ManageVSTSCloudLoadAgent.ps1" - ], - "commandToExecute":"[concat('powershell.exe -ExecutionPolicy Unrestricted -File .\\bootstrap\\ManageVSTSCloudLoadAgent.ps1 -TeamServicesAccountName ', parameters('vstsAccountName'), ' -PATToken ', parameters('vstsPersonalAccessToken'), ' -AgentGroupName ', variables('agentGroupName') , ' -ConfigureAgent')]" - } - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'), 'i', copyIndex()))]" - ] + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net')]" + } + } + }, + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', concat(variables('nicName'), 'i', copyIndex()))]" + ] + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmName'), 'i', copyIndex(), '/StartupScript')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "copy": { + "name": "vmCopy", + "count": "[parameters('agentCount')]" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "forceUpdateTag": "[variables('sequenceVersion')]", + "typeHandlerVersion": "1.8", + "autoUpgradeMinorVersion": false, + "settings": { + "fileUris": [ + "https://elsprodch2su1.blob.core.windows.net/ets-containerfor-loadagentresources/bootstrap/ManageVSTSCloudLoadAgent.ps1" + ], + "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File .\\bootstrap\\ManageVSTSCloudLoadAgent.ps1 -TeamServicesAccountName ', parameters('vstsAccountName'), ' -PATToken ', parameters('vstsPersonalAccessToken'), ' -AgentGroupName ', variables('agentGroupName') , ' -ConfigureAgent')]" } - ] -} \ No newline at end of file + }, + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'), 'i', copyIndex()))]" + ] + } + ] +} diff --git a/201-web-app-ase-create/prereqs/prereq.azuredeploy.json b/201-web-app-ase-create/prereqs/prereq.azuredeploy.json index ff61f178c531..8c99c63f6fd3 100644 --- a/201-web-app-ase-create/prereqs/prereq.azuredeploy.json +++ b/201-web-app-ase-create/prereqs/prereq.azuredeploy.json @@ -1,44 +1,55 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "existingVirtualNetworkName": "vnet", - "existingSubnetName": "subnet-1" - }, - "resources": [{ - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('existingVirtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "West US", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" - }, - "dependsOn": [], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "[variables('existingSubnetName')]", - "properties": { - "addressPrefix": "10.0.1.0/24" - } - }] - } - }], - "outputs": { - "existingVnetResourceId": { - "type": "string", - "value": "[resourceId('Microsoft.Network/virtualNetworks/', variables('existingVirtualNetworkName'))]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "existingVirtualNetworkName": "vnet", + "existingSubnetName": "subnet-1" + }, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('existingVirtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - "subnetName": { - "type": "string", - "value": "[variables('existingSubnetName')]" - } - + "subnets": [ + { + "name": "[variables('existingSubnetName')]", + "properties": { + "addressPrefix": "10.0.1.0/24" + } + } + ] + } + } + ], + "outputs": { + "existingVnetResourceId": { + "type": "string", + "value": "[resourceId('Microsoft.Network/virtualNetworks/', variables('existingVirtualNetworkName'))]" + }, + "subnetName": { + "type": "string", + "value": "[variables('existingSubnetName')]" } + } } diff --git a/201-web-app-ase-ilb-create/prereqs/prereq.azuredeploy.json b/201-web-app-ase-ilb-create/prereqs/prereq.azuredeploy.json index ff9e883303a7..43883a4e9644 100644 --- a/201-web-app-ase-ilb-create/prereqs/prereq.azuredeploy.json +++ b/201-web-app-ase-ilb-create/prereqs/prereq.azuredeploy.json @@ -1,43 +1,55 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "existingVirtualNetworkName": "vnet", - "existingSubnetName": "subnet-1" - }, - "resources": [{ - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('existingVirtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "West US", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" - }, - "dependsOn": [], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "[variables('existingSubnetName')]", - "properties": { - "addressPrefix": "10.0.1.0/24" - } - }] - } - }], - "outputs": { - "existingVnetResourceId": { - "type": "string", - "value": "[resourceId('Microsoft.Network/virtualNetworks/',variables('existingVirtualNetworkName'))]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "existingVirtualNetworkName": "vnet", + "existingSubnetName": "subnet-1" + }, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('existingVirtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - "subnetName": { - "type": "string", - "value": "[variables('existingSubnetName')]" - } + "subnets": [ + { + "name": "[variables('existingSubnetName')]", + "properties": { + "addressPrefix": "10.0.1.0/24" + } + } + ] + } + } + ], + "outputs": { + "existingVnetResourceId": { + "type": "string", + "value": "[resourceId('Microsoft.Network/virtualNetworks/',variables('existingVirtualNetworkName'))]" + }, + "subnetName": { + "type": "string", + "value": "[variables('existingSubnetName')]" } + } } diff --git a/201-web-app-asev2-create/prereqs/prereq.azuredeploy.json b/201-web-app-asev2-create/prereqs/prereq.azuredeploy.json index fae14071d70f..0a56c9ceaa25 100644 --- a/201-web-app-asev2-create/prereqs/prereq.azuredeploy.json +++ b/201-web-app-asev2-create/prereqs/prereq.azuredeploy.json @@ -1,47 +1,51 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "existingVirtualNetworkName": "vnet", - "existingSubnetName": "subnet-ASE" - }, - "resources": [{ - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('existingVirtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "South Central US", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" - }, - "dependsOn": [], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "[variables('existingSubnetName')]", - "properties": { - "addressPrefix": "10.0.1.0/25" - } - }] - } - }], - "outputs": { - "virtualNetwork": { - "type": "string", - "value": "[variables('existingVirtualNetworkName')]" - }, - "subnet": { - "type": "string", - "value": "[variables('existingSubnetName')]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "variables": { + "existingVirtualNetworkName": "vnet", + "existingSubnetName": "subnet-ASE" + }, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('existingVirtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "South Central US", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - "rgName": { - "type": "string", - "value": "[resourceGroup().name]" - } + "subnets": [ + { + "name": "[variables('existingSubnetName')]", + "properties": { + "addressPrefix": "10.0.1.0/25" + } + } + ] + } + } + ], + "outputs": { + "virtualNetwork": { + "type": "string", + "value": "[variables('existingVirtualNetworkName')]" + }, + "subnet": { + "type": "string", + "value": "[variables('existingSubnetName')]" + }, + "rgName": { + "type": "string", + "value": "[resourceGroup().name]" } -} \ No newline at end of file + } +} diff --git a/201-web-app-asev2-ilb-create/prereqs/prereq.azuredeploy.json b/201-web-app-asev2-ilb-create/prereqs/prereq.azuredeploy.json index fae14071d70f..0a56c9ceaa25 100644 --- a/201-web-app-asev2-ilb-create/prereqs/prereq.azuredeploy.json +++ b/201-web-app-asev2-ilb-create/prereqs/prereq.azuredeploy.json @@ -1,47 +1,51 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "existingVirtualNetworkName": "vnet", - "existingSubnetName": "subnet-ASE" - }, - "resources": [{ - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('existingVirtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "South Central US", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" - }, - "dependsOn": [], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "[variables('existingSubnetName')]", - "properties": { - "addressPrefix": "10.0.1.0/25" - } - }] - } - }], - "outputs": { - "virtualNetwork": { - "type": "string", - "value": "[variables('existingVirtualNetworkName')]" - }, - "subnet": { - "type": "string", - "value": "[variables('existingSubnetName')]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "variables": { + "existingVirtualNetworkName": "vnet", + "existingSubnetName": "subnet-ASE" + }, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('existingVirtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "South Central US", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - "rgName": { - "type": "string", - "value": "[resourceGroup().name]" - } + "subnets": [ + { + "name": "[variables('existingSubnetName')]", + "properties": { + "addressPrefix": "10.0.1.0/25" + } + } + ] + } + } + ], + "outputs": { + "virtualNetwork": { + "type": "string", + "value": "[variables('existingVirtualNetworkName')]" + }, + "subnet": { + "type": "string", + "value": "[variables('existingSubnetName')]" + }, + "rgName": { + "type": "string", + "value": "[resourceGroup().name]" } -} \ No newline at end of file + } +} diff --git a/201-web-app-asp-app-on-ase-create/prereqs/prereq.azuredeploy.json b/201-web-app-asp-app-on-ase-create/prereqs/prereq.azuredeploy.json index 5ecfa479d573..c5c2affc50d1 100644 --- a/201-web-app-asp-app-on-ase-create/prereqs/prereq.azuredeploy.json +++ b/201-web-app-asp-app-on-ase-create/prereqs/prereq.azuredeploy.json @@ -1,9 +1,7 @@ { "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": { - - }, + "parameters": {}, "variables": { "location": "West US", "asename": "[concat('ase',uniqueString(resourceGroup().id))]", diff --git a/201-web-app-blob-connection/azuredeploy.json b/201-web-app-blob-connection/azuredeploy.json index 07f68fe03b08..0d52ff492b22 100644 --- a/201-web-app-blob-connection/azuredeploy.json +++ b/201-web-app-blob-connection/azuredeploy.json @@ -61,101 +61,107 @@ "metadata": { "description": "Sas token to be appended to DeployPackageURI." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "packageURI": "[concat(parameters('DeployPackageURI'), parameters('SasToken'))]", - "storageAccountId": "[concat(resourceGroup().id,'/providers/Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]" + "storageAccountId": "[concat(resourceGroup().id,'/providers/Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]" }, - "resources": [ - { - "name": "[parameters('WebAppSvcPlanName')]", - "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", - "apiVersion": "2014-06-01", - "dependsOn": [ ], - "tags": { - "displayName": "AppSvcPlan" - }, - "properties": { - "name": "[parameters('WebAppSvcPlanName')]", - "sku": "[parameters('WebAppSvcPlanSKU')]", - "workerSize": "[parameters('WebAppSvcPlanWorkerSize')]", - "numberOfWorkers": 1 - } - }, - { + "resources": [ + { + "name": "[parameters('WebAppSvcPlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('location')]", + "apiVersion": "2014-06-01", + "dependsOn": [], + "tags": { + "displayName": "AppSvcPlan" + }, + "properties": { + "name": "[parameters('WebAppSvcPlanName')]", + "sku": "[parameters('WebAppSvcPlanSKU')]", + "workerSize": "[parameters('WebAppSvcPlanWorkerSize')]", + "numberOfWorkers": 1 + } + }, + { + "name": "[parameters('WebAppName')]", + "type": "Microsoft.Web/sites", + "location": "[parameters('location')]", + "apiVersion": "2015-08-01", + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', parameters('WebAppSvcPlanName'))]" + ], + "tags": { + "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('WebAppSvcPlanName'))]": "Resource", + "displayName": "WebApp" + }, + "properties": { "name": "[parameters('WebAppName')]", - "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", - "apiVersion": "2015-08-01", - "dependsOn": [ - "[concat('Microsoft.Web/serverfarms/', parameters('WebAppSvcPlanName'))]" - ], - "tags": { - "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('WebAppSvcPlanName'))]": "Resource", - "displayName": "WebApp" + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', parameters('WebAppSvcPlanName'))]" + }, + "resources": [ + { + "apiVersion": "2015-08-01", + "name": "web", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('WebAppName'))]" + ], + "tags": { + "displayName": "WebAppConfig" + }, + "properties": { + "phpVersion": "5.6", + "netFrameworkVersion": "v4.6", + "use32BitWorkerProcess": false, + "webSocketsEnabled": true, + "alwaysOn": false, + "remoteDebuggingEnabled": true, + "remoteDebuggingVersion": "VS2015" + } }, - "properties": { - "name": "[parameters('WebAppName')]", - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', parameters('WebAppSvcPlanName'))]" + { + "name": "MSDeploy", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "2015-08-01", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('WebAppName'))]" + ], + "tags": { + "displayName": "WebAppMSDeploy" + }, + "properties": { + "packageUri": "[variables('packageURI')]" + } }, - "resources": [ - { - "apiVersion": "2015-08-01", - "name": "web", - "type": "config", - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('WebAppName'))]" - ], - "tags": { - "displayName": "WebAppConfig" - }, - "properties": { - "phpVersion": "5.6", - "netFrameworkVersion": "v4.6", - "use32BitWorkerProcess": false, - "webSocketsEnabled": true, - "alwaysOn": false, - "remoteDebuggingEnabled": true, - "remoteDebuggingVersion": "VS2015" - } + { + "name": "connectionstrings", + "type": "config", + "apiVersion": "2015-08-01", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('WebAppName'))]" + ], + "tags": { + "displayName": "WebAppConnectionStrings" }, - { - "name": "MSDeploy", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "2015-08-01", - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('WebAppName'))]" - ], - "tags": { - "displayName": "WebAppMSDeploy" - }, - "properties": { - "packageUri": "[variables('packageURI')]" + "properties": { + "BlobConnection": { + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountName'),';AccountKey=',concat(listKeys(variables('storageAccountId'),'2015-05-01-preview').key1))]", + "type": "Custom" } - }, - { - "name": "connectionstrings", - "type": "config", - "apiVersion": "2015-08-01", - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('WebAppName'))]" - ], - "tags": { - "displayName": "WebAppConnectionStrings" - }, - "properties": { - "BlobConnection": { - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountName'),';AccountKey=',concat(listKeys(variables('storageAccountId'),'2015-05-01-preview').key1))]", - "type": "Custom" - } - } } - ] - } - ], - "outputs": { + } + ] } + ], + "outputs": {} } diff --git a/201-web-app-blob-connection/prereqs/prereq.azuredeploy.json b/201-web-app-blob-connection/prereqs/prereq.azuredeploy.json index 928ef9b80aa0..e096d3a22e9b 100644 --- a/201-web-app-blob-connection/prereqs/prereq.azuredeploy.json +++ b/201-web-app-blob-connection/prereqs/prereq.azuredeploy.json @@ -1,31 +1,39 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" - }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "comments": "Storage account used to store VM disks", - "tags": { - "displayName": "Storage Account" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": { - - } - }], - "outputs": { - "storageAccountName": { - "type": "string", - "value": "[variables('storageAccountName')]" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } -} \ No newline at end of file + }, + "variables": { + "storageAccountName": "[concat(uniqueString(resourceGroup().id),'storage')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store VM disks", + "tags": { + "displayName": "Storage Account" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + } + ], + "outputs": { + "storageAccountName": { + "type": "string", + "value": "[variables('storageAccountName')]" + } + } +} diff --git a/201-web-app-certificate-from-key-vault/azuredeploy.json b/201-web-app-certificate-from-key-vault/azuredeploy.json index dabda88d50b3..6aada643109f 100644 --- a/201-web-app-certificate-from-key-vault/azuredeploy.json +++ b/201-web-app-certificate-from-key-vault/azuredeploy.json @@ -1,81 +1,88 @@ { - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "existingServerFarmId":{ - "type":"string", - "metadata":{ - "description":"Existing App Service Plan resource id that contains the App Service being updated" - } - }, - "certificateName":{ - "type":"string", - "metadata":{ - "description":"User friendly certificate resource name" - } - }, - "existingKeyVaultId":{ - "type":"string", - "metadata":{ - "description":"Existing Key Vault resource Id with an access policy to allow Microsoft.Web RP to read Key Vault secrets (Checkout README.md for more information)" - } - }, - "existingKeyVaultSecretName":{ - "type":"string", - "metadata":{ - "description":"Key Vault Secret that contains a PFX certificate" - } - }, - "existingWebAppName":{ - "type":"string", - "metadata":{ - "description":"Existing App name to use for creating SSL binding. This App should have the hostname assigned as a custom domain" - } - }, - "hostname":{ - "type":"string", - "metadata":{ - "description":"Custom hostname for creating SSL binding. This hostname should already be assigned to the Web App" - } - }, - "existingAppLocation":{ - "type":"string", - "metadata":{ - "description":"App location" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "existingServerFarmId": { + "type": "string", + "metadata": { + "description": "Existing App Service Plan resource id that contains the App Service being updated" } - }, - "resources":[ - { - "type":"Microsoft.Web/certificates", - "name":"[parameters('certificateName')]", - "apiVersion":"2016-03-01", - "location":"[parameters('existingAppLocation')]", - "properties":{ - "keyVaultId":"[parameters('existingKeyVaultId')]", - "keyVaultSecretName":"[parameters('existingKeyVaultSecretName')]", - "serverFarmId":"[parameters('existingServerFarmId')]" - } - }, - { - "type":"Microsoft.Web/sites", - "name":"[parameters('existingWebAppName')]", - "apiVersion":"2016-03-01", - "location":"[parameters('existingAppLocation')]", - "dependsOn":[ - "[resourceId('Microsoft.Web/certificates', parameters('certificateName'))]" - ], - "properties":{ - "name":"[parameters('existingWebAppName')]", - "hostNameSslStates":[ - { - "name":"[parameters('hostname')]", - "sslState":"SniEnabled", - "thumbprint":"[reference(resourceId('Microsoft.Web/certificates', parameters('certificateName'))).Thumbprint]", - "toUpdate":true - } - ] - } + }, + "certificateName": { + "type": "string", + "metadata": { + "description": "User friendly certificate resource name" } - ] -} \ No newline at end of file + }, + "existingKeyVaultId": { + "type": "string", + "metadata": { + "description": "Existing Key Vault resource Id with an access policy to allow Microsoft.Web RP to read Key Vault secrets (Checkout README.md for more information)" + } + }, + "existingKeyVaultSecretName": { + "type": "string", + "metadata": { + "description": "Key Vault Secret that contains a PFX certificate" + } + }, + "existingWebAppName": { + "type": "string", + "metadata": { + "description": "Existing App name to use for creating SSL binding. This App should have the hostname assigned as a custom domain" + } + }, + "hostname": { + "type": "string", + "metadata": { + "description": "Custom hostname for creating SSL binding. This hostname should already be assigned to the Web App" + } + }, + "existingAppLocation": { + "type": "string", + "metadata": { + "description": "App location" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Web/certificates", + "name": "[parameters('certificateName')]", + "apiVersion": "2016-03-01", + "location": "[parameters('existingAppLocation')]", + "properties": { + "keyVaultId": "[parameters('existingKeyVaultId')]", + "keyVaultSecretName": "[parameters('existingKeyVaultSecretName')]", + "serverFarmId": "[parameters('existingServerFarmId')]" + } + }, + { + "type": "Microsoft.Web/sites", + "name": "[parameters('existingWebAppName')]", + "apiVersion": "2016-03-01", + "location": "[parameters('existingAppLocation')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/certificates', parameters('certificateName'))]" + ], + "properties": { + "name": "[parameters('existingWebAppName')]", + "hostNameSslStates": [ + { + "name": "[parameters('hostname')]", + "sslState": "SniEnabled", + "thumbprint": "[reference(resourceId('Microsoft.Web/certificates', parameters('certificateName'))).Thumbprint]", + "toUpdate": true + } + ] + } + } + ] +} diff --git a/201-web-app-github-deploy/azuredeploy.json b/201-web-app-github-deploy/azuredeploy.json index 584d6ef814e0..c3bfe19cca20 100644 --- a/201-web-app-github-deploy/azuredeploy.json +++ b/201-web-app-github-deploy/azuredeploy.json @@ -60,6 +60,13 @@ "metadata": { "description": "The branch of the GitHub repository to use." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -67,7 +74,7 @@ "apiVersion": "2015-08-01", "name": "[parameters('hostingPlanName')]", "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[parameters('sku')]", "capacity": "[parameters('workerSize')]" @@ -80,7 +87,7 @@ "apiVersion": "2015-08-01", "name": "[parameters('siteName')]", "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]" ], diff --git a/201-web-app-java-tomcat/azuredeploy.json b/201-web-app-java-tomcat/azuredeploy.json index d4de35f37fd0..51dd85730bc8 100644 --- a/201-web-app-java-tomcat/azuredeploy.json +++ b/201-web-app-java-tomcat/azuredeploy.json @@ -1,99 +1,106 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "hostingPlanName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "Name of the hosting plan to use in Azure." - } - }, - "webSiteName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "Name of the Azure Web app to create." - } - }, - "skuName": { - "type": "string", - "defaultValue": "F1", - "allowedValues": [ - "F1", - "D1", - "B1", - "B2", - "B3", - "S1", - "S2", - "S3", - "P1", - "P2", - "P3", - "P4" - ], - "metadata": { - "description": "Describes plan's pricing tier and instance size. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/" - } - }, - "skuCapacity": { - "type": "int", - "defaultValue": 1, - "minValue": 1, - "metadata": { - "description": "Describes plan's instance count" - } - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "hostingPlanName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "Name of the hosting plan to use in Azure." + } }, - "resources": [ - { - "apiVersion": "2015-08-01", - "name": "[parameters('hostingPlanName')]", - "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "HostingPlan" - }, - "sku": { - "name": "[parameters('skuName')]", - "capacity": "[parameters('skuCapacity')]" - }, - "properties": { - "name": "[parameters('hostingPlanName')]" - } - }, + "webSiteName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "Name of the Azure Web app to create." + } + }, + "skuName": { + "type": "string", + "defaultValue": "F1", + "allowedValues": [ + "F1", + "D1", + "B1", + "B2", + "B3", + "S1", + "S2", + "S3", + "P1", + "P2", + "P3", + "P4" + ], + "metadata": { + "description": "Describes plan's pricing tier and instance size. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/" + } + }, + "skuCapacity": { + "type": "int", + "defaultValue": 1, + "minValue": 1, + "metadata": { + "description": "Describes plan's instance count" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2015-08-01", + "name": "[parameters('hostingPlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('location')]", + "tags": { + "displayName": "HostingPlan" + }, + "sku": { + "name": "[parameters('skuName')]", + "capacity": "[parameters('skuCapacity')]" + }, + "properties": { + "name": "[parameters('hostingPlanName')]" + } + }, + { + "apiVersion": "2015-08-01", + "name": "[parameters('webSiteName')]", + "type": "Microsoft.Web/sites", + "location": "[parameters('location')]", + "tags": { + "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource", + "displayName": "Website" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" + ], + "properties": { + "name": "[parameters('webSiteName')]", + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]" + }, + "resources": [ { - "apiVersion": "2015-08-01", - "name": "[parameters('webSiteName')]", - "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", - "tags": { - "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource", - "displayName": "Website" - }, - "dependsOn": [ - "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" - ], - "properties": { - "name": "[parameters('webSiteName')]", - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]" - }, - "resources": [ - { - "apiVersion": "2015-08-01", - "name": "web", - "type": "config", - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('webSiteName'))]" - ], - "properties": { - "javaVersion": "1.8", - "javaContainer": "TOMCAT", - "javaContainerVersion": "8.0" - } - } - ] + "apiVersion": "2015-08-01", + "name": "web", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('webSiteName'))]" + ], + "properties": { + "javaVersion": "1.8", + "javaContainer": "TOMCAT", + "javaContainerVersion": "8.0" + } } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/201-web-app-python/azuredeploy.json b/201-web-app-python/azuredeploy.json index 2e42f1522f8b..344c1aa89ef6 100644 --- a/201-web-app-python/azuredeploy.json +++ b/201-web-app-python/azuredeploy.json @@ -1,97 +1,104 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "hostingPlanName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "Name of the hosting plan to use in Azure." - } - }, - "webSiteName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "Name of the Azure Web app to create." - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "hostingPlanName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "Name of the hosting plan to use in Azure." + } + }, + "webSiteName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "Name of the Azure Web app to create." + } + }, + "skuName": { + "type": "string", + "defaultValue": "F1", + "allowedValues": [ + "F1", + "D1", + "B1", + "B2", + "B3", + "S1", + "S2", + "S3", + "P1", + "P2", + "P3", + "P4" + ], + "metadata": { + "description": "Describes plan's pricing tier and instance size. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/" + } + }, + "skuCapacity": { + "type": "int", + "defaultValue": 1, + "minValue": 1, + "metadata": { + "description": "Describes plan's instance count" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "apiVersion": "2015-08-01", + "name": "[parameters('hostingPlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('location')]", + "tags": { + "displayName": "HostingPlan" }, - "skuName": { - "type": "string", - "defaultValue": "F1", - "allowedValues": [ - "F1", - "D1", - "B1", - "B2", - "B3", - "S1", - "S2", - "S3", - "P1", - "P2", - "P3", - "P4" - ], - "metadata": { - "description": "Describes plan's pricing tier and instance size. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/" - } + "sku": { + "name": "[parameters('skuName')]", + "capacity": "[parameters('skuCapacity')]" }, - "skuCapacity": { - "type": "int", - "defaultValue": 1, - "minValue": 1, - "metadata": { - "description": "Describes plan's instance count" - } + "properties": { + "name": "[parameters('hostingPlanName')]" } - }, - "resources": [ - { - "apiVersion": "2015-08-01", - "name": "[parameters('hostingPlanName')]", - "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "HostingPlan" - }, - "sku": { - "name": "[parameters('skuName')]", - "capacity": "[parameters('skuCapacity')]" - }, - "properties": { - "name": "[parameters('hostingPlanName')]" - } + }, + { + "apiVersion": "2015-08-01", + "name": "[parameters('webSiteName')]", + "type": "Microsoft.Web/sites", + "location": "[parameters('location')]", + "tags": { + "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource", + "displayName": "Website" }, - { - "apiVersion": "2015-08-01", - "name": "[parameters('webSiteName')]", - "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", - "tags": { - "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource", - "displayName": "Website" - }, - "dependsOn": [ - "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" - ], - "properties": { - "name": "[parameters('webSiteName')]", - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]" - }, - "resources": [ - { - "apiVersion": "2015-08-01", - "name": "web", - "type": "config", - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('webSiteName'))]" - ], - "properties": { - "pythonVersion": "3.4" - } - } - ] - } - ] -} \ No newline at end of file + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" + ], + "properties": { + "name": "[parameters('webSiteName')]", + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]" + }, + "resources": [ + { + "apiVersion": "2015-08-01", + "name": "web", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('webSiteName'))]" + ], + "properties": { + "pythonVersion": "3.4" + } + } + ] + } + ] +} diff --git a/201-web-app-redis-cache-sql-database/azuredeploy.json b/201-web-app-redis-cache-sql-database/azuredeploy.json index 6ed7cf4aa3d2..792298c2beab 100644 --- a/201-web-app-redis-cache-sql-database/azuredeploy.json +++ b/201-web-app-redis-cache-sql-database/azuredeploy.json @@ -127,6 +127,13 @@ "metadata": { "description": "The size of the new Azure Redis Cache instance. " } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -139,7 +146,7 @@ { "name": "[variables('sqlserverName')]", "type": "Microsoft.Sql/servers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "SqlServer" }, @@ -153,7 +160,7 @@ { "name": "[parameters('databaseName')]", "type": "databases", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "Database" }, @@ -174,7 +181,7 @@ "dependsOn": [ "[concat('Microsoft.Sql/servers/', variables('sqlserverName'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "AllowAllWindowsAzureIps", "properties": { "endIpAddress": "0.0.0.0", @@ -187,7 +194,7 @@ "apiVersion": "2015-08-01", "name": "[variables('hostingPlanName')]", "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "HostingPlan" }, @@ -203,7 +210,7 @@ "apiVersion": "2015-08-01", "name": "[variables('webSiteName')]", "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Web/serverFarms/', variables('hostingPlanName'))]", "[concat('Microsoft.Cache/Redis/', variables('cacheName'))]" @@ -247,21 +254,21 @@ ] }, { - "name": "[variables('cacheName')]", - "type": "Microsoft.Cache/Redis", - "location": "[resourceGroup().location]", - "apiVersion": "2015-08-01", - "dependsOn": [ ], - "tags": { - "displayName": "cache" - }, - "properties": { - "sku": { - "name": "[parameters('cacheSKUName')]", - "family": "[parameters('cacheSKUFamily')]", - "capacity": "[parameters('cacheSKUCapacity')]" - } - } + "name": "[variables('cacheName')]", + "type": "Microsoft.Cache/Redis", + "location": "[parameters('location')]", + "apiVersion": "2015-08-01", + "dependsOn": [], + "tags": { + "displayName": "cache" + }, + "properties": { + "sku": { + "name": "[parameters('cacheSKUName')]", + "family": "[parameters('cacheSKUFamily')]", + "capacity": "[parameters('cacheSKUCapacity')]" + } } + } ] } diff --git a/201-web-app-sql-database/azuredeploy.json b/201-web-app-sql-database/azuredeploy.json index ca35ffa5f0e8..960d9a10d476 100644 --- a/201-web-app-sql-database/azuredeploy.json +++ b/201-web-app-sql-database/azuredeploy.json @@ -42,6 +42,13 @@ "metadata": { "description": "The password of the admin user of the SQL Server" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -54,7 +61,7 @@ { "name": "[variables('sqlserverName')]", "type": "Microsoft.Sql/servers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "SqlServer" }, @@ -68,7 +75,7 @@ { "name": "[variables('databaseName')]", "type": "databases", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "Database" }, @@ -89,7 +96,7 @@ "dependsOn": [ "[variables('sqlserverName')]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "AllowAllWindowsAzureIps", "properties": { "endIpAddress": "0.0.0.0", @@ -102,7 +109,7 @@ "apiVersion": "2016-03-01", "name": "[variables('hostingPlanName')]", "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "HostingPlan" }, @@ -118,7 +125,7 @@ "apiVersion": "2016-03-01", "name": "[variables('webSiteName')]", "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('hostingPlanName')]" ], @@ -151,7 +158,7 @@ "apiVersion": "2015-04-01", "name": "[concat(variables('hostingPlanName'), '-', resourceGroup().name)]", "type": "Microsoft.Insights/autoscalesettings", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "[concat('hidden-link:', resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName')))]": "Resource", "displayName": "AutoScaleSettings" @@ -217,7 +224,7 @@ "apiVersion": "2015-04-01", "name": "[concat('ServerErrors ', variables('webSiteName'))]", "type": "Microsoft.Insights/alertrules", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('webSiteName')]" ], @@ -243,7 +250,7 @@ "action": { "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", "sendToServiceOwners": true, - "customEmails": [ ] + "customEmails": [] } } }, @@ -251,7 +258,7 @@ "apiVersion": "2015-04-01", "name": "[concat('ForbiddenRequests ', variables('webSiteName'))]", "type": "Microsoft.Insights/alertrules", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('webSiteName')]" ], @@ -277,7 +284,7 @@ "action": { "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", "sendToServiceOwners": true, - "customEmails": [ ] + "customEmails": [] } } }, @@ -285,7 +292,7 @@ "apiVersion": "2015-04-01", "name": "[concat('CPUHigh ', variables('hostingPlanName'))]", "type": "Microsoft.Insights/alertrules", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('hostingPlanName')]" ], @@ -311,7 +318,7 @@ "action": { "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", "sendToServiceOwners": true, - "customEmails": [ ] + "customEmails": [] } } }, @@ -319,7 +326,7 @@ "apiVersion": "2015-04-01", "name": "[concat('LongHttpQueue ', variables('hostingPlanName'))]", "type": "Microsoft.Insights/alertrules", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('hostingPlanName')]" ], @@ -345,7 +352,7 @@ "action": { "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", "sendToServiceOwners": true, - "customEmails": [ ] + "customEmails": [] } } }, @@ -376,5 +383,4 @@ "value": "[reference(concat('Microsoft.Sql/servers/', variables('sqlserverName'))).fullyQualifiedDomainName]" } } - } diff --git a/201-web-app-with-redis-cache/azuredeploy.json b/201-web-app-with-redis-cache/azuredeploy.json index 0a9c19eb6d5d..1a4f3cdef372 100644 --- a/201-web-app-with-redis-cache/azuredeploy.json +++ b/201-web-app-with-redis-cache/azuredeploy.json @@ -67,6 +67,13 @@ "metadata": { "description": "The size of the new Azure Redis Cache instance. " } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -79,7 +86,7 @@ "apiVersion": "2015-08-01", "name": "[variables('hostingPlanName')]", "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "HostingPlan" }, @@ -95,7 +102,7 @@ "apiVersion": "2015-08-01", "name": "[variables('webSiteName')]", "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Web/serverFarms/', variables('hostingPlanName'))]", "[concat('Microsoft.Cache/Redis/', variables('cacheName'))]" @@ -126,9 +133,9 @@ { "name": "[variables('cacheName')]", "type": "Microsoft.Cache/Redis", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-08-01", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "cache" }, @@ -141,4 +148,4 @@ } } ] -} \ No newline at end of file +} diff --git a/201-zerto-zca/azuredeploy.json b/201-zerto-zca/azuredeploy.json index 141047b1c185..493d75e9b403 100644 --- a/201-zerto-zca/azuredeploy.json +++ b/201-zerto-zca/azuredeploy.json @@ -1,234 +1,237 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "storageAccountType": { - "type": "string", - "defaultValue": "Standard_LRS", - "allowedValues": [ - "Standard_LRS", - "Standard_ZRS", - "Standard_GRS", - "Standard_RAGRS", - "Premium_LRS" - ], - "metadata":{ - "description":"Storage Account type" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "storageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_ZRS", + "Standard_GRS", + "Standard_RAGRS", + "Premium_LRS" + ], + "metadata": { + "description": "Storage Account type" + } + }, + "vmAdminUserName": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "Virtual Machine user name" + } + }, + "vmAdminPassword": { + "type": "securestring", + "metadata": { + "description": "Virtual Machine password" + } + }, + "dnsNameForPublicIP": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "Public IP dns name" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "vmName": "zca-vm", + "vnetPrefix": "10.0.0.0/16", + "vnetSubnet1Name": "Subnet-1", + "vnetSubnet1Prefix": "10.0.0.0/24", + "vnetSubnet2Name": "Subnet-2", + "vnetSubnet2Prefix": "10.0.1.0/24", + "vmOSDiskName": "vmOSDisk", + "vmVmSize": "Standard_DS3_v2", + "vmSubnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', 'vnet', variables('vnetSubnet1Name'))]", + "vmStorageAccountContainerName": "vhds", + "vmNicName": "[concat(variables('vmName'), 'NetworkInterface')]", + "pipName": "pip", + "nsgName": "zca-nsg", + "newStorageAccountName": "[concat('zerto', uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "name": "[variables('newStorageAccountName')]", + "type": "Microsoft.Storage/storageAccounts", + "location": "[parameters('location')]", + "apiVersion": "2016-01-01", + "sku": { + "name": "[parameters('storageAccountType')]" }, - "vmAdminUserName": { - "type": "string", - "minLength": 1, - "metadata": { - "description" : "Virtual Machine user name" - } + "dependsOn": [], + "tags": { + "displayName": "storageAccount" }, - "vmAdminPassword": { - "type": "securestring", - "metadata": { - "description" : "Virtual Machine password" - } - }, - "dnsNameForPublicIP": { - "type": "string", - "minLength": 1, - "metadata": { - "description" : "Public IP dns name" - } - } - }, - "variables": { - "vmName":"zca-vm", - "vnetPrefix": "10.0.0.0/16", - "vnetSubnet1Name": "Subnet-1", - "vnetSubnet1Prefix": "10.0.0.0/24", - "vnetSubnet2Name": "Subnet-2", - "vnetSubnet2Prefix": "10.0.1.0/24", - "vmImagePublisher": "MicrosoftWindowsServer", - "vmImageOffer": "WindowsServer", - "vmOSDiskName": "vmOSDisk", - "vmVmSize": "Standard_DS3_v2", - "vmSubnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', 'vnet', variables('vnetSubnet1Name'))]", - "vmStorageAccountContainerName": "vhds", - "vmNicName": "[concat(variables('vmName'), 'NetworkInterface')]", - "pipName": "pip", - "nsgName" : "zca-nsg", - "newStorageAccountName": "[concat('zerto', uniqueString(resourceGroup().id))]" + "kind": "Storage" }, - "resources": [ - { - "name": "[variables('newStorageAccountName')]", - "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", - "apiVersion": "2016-01-01", - "sku": { - "name": "[parameters('storageAccountType')]" - }, - "dependsOn": [ ], - "tags": { - "displayName": "storageAccount" - }, - "kind": "Storage" + { + "name": "vnet", + "type": "Microsoft.Network/virtualNetworks", + "location": "[parameters('location')]", + "apiVersion": "2016-03-30", + "dependsOn": [], + "tags": { + "displayName": "vnet" }, - { - "name": "vnet", - "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", - "apiVersion": "2016-03-30", - "dependsOn": [ ], - "tags": { - "displayName": "vnet" + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vnetPrefix')]" + ] }, - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('vnetPrefix')]" - ] + "subnets": [ + { + "name": "[variables('vnetSubnet1Name')]", + "properties": { + "addressPrefix": "[variables('vnetSubnet1Prefix')]" + } }, - "subnets": [ - { - "name": "[variables('vnetSubnet1Name')]", - "properties": { - "addressPrefix": "[variables('vnetSubnet1Prefix')]" - } - }, - { - "name": "[variables('vnetSubnet2Name')]", - "properties": { - "addressPrefix": "[variables('vnetSubnet2Prefix')]" - } + { + "name": "[variables('vnetSubnet2Name')]", + "properties": { + "addressPrefix": "[variables('vnetSubnet2Prefix')]" } - ] - } + } + ] + } + }, + { + "name": "[variables('vmNicName')]", + "type": "Microsoft.Network/networkInterfaces", + "location": "[parameters('location')]", + "apiVersion": "2016-03-30", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', 'vnet')]", + "[resourceId('Microsoft.Network/publicIPAddresses', variables('pipName'))]" + ], + "tags": { + "displayName": "vmNic" }, - { - "name": "[variables('vmNicName')]", - "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", - "apiVersion": "2016-03-30", - "dependsOn": [ - "[resourceId('Microsoft.Network/virtualNetworks', 'vnet')]", - "[resourceId('Microsoft.Network/publicIPAddresses', variables('pipName'))]" - ], - "tags": { - "displayName": "vmNic" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[variables('vmSubnetRef')]" - }, - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('pipName'))]" - } + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[variables('vmSubnetRef')]" + }, + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('pipName'))]" } } - ], - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" - } + } + ], + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" } + } + }, + { + "name": "[variables('vmName')]", + "type": "Microsoft.Compute/virtualMachines", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('newStorageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" + ], + "tags": { + "displayName": "vm" }, - { - "name": "[variables('vmName')]", - "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('newStorageAccountName'))]", - "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" - ], - "tags": { - "displayName": "vm" + "plan": { + "name": "zerto60ga", + "publisher": "zerto", + "product": "zerto-cloud-appliance-50" + }, + "properties": { + "hardwareProfile": { + "vmSize": "[variables('vmVmSize')]" }, - "plan": { - "name": "zerto60ga", - "publisher": "zerto", - "product": "zerto-cloud-appliance-50" + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[parameters('vmAdminUsername')]", + "adminPassword": "[parameters('vmAdminPassword')]" }, - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmVmSize')]" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('vmAdminUsername')]", - "adminPassword": "[parameters('vmAdminPassword')]" + "storageProfile": { + "imageReference": { + "publisher": "zerto", + "offer": "zerto-cloud-appliance-50", + "sku": "zerto60ga", + "version": "latest" }, - "storageProfile": { - "imageReference": { - "publisher": "zerto", - "offer": "zerto-cloud-appliance-50", - "sku": "zerto60ga", - "version": "latest" + "osDisk": { + "name": "vmOSDisk", + "vhd": { + "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('newStorageAccountName')), '2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/', variables('vmOSDiskName'), '.vhd')]" }, - "osDisk": { - "name": "vmOSDisk", - "vhd": { - "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('newStorageAccountName')), '2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/', variables('vmOSDiskName'), '.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" - } - ] + "caching": "ReadWrite", + "createOption": "FromImage" } - } - }, - { - "name": "[variables('pipName')]", - "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", - "apiVersion": "2016-03-30", - "dependsOn": [ ], - "tags": { - "displayName": "pip" }, - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[parameters('dnsNameForPublicIP')]" - } + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" + } + ] } + } + }, + { + "name": "[variables('pipName')]", + "type": "Microsoft.Network/publicIPAddresses", + "location": "[parameters('location')]", + "apiVersion": "2016-03-30", + "dependsOn": [], + "tags": { + "displayName": "pip" }, - { - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('nsgName')]", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "AllowRDP", - "etag": "W/\"ec1cdead-18a3-4ae4-b0fa-1d58260ead30\"", - "properties": { - "provisioningState": "Succeeded", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "3389", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 100, - "direction": "Inbound", - "sourceAddressPrefixes": [], - "destinationAddressPrefixes": [] - } - } - ] - } + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[parameters('dnsNameForPublicIP')]" + } + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('nsgName')]", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "AllowRDP", + "etag": "W/\"ec1cdead-18a3-4ae4-b0fa-1d58260ead30\"", + "properties": { + "provisioningState": "Succeeded", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "3389", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound", + "sourceAddressPrefixes": [], + "destinationAddressPrefixes": [] + } } - - ], - "outputs": {} - } - + ] + } + } + ], + "outputs": {} +} diff --git a/301-2fe-lb80-rdp-1be-nsg-rdp/azuredeploy.json b/301-2fe-lb80-rdp-1be-nsg-rdp/azuredeploy.json index 9bc712c9730b..12fc26c1ee8d 100644 --- a/301-2fe-lb80-rdp-1be-nsg-rdp/azuredeploy.json +++ b/301-2fe-lb80-rdp-1be-nsg-rdp/azuredeploy.json @@ -19,6 +19,13 @@ "metadata": { "description": "The password for the administrator account of the new VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -36,15 +43,14 @@ "imageSku": "2012-R2-Datacenter", "SQLimagePublisher": "MicrosoftSQLServer", "SQLimageOffer": "SQL2014SP1-WS2012R2", - "SQLimageSku": "Web", - "ApiVersion": "2015-06-15" + "SQLimageSku": "Web" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "publicIp", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -56,7 +62,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "vmsqlIp", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -65,7 +71,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": 2, "platformUpdateDomainCount": 2, @@ -76,7 +82,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -85,7 +91,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "VNET", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -106,7 +112,7 @@ "apiVersion": "2015-06-15", "name": "loadBalancer", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Network/publicIPAddresses/publicIp" ], @@ -189,7 +195,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "vmsql", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -217,7 +223,7 @@ "name": "netIntLoop", "count": "[variables('numberOfInstances')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Network/virtualNetworks/VNET", "Microsoft.Network/loadBalancers/loadBalancer" @@ -250,7 +256,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicsql')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Network/virtualNetworks/VNET", "Microsoft.Network/networkSecurityGroups/vmsql" @@ -283,7 +289,7 @@ "name": "virtualMachineLoop", "count": "[variables('numberOfInstances')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts',variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/',variables('vmName'),copyindex())]", @@ -331,7 +337,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "vmsql", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts',variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/',variables('nicsql'))]" @@ -372,4 +378,4 @@ } } ] -} \ No newline at end of file +} diff --git a/301-2fe-linux-lb80-ssh-1be-win-nsg-rdp-datadisk-ssd/azuredeploy.json b/301-2fe-linux-lb80-ssh-1be-win-nsg-rdp-datadisk-ssd/azuredeploy.json index e84303d74771..f01134bff9e5 100644 --- a/301-2fe-linux-lb80-ssh-1be-win-nsg-rdp-datadisk-ssd/azuredeploy.json +++ b/301-2fe-linux-lb80-ssh-1be-win-nsg-rdp-datadisk-ssd/azuredeploy.json @@ -77,6 +77,13 @@ "metadata": { "description": "VM size allowed for SQL Server Back End" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -89,21 +96,19 @@ "nicsql": "[concat(variables('vmName'),'sql')]", "storageAccountNameDiag": "[concat('diag',uniqueString(resourceGroup().id))]", "subnet-id": "[concat(resourceId('Microsoft.Network/virtualNetworks','VNET'),'/subnets/',variables('subnetName'))]", - "storageAccountType": "[parameters('storageType')]", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "imageSku": "14.04.2-LTS", "SQLimagePublisher": "MicrosoftSQLServer", "SQLimageOffer": "SQL2014SP1-WS2012R2", - "SQLimageSku": "Web", - "ApiVersion": "2015-06-15" + "SQLimageSku": "Web" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "publicIp", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -115,7 +120,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "vmsqlIp", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -124,7 +129,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "myavlset", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": 2, "platformUpdateDomainCount": 2, @@ -135,7 +140,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountNameDiag')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -144,7 +149,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "VNET", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -165,7 +170,7 @@ "apiVersion": "2015-06-15", "name": "loadBalancer", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Network/publicIPAddresses/publicIp" ], @@ -248,7 +253,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "vmsql", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -276,7 +281,7 @@ "name": "netIntLoop", "count": "[variables('numberOfInstances')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Network/virtualNetworks/VNET", "Microsoft.Network/loadBalancers/loadBalancer" @@ -309,7 +314,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicsql')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Network/virtualNetworks/VNET", "Microsoft.Network/networkSecurityGroups/vmsql" @@ -342,7 +347,7 @@ "name": "virtualMachineLoop", "count": "[variables('numberOfInstances')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts',variables('storageAccountNameDiag'))]", "[concat('Microsoft.Network/networkInterfaces/',variables('vmName'),copyindex())]", @@ -390,7 +395,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "vmsql", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts',variables('storageAccountNameDiag'))]", "[concat('Microsoft.Network/networkInterfaces/',variables('nicsql'))]" @@ -444,4 +449,4 @@ } } ] -} \ No newline at end of file +} diff --git a/301-azure-relay-create-authrule-namespace-and-hybridconnection/azuredeploy.json b/301-azure-relay-create-authrule-namespace-and-hybridconnection/azuredeploy.json index 15e1b56124bf..9e7394d5fbda 100644 --- a/301-azure-relay-create-authrule-namespace-and-hybridconnection/azuredeploy.json +++ b/301-azure-relay-create-authrule-namespace-and-hybridconnection/azuredeploy.json @@ -25,10 +25,17 @@ "metadata": { "description": "Name of the HybridConnection AuthorizationRule" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-04-01", "namespaceAuthRuleName": "[concat(parameters('namespaceName'), concat('/', parameters('namespaceAuthorizationRuleName')))]", "nsAuthorizationRuleResourceId": "[resourceId('Microsoft.Relay/namespaces/authorizationRules', parameters('namespaceName'), parameters('namespaceAuthorizationRuleName'))]", @@ -103,4 +110,4 @@ "value": "[listkeys(variables('hcAuthorizationRuleResourceId'), variables('apiVersion')).primaryKey]" } } -} \ No newline at end of file +} diff --git a/301-azure-relay-create-authrule-namespace-and-wcfrelay/azuredeploy.json b/301-azure-relay-create-authrule-namespace-and-wcfrelay/azuredeploy.json index 1a0e3f00a3c3..374bd0323b72 100644 --- a/301-azure-relay-create-authrule-namespace-and-wcfrelay/azuredeploy.json +++ b/301-azure-relay-create-authrule-namespace-and-wcfrelay/azuredeploy.json @@ -35,10 +35,17 @@ "metadata": { "description": "Name of the WcfRelay AuthorizationRule" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-04-01", "namespaceAuthRuleName": "[concat(parameters('namespaceName'), concat('/', parameters('namespaceAuthorizationRuleName')))]", "nsAuthorizationRuleResourceId": "[resourceId('Microsoft.Relay/namespaces/authorizationRules', parameters('namespaceName'), parameters('namespaceAuthorizationRuleName'))]", @@ -53,7 +60,7 @@ "sku": { "name": "Standard" }, - "properties": { }, + "properties": {}, "resources": [ { "apiVersion": "[variables('apiVersion')]", @@ -118,4 +125,4 @@ "value": "[listkeys(variables('hcAuthorizationRuleResourceId'), variables('apiVersion')).primaryKey]" } } -} \ No newline at end of file +} diff --git a/301-create-ad-forest-with-subdomain/azuredeploy.json b/301-create-ad-forest-with-subdomain/azuredeploy.json index 3ed4121f18d3..65ba245df6c8 100644 --- a/301-create-ad-forest-with-subdomain/azuredeploy.json +++ b/301-create-ad-forest-with-subdomain/azuredeploy.json @@ -33,7 +33,6 @@ "minlength": 2, "maxlength": 15 }, - "adminUsername": { "type": "string", "metadata": { @@ -48,7 +47,6 @@ }, "minlength": 8 }, - "VMSize": { "type": "string", "allowedValues": [ @@ -82,7 +80,6 @@ "description": "Windows Server Version." } }, - "virtualNetworkName": { "type": "string", "metadata": { @@ -122,7 +119,6 @@ }, "defaultValue": "10.0.0.0/24" }, - "RootDC1Name": { "type": "string", "metadata": { @@ -200,15 +196,19 @@ "description": "SAS storage token to access _artifactsLocation. No need to change unless you copy or fork this template." }, "defaultValue": "" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", - "adSubnetRef": "[concat(variables('vnetID'),'/subnets/',parameters('adSubnetName'))]", "adNSGName": "[concat(parameters('adSubnetName'),'NSG')]", "adAvailabilitySetNameRoot": "AvailSetRoot", "adAvailabilitySetNameChild": "AvailSetChild", - "firstVMTemplateUri": "[concat(parameters('_artifactsLocation'),'/nested/CreateAndPrepnewVM.json',parameters('_artifactsLocationSasToken'))]", "nextVMTemplateUri": "[concat(parameters('_artifactsLocation'),'/nested/CreateAndPrepnewVM.json',parameters('_artifactsLocationSasToken'))]", "vnetTemplateUri": "[concat(parameters('_artifactsLocation'),'/nested/vnet.json',parameters('_artifactsLocationSasToken'))]", @@ -224,7 +224,7 @@ "name": "[variables('adAvailabilitySetNameRoot')]", "type": "Microsoft.Compute/availabilitySets", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -238,7 +238,7 @@ "type": "Microsoft.Compute/availabilitySets", "apiVersion": "2017-03-30", "condition": "[parameters('createChildDomain')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -277,7 +277,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('adNSGName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -344,7 +344,6 @@ } } }, - { "name": "CreateForest", "type": "Microsoft.Resources/deployments", @@ -363,7 +362,7 @@ "value": "[parameters('RootDC1Name')]" }, "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" @@ -386,7 +385,6 @@ } } }, - { "name": "CreateADVM3", "type": "Microsoft.Resources/deployments", @@ -433,7 +431,6 @@ } } }, - { "name": "CreateChildDomain", "type": "Microsoft.Resources/deployments", @@ -454,7 +451,7 @@ "value": "[parameters('ChildDC3Name')]" }, "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" @@ -468,7 +465,6 @@ "childDomainName": { "value": "[parameters('ChildDomainName')]" }, - "DNSForwarder": { "value": "[parameters('RootDC1IPAddress')]" }, @@ -481,7 +477,6 @@ } } }, - { "name": "CreateADVM2", "type": "Microsoft.Resources/deployments", @@ -528,7 +523,6 @@ } } }, - { "name": "ConfiguringRootDC2", "type": "Microsoft.Resources/deployments", @@ -549,7 +543,7 @@ "value": "[parameters('RootDC2Name')]" }, "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" @@ -572,7 +566,6 @@ } } }, - { "name": "CreateADVM4", "type": "Microsoft.Resources/deployments", @@ -619,7 +612,6 @@ } } }, - { "name": "ConfiguringChildDC4", "type": "Microsoft.Resources/deployments", @@ -640,7 +632,7 @@ "value": "[parameters('ChildDC4Name')]" }, "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" @@ -663,7 +655,6 @@ } } }, - { "name": "UpdateVNet", "type": "Microsoft.Resources/deployments", @@ -691,7 +682,7 @@ "value": "[parameters('adSubnet')]" }, "NSGName": { - "value": "[variables('adNSGName')]" + "value": "[variables('adNSGName')]" }, "DNSServerAddress": { "value": [ @@ -702,8 +693,5 @@ } } } - ] } - - diff --git a/301-create-ad-forest-with-subdomain/nested/CreateAndPrepnewVM.json b/301-create-ad-forest-with-subdomain/nested/CreateAndPrepnewVM.json index 480f148381f6..69c71f742088 100644 --- a/301-create-ad-forest-with-subdomain/nested/CreateAndPrepnewVM.json +++ b/301-create-ad-forest-with-subdomain/nested/CreateAndPrepnewVM.json @@ -1,7 +1,6 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": { "virtualNetworkName": { "type": "string", @@ -33,7 +32,6 @@ "description": "The IP address for the new VM" } }, - "adminUsername": { "type": "string", "metadata": { @@ -64,19 +62,22 @@ "metadata": { "description": "Windows Server Version" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", "adSubnetRef": "[concat(variables('vnetID'),'/subnets/',parameters('SubnetName'))]", - "vmPublicIPName": "[concat(parameters('vmName'),'PublicIP')]", "vmNicName": "[concat(parameters('vmName'),'Nic')]", - "vmNicId": "[resourceId('Microsoft.Network/networkInterfaces',variables('vmNicName'))]", - "vmIPConfigID": "[concat(variables('vmNicId'),'/ipConfigurations/ipconfig1')]", "vmDataDisk": "[concat(parameters('vmName'),'-managed-DataDisk1')]", "vmOSDisk": "[concat(parameters('vmName'),'-managed-OSDisk')]", - "vmDataDiskSize": 10, "imagePublisher": "MicrosoftWindowsServer", "imageOffer": "WindowsServer" @@ -85,7 +86,7 @@ { "name": "[variables('vmPublicIPName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "properties": { "publicIPAllocationMethod": "Dynamic", @@ -94,12 +95,11 @@ } } }, - { "name": "[variables('vmNicName')]", "type": "Microsoft.Network/networkInterfaces", "apiVersion": "2016-10-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('vmPublicIPName'))]" ], @@ -125,7 +125,7 @@ "name": "[parameters('vmName')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces',variables('vmNicName'))]" ], @@ -176,7 +176,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/vmEnablePSScript')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', parameters('vmName'))]" ], @@ -193,5 +193,5 @@ ] } ], - "outputs": { } + "outputs": {} } diff --git a/301-create-ad-forest-with-subdomain/nested/configureADNextDC.json b/301-create-ad-forest-with-subdomain/nested/configureADNextDC.json index 7ccbbca950b4..c0cd36fde2ef 100644 --- a/301-create-ad-forest-with-subdomain/nested/configureADNextDC.json +++ b/301-create-ad-forest-with-subdomain/nested/configureADNextDC.json @@ -6,10 +6,11 @@ "type": "string" }, "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "DNSServer": { - "type": "string" + "type": "string" }, "adminUsername": { "type": "string" @@ -60,4 +61,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/301-create-ad-forest-with-subdomain/nested/createChildDomain.json b/301-create-ad-forest-with-subdomain/nested/createChildDomain.json index 9d47c95b2cc6..d0cae9c75782 100644 --- a/301-create-ad-forest-with-subdomain/nested/createChildDomain.json +++ b/301-create-ad-forest-with-subdomain/nested/createChildDomain.json @@ -6,7 +6,8 @@ "type": "string" }, "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "adminUsername": { "type": "string" @@ -36,11 +37,11 @@ "adChildDomainDC1ConfigurationFunction": "CreateADChildDomainDC1.ps1\\CreateADChildDomainDC1" }, "resources": [ - { + { "name": "[concat(parameters('vmName'),'/CreateADChildDomain1')]", "type": "Microsoft.Compute/virtualMachines/extensions", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.Powershell", "type": "DSC", @@ -68,4 +69,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/301-create-ad-forest-with-subdomain/nested/createForest.json b/301-create-ad-forest-with-subdomain/nested/createForest.json index afd208ed39d7..c01ed6a36e62 100644 --- a/301-create-ad-forest-with-subdomain/nested/createForest.json +++ b/301-create-ad-forest-with-subdomain/nested/createForest.json @@ -6,7 +6,8 @@ "type": "string" }, "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "adminUsername": { "type": "string" @@ -33,11 +34,11 @@ "adRootDC1ConfigurationFunction": "CreateADRootDC1.ps1\\CreateADRootDC1" }, "resources": [ - { + { "name": "[concat(parameters('vmName'),'/CreateADForest1')]", "type": "Microsoft.Compute/virtualMachines/extensions", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.Powershell", "type": "DSC", @@ -64,4 +65,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/301-create-ad-forest-with-subdomain/nested/vnet-with-dns-server.json b/301-create-ad-forest-with-subdomain/nested/vnet-with-dns-server.json index 2005a0cae441..b73176c2ec25 100644 --- a/301-create-ad-forest-with-subdomain/nested/vnet-with-dns-server.json +++ b/301-create-ad-forest-with-subdomain/nested/vnet-with-dns-server.json @@ -39,13 +39,20 @@ "metadata": { "Description": "The name of an existing NSG to associate with the subnet" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-10-01", "properties": { "addressSpace": { diff --git a/301-create-ad-forest-with-subdomain/nested/vnet.json b/301-create-ad-forest-with-subdomain/nested/vnet.json index 21de56dd7651..49457403f3e8 100644 --- a/301-create-ad-forest-with-subdomain/nested/vnet.json +++ b/301-create-ad-forest-with-subdomain/nested/vnet.json @@ -27,13 +27,20 @@ "Description": "The address range of the subnet created in the new VNET" }, "defaultValue": "10.0.0.0/24" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-10-01", "properties": { "addressSpace": { diff --git a/301-custom-images-at-scale/download.json b/301-custom-images-at-scale/download.json index 032bb11ccb4d..dd9c925c7d4b 100644 --- a/301-custom-images-at-scale/download.json +++ b/301-custom-images-at-scale/download.json @@ -13,6 +13,13 @@ }, "downloadScriptURI": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -20,7 +27,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('transfer', parameters('uniquePrefix'), 'vm/ext')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", diff --git a/301-custom-images-at-scale/upload.json b/301-custom-images-at-scale/upload.json index a9739edabc1b..d00ce4de356e 100644 --- a/301-custom-images-at-scale/upload.json +++ b/301-custom-images-at-scale/upload.json @@ -10,6 +10,13 @@ }, "uploadScriptURI": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -17,7 +24,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('transfer', parameters('uniquePrefix'), 'vm/ext')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", diff --git a/301-dmz-nsg/azuredeploy.json b/301-dmz-nsg/azuredeploy.json index c0bc5652528a..34c455068233 100644 --- a/301-dmz-nsg/azuredeploy.json +++ b/301-dmz-nsg/azuredeploy.json @@ -14,6 +14,13 @@ "metadata": { "description": "Password for the Virtual Machines." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -41,7 +48,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('VNetName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "VNet01" }, @@ -82,7 +89,7 @@ "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('VM01Name'), '_NIC_PIP' )]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "IIS01 NIC PIP" }, @@ -95,7 +102,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('VM01Name'), '_NIC')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "IIS01 NIC" }, @@ -124,7 +131,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('VM02Name'), '_NIC')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "AppVM01 NIC" }, @@ -150,7 +157,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('VM03Name'), '_NIC')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "AppVM02 NIC" }, @@ -176,7 +183,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('VM04Name'), '_NIC')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "DNS01 NIC" }, @@ -202,7 +209,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[variables('VM01Name')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "IIS01" }, @@ -246,7 +253,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[variables('VM02Name')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "AppVM01" }, @@ -290,7 +297,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[variables('VM03Name')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "AppVM02" }, @@ -334,7 +341,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[variables('VM04Name')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "DNS01" }, @@ -378,7 +385,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('NSGName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "myVNetNSG" }, diff --git a/301-dns-forwarder/azuredeploy.json b/301-dns-forwarder/azuredeploy.json index 85d2ff67bd02..9308e9b765f8 100644 --- a/301-dns-forwarder/azuredeploy.json +++ b/301-dns-forwarder/azuredeploy.json @@ -33,6 +33,13 @@ "metadata": { "description": "This is the IP address to forward DNS queries to. The default value represents Azure's internal DNS recursive resolvers." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -45,11 +52,9 @@ "subNet1Name": "subnet1", "subNet1Prefix": "10.1.0.0/16", "storType": "Standard_LRS", - "location": "[resourceGroup().location]", - "vhdName": "[concat(parameters('vmName'), '-', 'osdisk')]", + "location": "[parameters('location')]", "nicName": "[concat(parameters('vmName'), '-', 'nic')]", "pipName": "[concat(parameters('vmName'), '-', 'pip')]", - "apiVersion": "2015-06-15", "artifactsBaseUrl": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/301-dns-forwarder", "scriptUrl": "[concat(variables('artifactsBaseUrl'),'/','forwarderSetup.sh')]" }, @@ -237,4 +242,4 @@ } } ] -} \ No newline at end of file +} diff --git a/301-drupal8-vmss-glusterfs-mysql/nested/mysql-resources_no.json b/301-drupal8-vmss-glusterfs-mysql/nested/mysql-resources_no.json index a0550a2fabed..792e1a281973 100644 --- a/301-drupal8-vmss-glusterfs-mysql/nested/mysql-resources_no.json +++ b/301-drupal8-vmss-glusterfs-mysql/nested/mysql-resources_no.json @@ -1,222 +1,220 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "dnsName": { - "type": "string", - "metadata": { - "description": "Connect to your cluster using dnsName.location.cloudapp.azure.com" - } - }, - "location": { - "type": "string", - "metadata": { - "description": "Location where the MySQL cluster will be deployed to" - } - }, - "vmUserName": { - "type": "string", - "metadata": { - "description": "user name to ssh to the VMs" - } - }, - "vmPassword": { - "type": "securestring", - "metadata": { - "description": "password to ssh to the VMs" - } - }, - "mysqlRootPassword": { - "type": "securestring", - "metadata": { - "description": "mysql root user password single quote not allowed" - } - }, - "mysqlReplicationPassword": { - "type": "securestring", - "metadata": { - "description": "mysql replication user password single quote not allowed" - } - }, - "mysqlProbePassword": { - "type": "securestring", - "metadata": { - "description": "mysql probe password single quote not allowed" - } - }, - "vmSize": { - "type": "string", - "defaultValue": "Standard_D2", - "metadata": { - "description": "size for the VMs" - } - }, - "storageAccountType": { - "type": "string", - "defaultValue": "Standard_LRS", - "metadata": { - "description": "Storage account type for the cluster" - } - }, - "virtualNetworkName": { - "type": "string", - "defaultValue": "mysqlvnet", - "metadata": { - "description": "Virtual network name for the cluster" - } - }, - "vnetNewOrExisting": { - "type": "string", - "defaultValue": "new", - "allowedValues": [ - "new", - "existing" - ], - "metadata": { - "description": "Identifies whether to use new or existing Virtual Network" - } - }, - "virtualNetworkExistingRGName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "If using existing VNet, specifies the resource group for the existing VNet" - } - }, - "dbSubnetName": { - "type": "string", - "defaultValue": "dbsubnet", - "metadata": { - "description": "subnet name for the MySQL nodes" - } - }, - "vnetAddressPrefix": { - "type": "string", - "defaultValue": "10.0.0.0/16", - "metadata": { - "description": "IP address in CIDR for virtual network" - } - }, - "dbSubnetAddressPrefix": { - "type": "string", - "defaultValue": "10.0.1.0/24", - "metadata": { - "description": "IP address in CIDR for db subnet" - } - }, - "dbSubnetStartAddress": { - "type": "string", - "defaultValue": "10.0.1.4", - "metadata": { - "description": "Start IP address in the subnet for the VMs" - } - }, - "imagePublisher": { - "type": "string", - "defaultValue": "OpenLogic", - "allowedValues": [ - "OpenLogic" - ], - "metadata": { - "description": "publisher for the VM OS image" - } - }, - "imageOffer": { - "type": "string", - "defaultValue": "CentOS", - "allowedValues": [ - "CentOS" - ], - "metadata": { - "description": "VM OS name" - } - }, - "imageSKU": { - "type": "string", - "defaultValue": "6.6", - "allowedValues": [ - "6.5", - "6.6" - ], - "metadata": { - "description": "VM OS version" - } - }, - "mysqlFrontEndPort0": { - "type": "int", - "defaultValue": 3306, - "metadata": { - "description": "MySQL public port master" - } - }, - "mysqlFrontEndPort1": { - "type": "int", - "defaultValue": 3307, - "metadata": { - "description": "MySQL public port slave" - } - }, - "sshNatRuleFrontEndPort0": { - "type": "int", - "defaultValue": 64001, - "metadata": { - "description": "public ssh port for VM1" - } - }, - "sshNatRuleFrontEndPort1": { - "type": "int", - "defaultValue": 64002, - "metadata": { - "description": "public ssh port for VM2" - } - }, - "mysqlProbePort0": { - "type": "int", - "defaultValue": 9200, - "metadata": { - "description": "MySQL public port master" - } - }, - "mysqlProbePort1": { - "type": "int", - "defaultValue": 9201, - "metadata": { - "description": "MySQL public port slave" - } - }, - "artifactsPath": { - "type": "string", - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/mysql-replication", - "metadata": { - "description": "template and script file location", - "artifactsBaseUrl": "Base URL of the Publisher Template gallery package" - } - }, - "customScriptCommandToExecute": { - "type": "string", - "defaultValue": "bash azuremysql.sh", - "metadata": { - "description": "bash script command line" - } - }, - "publicIPName": { - "type": "string", - "defaultValue": "mysqlIP01", - "metadata": { - "description": "public IP name for MySQL loadbalancer" - } - }, - "storageAccountNamePrefix": { - "type": "string", - "metadata": { - "description": "Storage account name prefix for the cluster" - } - } - }, - "variables": { - }, - "resources": [ - ], - "outputs": { +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "dnsName": { + "type": "string", + "metadata": { + "description": "Connect to your cluster using dnsName.location.cloudapp.azure.com" + } + }, + "location": { + "type": "string", + "metadata": { + "description": "Location where the MySQL cluster will be deployed to" + }, + "defaultValue": "[resourceGroup().location]" + }, + "vmUserName": { + "type": "string", + "metadata": { + "description": "user name to ssh to the VMs" + } + }, + "vmPassword": { + "type": "securestring", + "metadata": { + "description": "password to ssh to the VMs" + } + }, + "mysqlRootPassword": { + "type": "securestring", + "metadata": { + "description": "mysql root user password single quote not allowed" + } + }, + "mysqlReplicationPassword": { + "type": "securestring", + "metadata": { + "description": "mysql replication user password single quote not allowed" + } + }, + "mysqlProbePassword": { + "type": "securestring", + "metadata": { + "description": "mysql probe password single quote not allowed" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D2", + "metadata": { + "description": "size for the VMs" + } + }, + "storageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Storage account type for the cluster" + } + }, + "virtualNetworkName": { + "type": "string", + "defaultValue": "mysqlvnet", + "metadata": { + "description": "Virtual network name for the cluster" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "description": "Identifies whether to use new or existing Virtual Network" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "If using existing VNet, specifies the resource group for the existing VNet" + } + }, + "dbSubnetName": { + "type": "string", + "defaultValue": "dbsubnet", + "metadata": { + "description": "subnet name for the MySQL nodes" + } + }, + "vnetAddressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/16", + "metadata": { + "description": "IP address in CIDR for virtual network" + } + }, + "dbSubnetAddressPrefix": { + "type": "string", + "defaultValue": "10.0.1.0/24", + "metadata": { + "description": "IP address in CIDR for db subnet" + } + }, + "dbSubnetStartAddress": { + "type": "string", + "defaultValue": "10.0.1.4", + "metadata": { + "description": "Start IP address in the subnet for the VMs" + } + }, + "imagePublisher": { + "type": "string", + "defaultValue": "OpenLogic", + "allowedValues": [ + "OpenLogic" + ], + "metadata": { + "description": "publisher for the VM OS image" + } + }, + "imageOffer": { + "type": "string", + "defaultValue": "CentOS", + "allowedValues": [ + "CentOS" + ], + "metadata": { + "description": "VM OS name" + } + }, + "imageSKU": { + "type": "string", + "defaultValue": "6.6", + "allowedValues": [ + "6.5", + "6.6" + ], + "metadata": { + "description": "VM OS version" + } + }, + "mysqlFrontEndPort0": { + "type": "int", + "defaultValue": 3306, + "metadata": { + "description": "MySQL public port master" + } + }, + "mysqlFrontEndPort1": { + "type": "int", + "defaultValue": 3307, + "metadata": { + "description": "MySQL public port slave" + } + }, + "sshNatRuleFrontEndPort0": { + "type": "int", + "defaultValue": 64001, + "metadata": { + "description": "public ssh port for VM1" + } + }, + "sshNatRuleFrontEndPort1": { + "type": "int", + "defaultValue": 64002, + "metadata": { + "description": "public ssh port for VM2" + } + }, + "mysqlProbePort0": { + "type": "int", + "defaultValue": 9200, + "metadata": { + "description": "MySQL public port master" + } + }, + "mysqlProbePort1": { + "type": "int", + "defaultValue": 9201, + "metadata": { + "description": "MySQL public port slave" + } + }, + "artifactsPath": { + "type": "string", + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/mysql-replication", + "metadata": { + "description": "template and script file location", + "artifactsBaseUrl": "Base URL of the Publisher Template gallery package" + } + }, + "customScriptCommandToExecute": { + "type": "string", + "defaultValue": "bash azuremysql.sh", + "metadata": { + "description": "bash script command line" + } + }, + "publicIPName": { + "type": "string", + "defaultValue": "mysqlIP01", + "metadata": { + "description": "public IP name for MySQL loadbalancer" + } + }, + "storageAccountNamePrefix": { + "type": "string", + "metadata": { + "description": "Storage account name prefix for the cluster" + } } + }, + "variables": {}, + "resources": [], + "outputs": {} } diff --git a/301-drupal8-vmss-glusterfs-mysql/nested/mysql-resources_yes.json b/301-drupal8-vmss-glusterfs-mysql/nested/mysql-resources_yes.json index 6f8dfc91f058..016327c550c3 100644 --- a/301-drupal8-vmss-glusterfs-mysql/nested/mysql-resources_yes.json +++ b/301-drupal8-vmss-glusterfs-mysql/nested/mysql-resources_yes.json @@ -12,7 +12,8 @@ "type": "string", "metadata": { "description": "Location where the MySQL cluster will be deployed to" - } + }, + "defaultValue": "[resourceGroup().location]" }, "vmUserName": { "type": "string", @@ -312,4 +313,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/301-eventHub-create-authrule-namespace-and-eventHub/azuredeploy.json b/301-eventHub-create-authrule-namespace-and-eventHub/azuredeploy.json index 14b427631ee4..9437eab84e8a 100644 --- a/301-eventHub-create-authrule-namespace-and-eventHub/azuredeploy.json +++ b/301-eventHub-create-authrule-namespace-and-eventHub/azuredeploy.json @@ -40,24 +40,6 @@ "description": "Name of Event Hub" } }, - "messageRetentionInDays": { - "type": "int", - "defaultValue": 1, - "minValue": 1, - "maxValue": 7, - "metadata": { - "description": "How long to retain the data in Event Hub" - } - }, - "partitionCount": { - "type": "int", - "defaultValue": 4, - "minValue": 2, - "maxValue": 32, - "metadata": { - "description": "Number of partitions chosen" - } - }, "eventhubAuthorizationRuleName": { "type": "string", "metadata": { @@ -93,12 +75,17 @@ "metadata": { "description": "Number of partitions chosen" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "managePolicy": "ManagePolicy", - "sendPolicy": "SendPolicy", - "listenPolicy": "ListenPolicy", + "defaultSASKeyName": "RootManageSharedAccessKey", "authRuleResourceId": "[resourceId('Microsoft.EventHub/namespaces/authorizationRules', parameters('namespaceName'), variables('defaultSASKeyName'))]", "nsAuthorizationRuleId": "[resourceId('Microsoft.EventHub/namespaces/authorizationRules', parameters('namespaceName'), parameters('namespaceAuthorizationRuleName'))]", @@ -110,7 +97,7 @@ "apiVersion": "2017-04-01", "name": "[parameters('namespaceName')]", "type": "Microsoft.EventHub/Namespaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard" }, @@ -178,7 +165,9 @@ "apiVersion": "2017-04-01", "name": "[concat(parameters('namespaceName'), '/', parameters('namespaceAuthorizationRuleName'))]", "type": "Microsoft.EventHub/namespaces/authorizationRules", - "dependsOn": [ "[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'))]" ], + "dependsOn": [ + "[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'))]" + ], "properties": { "rights": [ "Send", @@ -221,6 +210,5 @@ "type": "string", "value": "[listkeys(variables('ehAuthorizationRuleId2'), '2017-04-01').primaryKey]" } - } -} \ No newline at end of file +} diff --git a/301-expressroute-circuit-vnet-connection/azuredeploy.json b/301-expressroute-circuit-vnet-connection/azuredeploy.json index 61adff58a319..42cf7b79fa4a 100644 --- a/301-expressroute-circuit-vnet-connection/azuredeploy.json +++ b/301-expressroute-circuit-vnet-connection/azuredeploy.json @@ -85,6 +85,13 @@ "metadata": { "description": "The name of the ExpressRoute circuit with which the VNet Gateway needs to connect. The Circuit must be already created successfully and must have its circuitProvisioningState property set to 'Enabled', and serviceProviderProvisioningState property set to 'Provisioned'. The Circuit must also have a BGP Peering of type AzurePrivatePeering." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -98,7 +105,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -125,7 +132,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('gatewayPublicIPName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -134,7 +141,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworkGateways", "name": "[parameters('gatewayName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('gatewayPublicIPName'))]", "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" @@ -161,7 +168,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/connections", "name": "[parameters('connectionName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworkGateways/', parameters('gatewayName'))]" ], @@ -177,4 +184,4 @@ } } ] -} \ No newline at end of file +} diff --git a/301-insights-alertrules-application-insights/azuredeploy.json b/301-insights-alertrules-application-insights/azuredeploy.json index 775965100a42..1dcd4671068e 100644 --- a/301-insights-alertrules-application-insights/azuredeploy.json +++ b/301-insights-alertrules-application-insights/azuredeploy.json @@ -9,6 +9,13 @@ "metadata": { "description": "Enter response time threshold in seconds." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -20,7 +27,7 @@ "apiVersion": "2014-04-01", "name": "[variables('appInsName')]", "type": "Microsoft.Insights/components", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ApplicationId": "[variables('appInsName')]" } @@ -29,7 +36,7 @@ "name": "[variables('responseAlertName')]", "type": "Microsoft.Insights/alertrules", "apiVersion": "2014-04-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Insights/components', variables('appInsName'))]" ], @@ -64,4 +71,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/301-jenkins-acr-spinnaker-k8s/azuredeploy.json b/301-jenkins-acr-spinnaker-k8s/azuredeploy.json index 5ef6120b4f2f..8555418d18d2 100644 --- a/301-jenkins-acr-spinnaker-k8s/azuredeploy.json +++ b/301-jenkins-acr-spinnaker-k8s/azuredeploy.json @@ -45,6 +45,13 @@ "description": "The repository name used by the default Jenkins job and Spinnaker pipeline. This repository will be created in your Azure Container Registry." }, "defaultValue": "azure-devops/spin-kub-demo" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -73,7 +80,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, @@ -84,7 +91,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('acrStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, @@ -103,7 +110,7 @@ { "name": "[variables('acrName')]", "type": "Microsoft.ContainerRegistry/registries", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-03-01", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('acrStorageAccountName'))]" @@ -123,7 +130,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -135,7 +142,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NSG - Front End" }, @@ -176,7 +183,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -203,7 +210,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" @@ -229,7 +236,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" @@ -282,7 +289,7 @@ "type": "extensions", "name": "[variables('vmExtensionName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]", "[resourceId('Microsoft.ContainerRegistry/registries', variables('acrName'))]", @@ -308,7 +315,7 @@ { "apiVersion": "2016-09-30", "type": "Microsoft.ContainerService/containerServices", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[variables('kubernetesName')]", "properties": { "orchestratorProfile": { @@ -369,4 +376,4 @@ "value": "[concat('ssh ', parameters('adminUsername'), '@', reference(resourceId('Microsoft.ContainerService/containerServices', variables('kubernetesName'))).masterProfile.fqdn)]" } } -} \ No newline at end of file +} diff --git a/301-jenkins-aks-zero-downtime-deployment/azuredeploy.json b/301-jenkins-aks-zero-downtime-deployment/azuredeploy.json index d89f43a56646..dd0fa55b1cda 100644 --- a/301-jenkins-aks-zero-downtime-deployment/azuredeploy.json +++ b/301-jenkins-aks-zero-downtime-deployment/azuredeploy.json @@ -62,6 +62,13 @@ "metadata": { "description": "Service Principal App Key (also called Client Secret) that has contributor rights to the subscription used for this deployment. It is used by the Kubernetes cluster to dynamically manage resources (e.g. user-defined load balancers)." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -85,7 +92,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "osProfile": { "computerName": "[variables('vmName')]", @@ -137,7 +144,7 @@ "type": "extensions", "name": "[variables('vmExtensionName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]", "[resourceId('Microsoft.ContainerService/managedClusters', variables('aksName'))]" @@ -163,7 +170,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", "apiVersion": "2016-12-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -184,7 +191,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", "apiVersion": "2016-09-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -214,7 +221,7 @@ "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -226,7 +233,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -261,7 +268,7 @@ { "apiVersion": "2017-08-31", "type": "Microsoft.ContainerService/managedClusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[variables('aksName')]", "properties": { "kubernetesVersion": "[parameters('kubernetesVersion')]", diff --git a/301-jenkins-aptly-spinnaker-vmss/azuredeploy.json b/301-jenkins-aptly-spinnaker-vmss/azuredeploy.json index 08f77d6542ad..c9a91f272b1f 100644 --- a/301-jenkins-aptly-spinnaker-vmss/azuredeploy.json +++ b/301-jenkins-aptly-spinnaker-vmss/azuredeploy.json @@ -31,6 +31,13 @@ "metadata": { "description": "Service Principal App Key (also called Client Secret) that has contributor rights to the subscription used for this deployment. It is used by Spinnaker to dynamically manage resources." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -58,7 +65,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "kind": "Storage", "sku": { "name": "Standard_LRS" @@ -69,7 +76,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('packerStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "kind": "Storage", "sku": { "name": "Standard_LRS" @@ -80,7 +87,7 @@ "type": "Microsoft.KeyVault/vaults", "apiVersion": "2015-06-01", "name": "[variables('keyVaultName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "enabledForDeployment": true, "enabledForTemplateDeployment": true, @@ -134,7 +141,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vnetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -173,7 +180,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -185,7 +192,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NSG - Front End" }, @@ -240,7 +247,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]" @@ -266,7 +273,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]", "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" @@ -309,7 +316,7 @@ "type": "extensions", "name": "[variables('vmExtensionName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]", "[resourceId('Microsoft.Storage/storageAccounts', variables('packerStorageAccountName'))]" @@ -325,7 +332,7 @@ ] }, "protectedSettings": { - "commandToExecute": "[concat('./', variables('_extensionScript'), ' -ju \"', parameters('adminUsername'), '\" -jp \"', parameters('adminPassword'), '\" -ai \"', parameters('servicePrincipalAppId'), '\" -ak \"', parameters('servicePrincipalAppKey'), '\" -ti \"', subscription().tenantId, '\" -si \"', subscription().subscriptionId, '\" -rg \"', resourceGroup().name, '\" -vn \"', variables('keyVaultName'), '\" -san \"', variables('storageAccountName'), '\" -sak \"', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value, '\" -psa \"', variables('packerStorageAccountName'), '\" -vf \"', reference(variables('publicIPAddressName')).dnsSettings.fqdn, '\" -r \"', resourceGroup().location, '\" -al \"', variables('_artifactsLocation'), '\" -st \"', variables('_artifactsLocationSasToken'), '\"')]" + "commandToExecute": "[concat('./', variables('_extensionScript'), ' -ju \"', parameters('adminUsername'), '\" -jp \"', parameters('adminPassword'), '\" -ai \"', parameters('servicePrincipalAppId'), '\" -ak \"', parameters('servicePrincipalAppKey'), '\" -ti \"', subscription().tenantId, '\" -si \"', subscription().subscriptionId, '\" -rg \"', resourceGroup().name, '\" -vn \"', variables('keyVaultName'), '\" -san \"', variables('storageAccountName'), '\" -sak \"', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value, '\" -psa \"', variables('packerStorageAccountName'), '\" -vf \"', reference(variables('publicIPAddressName')).dnsSettings.fqdn, '\" -r \"', parameters('location'), '\" -al \"', variables('_artifactsLocation'), '\" -st \"', variables('_artifactsLocationSasToken'), '\"')]" } } } @@ -346,4 +353,4 @@ "value": "[concat('ssh -L 8080:localhost:8080 -L 9000:localhost:9000 -L 8084:localhost:8084 -L 8087:localhost:8087 ', parameters('adminUsername'), '@', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]" } } -} \ No newline at end of file +} diff --git a/301-jenkins-vmss-blue-green/azuredeploy.json b/301-jenkins-vmss-blue-green/azuredeploy.json index fe09f71d23ed..f99de325d966 100644 --- a/301-jenkins-vmss-blue-green/azuredeploy.json +++ b/301-jenkins-vmss-blue-green/azuredeploy.json @@ -1,617 +1,624 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "resourceNamePrefix": { - "defaultValue": "vmssbg", - "type": "string", - "metadata": { - "description": "Prefix for the resource names." - } - }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "User name for the Virtual Machine hosting the Jenkins and the Virtual Machines in VMSS." - } - }, - "sshPublicKey": { - "type": "string", - "metadata": { - "description": "Configure all linux machines with the SSH public key string, for example 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "resourceNamePrefix": { + "defaultValue": "vmssbg", + "type": "string", + "metadata": { + "description": "Prefix for the resource names." + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "User name for the Virtual Machine hosting the Jenkins and the Virtual Machines in VMSS." + } + }, + "sshPublicKey": { + "type": "string", + "metadata": { + "description": "Configure all linux machines with the SSH public key string, for example 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'" + } + }, + "virtualMachineSize": { + "type": "string", + "defaultValue": "Standard_D2", + "metadata": { + "description": "The virutal machine size to use. See https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes" + } + }, + "jenkinsDNSPrefix": { + "type": "string", + "metadata": { + "description": "Unique DNS name prefix for the public IP used to access the Jenkins service." + } + }, + "tomcatDNSPrefix": { + "type": "string", + "metadata": { + "description": "Unique DNS name prefix for the public IP used to access the Tomcat service." + } + }, + "servicePrincipalAppId": { + "type": "string", + "metadata": { + "description": "Service Principal App ID (also called Client ID) that has contributor rights to the subscription used for this deployment. It is used to manage related Azure resources, e.g., bake OS image, check resource status, update VMSS image, etc." + } + }, + "servicePrincipalAppKey": { + "type": "securestring", + "metadata": { + "description": "Service Principal App Key (also called Client Secret) that has contributor rights to the subscription used for this deployment. It is used to manage related Azure resources, e.g., bake OS image, check resource status, update VMSS image, etc." + } + }, + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/jenkins/master" + }, + "_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": { + "service": "tomcat", + "baseImageName": "[concat(parameters('resourceNamePrefix'), '-base-', uniqueString(resourceGroup().id))]", + "imageId": "[resourceId('Microsoft.Compute/images', variables('baseImageName'))]", + "jenkinsVmName": "[concat(parameters('resourceNamePrefix'), '-jenkins')]", + "vmExtensionName": "[concat(variables('jenkinsVmName'), '-init')]", + "jenkinsNic": "[concat(variables('jenkinsVmName'), '-nic')]", + "jenkinsIp": "[concat(variables('jenkinsVmName'), '-ip')]", + "blueVmss": "[concat(parameters('resourceNamePrefix'), '-blue')]", + "greenVmss": "[concat(parameters('resourceNamePrefix'), '-green')]", + "blueComputerNamePrefix": "[variables('blueVmss')]", + "greenComputerNamePrefix": "[variables('greenVmss')]", + "ipName": "[concat(parameters('resourceNamePrefix'), '-ip')]", + "lbName": "[concat(parameters('resourceNamePrefix'), '-lb')]", + "vnetName": "[concat(parameters('resourceNamePrefix'), '-vnet')]", + "nsgName": "[concat(parameters('resourceNamePrefix'), '-nsg')]", + "subnetName": "[concat(parameters('resourceNamePrefix'), '-subnet')]", + "lbFrontendName": "loadBalancerFrontEnd", + "lbFrontendId": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('lbName'), variables('lbFrontendName'))]", + "lbBlueBeName": "blue-bepool", + "lbBlueNatPoolName": "blue-natpool", + "lbGreenBeName": "green-bepool", + "lbGreenNatPoolName": "green-natpool", + "_artifactsLocation": "[parameters('_artifactsLocation')]", + "_extensionScript": "301-jenkins-vmss-zero-downtime-deployment.sh", + "_artifactsLocationSasToken": "[parameters('_artifactsLocationSasToken')]" + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('jenkinsVmName')]", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkInterfaces', variables('jenkinsNic'))]" + ], + "properties": { + "osProfile": { + "computerName": "[variables('jenkinsVmName')]", + "adminUsername": "[parameters('adminUsername')]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]", + "keyData": "[parameters('sshPublicKey')]" + } + ] } + } }, - "virtualMachineSize": { - "type": "string", - "defaultValue": "Standard_D2", - "metadata": { - "description": "The virutal machine size to use. See https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes" - } + "hardwareProfile": { + "vmSize": "[parameters('virtualMachineSize')]" }, - "jenkinsDNSPrefix": { - "type": "string", - "metadata": { - "description": "Unique DNS name prefix for the public IP used to access the Jenkins service." + "storageProfile": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "[concat(variables('jenkinsVmName'), '-os-disk')]", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" } + }, + "dataDisks": [] }, - "tomcatDNSPrefix": { - "type": "string", - "metadata": { - "description": "Unique DNS name prefix for the public IP used to access the Tomcat service." + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('jenkinsNic'))]" } - }, - "servicePrincipalAppId": { - "type": "string", - "metadata": { - "description": "Service Principal App ID (also called Client ID) that has contributor rights to the subscription used for this deployment. It is used to manage related Azure resources, e.g., bake OS image, check resource status, update VMSS image, etc." + ] + } + }, + "resources": [ + { + "type": "extensions", + "name": "[variables('vmExtensionName')]", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines', variables('jenkinsVmName'))]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(variables('_artifactsLocation'), '/quickstart_templates/zero_downtime_deployment/', variables('_extensionScript'), variables('_artifactsLocationSasToken'))]" + ] + }, + "protectedSettings": { + "commandToExecute": "[concat('./', variables('_extensionScript'), ' --app_id \"', parameters('servicePrincipalAppId'), '\" --app_key \"', parameters('servicePrincipalAppKey'), '\" --subscription_id \"', subscription().subscriptionId, '\" --tenant_id \"', subscription().tenantId, '\" --resource_group \"', resourceGroup().name, '\" --location \"', parameters('location'), '\" --name_prefix \"', parameters('resourceNamePrefix'), '\" --image_name \"', variables('baseImageName'), '\" --jenkins_fqdn \"', reference(variables('jenkinsIp')).dnsSettings.fqdn, '\" --artifacts_location \"', variables('_artifactsLocation'), '\" --sas_token \"', variables('_artifactsLocationSasToken'), '\"')]" } - }, - "servicePrincipalAppKey": { - "type": "securestring", - "metadata": { - "description": "Service Principal App Key (also called Client Secret) that has contributor rights to the subscription used for this deployment. It is used to manage related Azure resources, e.g., bake OS image, check resource status, update VMSS image, etc." + } + } + ] + }, + { + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('jenkinsNic')]", + "apiVersion": "2016-09-01", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", + "[resourceId('Microsoft.Network/publicIpAddresses', variables('jenkinsIp'))]", + "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "subnet": { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnetName'))]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('jenkinsIp'))]" + } } - }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/jenkins/master" - }, - "_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": "" + } + ], + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" } + } }, - "variables": { - "service": "tomcat", - "baseImageName": "[concat(parameters('resourceNamePrefix'), '-base-', uniqueString(resourceGroup().id))]", - "imageId": "[resourceId('Microsoft.Compute/images', variables('baseImageName'))]", - "jenkinsVmName": "[concat(parameters('resourceNamePrefix'), '-jenkins')]", - "vmExtensionName": "[concat(variables('jenkinsVmName'), '-init')]", - "jenkinsNic": "[concat(variables('jenkinsVmName'), '-nic')]", - "jenkinsIp": "[concat(variables('jenkinsVmName'), '-ip')]", - "blueVmss": "[concat(parameters('resourceNamePrefix'), '-blue')]", - "greenVmss": "[concat(parameters('resourceNamePrefix'), '-green')]", - "blueComputerNamePrefix": "[variables('blueVmss')]", - "greenComputerNamePrefix": "[variables('greenVmss')]", - "ipName": "[concat(parameters('resourceNamePrefix'), '-ip')]", - "lbName": "[concat(parameters('resourceNamePrefix'), '-lb')]", - "vnetName": "[concat(parameters('resourceNamePrefix'), '-vnet')]", - "nsgName": "[concat(parameters('resourceNamePrefix'), '-nsg')]", - "subnetName": "[concat(parameters('resourceNamePrefix'), '-subnet')]", - "lbFrontendName": "loadBalancerFrontEnd", - "lbFrontendId": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('lbName'), variables('lbFrontendName'))]", - "lbBlueBeName": "blue-bepool", - "lbBlueNatPoolName": "blue-natpool", - "lbGreenBeName": "green-bepool", - "lbGreenNatPoolName": "green-natpool", - "_artifactsLocation": "[parameters('_artifactsLocation')]", - "_extensionScript": "301-jenkins-vmss-zero-downtime-deployment.sh", - "_artifactsLocationSasToken": "[parameters('_artifactsLocationSasToken')]" + { + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('jenkinsIp')]", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[parameters('jenkinsDNSPrefix')]" + } + } }, - "resources": [ - { - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('jenkinsVmName')]", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/networkInterfaces', variables('jenkinsNic'))]" - ], - "properties": { - "osProfile": { - "computerName": "[variables('jenkinsVmName')]", - "adminUsername": "[parameters('adminUsername')]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]", - "keyData": "[parameters('sshPublicKey')]" - } - ] - } - } - }, - "hardwareProfile": { - "vmSize": "[parameters('virtualMachineSize')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "Canonical", - "offer": "UbuntuServer", - "sku": "16.04-LTS", - "version": "latest" - }, - "osDisk": { - "name": "[concat(variables('jenkinsVmName'), '-os-disk')]", - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "Standard_LRS" - } - }, - "dataDisks": [] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('jenkinsNic'))]" - } - ] - } + { + "comments": "VMSS for the blue environment.", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "sku": { + "name": "[parameters('virtualMachineSize')]", + "capacity": 2 + }, + "name": "[variables('blueVmss')]", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]", + "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", + "[resourceId('Microsoft.Network/loadBalancers', variables('lbName'))]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions', variables('jenkinsVmName'), variables('vmExtensionName'))]" + ], + "properties": { + "singlePlacementGroup": true, + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "osProfile": { + "computerNamePrefix": "[variables('blueComputerNamePrefix')]", + "adminUsername": "[parameters('adminUsername')]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]", + "keyData": "[parameters('sshPublicKey')]" + } + ] + } + } + }, + "storageProfile": { + "osDisk": { + "createOption": "FromImage", + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } }, - "resources": [ - { - "type": "extensions", - "name": "[variables('vmExtensionName')]", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines', variables('jenkinsVmName'))]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(variables('_artifactsLocation'), '/quickstart_templates/zero_downtime_deployment/', variables('_extensionScript'), variables('_artifactsLocationSasToken'))]" - ] + "imageReference": { + "id": "[variables('imageId')]" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "[concat(variables('blueComputerNamePrefix'), 'Nic')]", + "properties": { + "primary": true, + "enableAcceleratedNetworking": false, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + }, + "dnsSettings": { + "dnsServers": [] + }, + "ipConfigurations": [ + { + "name": "[concat(variables('blueComputerNamePrefix'), 'IPConfig')]", + "properties": { + "subnet": { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnetName'))]" }, - "protectedSettings": { - "commandToExecute": "[concat('./', variables('_extensionScript'), ' --app_id \"', parameters('servicePrincipalAppId'), '\" --app_key \"', parameters('servicePrincipalAppKey'), '\" --subscription_id \"', subscription().subscriptionId, '\" --tenant_id \"', subscription().tenantId, '\" --resource_group \"', resourceGroup().name, '\" --location \"', resourceGroup().location, '\" --name_prefix \"', parameters('resourceNamePrefix'), '\" --image_name \"', variables('baseImageName'), '\" --jenkins_fqdn \"', reference(variables('jenkinsIp')).dnsSettings.fqdn, '\" --artifacts_location \"', variables('_artifactsLocation'), '\" --sas_token \"', variables('_artifactsLocationSasToken'), '\"')]" - } + "privateIPAddressVersion": "IPv4", + "loadBalancerBackendAddressPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('lbName'), variables('lbBlueBeName'))]" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/inboundNatPools', variables('lbName'), variables('lbBlueNatPoolName'))]" + } + ] + } } + ] } + } ] + } }, - { - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('jenkinsNic')]", - "apiVersion": "2016-09-01", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", - "[resourceId('Microsoft.Network/publicIpAddresses', variables('jenkinsIp'))]", - "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" - ], - "properties": { - "ipConfigurations": [ + "overprovision": true + } + }, + { + "comments": "VMSS for the green environment.", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "sku": { + "name": "[parameters('virtualMachineSize')]", + "capacity": 2 + }, + "name": "[variables('greenVmss')]", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]", + "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", + "[resourceId('Microsoft.Network/loadBalancers', variables('lbName'))]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions', variables('jenkinsVmName'), variables('vmExtensionName'))]" + ], + "properties": { + "singlePlacementGroup": true, + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "osProfile": { + "computerNamePrefix": "[variables('greenComputerNamePrefix')]", + "adminUsername": "[parameters('adminUsername')]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]", + "keyData": "[parameters('sshPublicKey')]" + } + ] + } + } + }, + "storageProfile": { + "osDisk": { + "createOption": "FromImage", + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + "imageReference": { + "id": "[variables('imageId')]" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "[concat(variables('greenComputerNamePrefix'), 'Nic')]", + "properties": { + "primary": true, + "enableAcceleratedNetworking": false, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + }, + "dnsSettings": { + "dnsServers": [] + }, + "ipConfigurations": [ { - "name": "ipconfig1", - "properties": { - "subnet": { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnetName'))]" - }, - "privateIPAllocationMethod": "Dynamic", - "publicIpAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('jenkinsIp'))]" - } - } + "name": "[concat(variables('greenComputerNamePrefix'), 'IPConfig')]", + "properties": { + "subnet": { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnetName'))]" + }, + "privateIPAddressVersion": "IPv4", + "loadBalancerBackendAddressPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('lbName'), variables('lbGreenBeName'))]" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/inboundNatPools', variables('lbName'), variables('lbGreenNatPoolName'))]" + } + ] + } } - ], - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + ] } - } + } + ] + } }, - { - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('jenkinsIp')]", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "overprovision": true + } + }, + { + "comments": "Frontend load balancer in Standard SKU which requires API version after 2017-08-01. Initially route to the blue backend.", + "type": "Microsoft.Network/loadBalancers", + "name": "[variables('lbName')]", + "apiVersion": "2017-08-01", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses', variables('ipName'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('lbFrontendName')]", "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[parameters('jenkinsDNSPrefix')]" - } + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('ipName'))]" + } } - }, - { - "comments": "VMSS for the blue environment.", - "type": "Microsoft.Compute/virtualMachineScaleSets", - "sku": { - "name": "[parameters('virtualMachineSize')]", - "capacity": 2 - }, - "name": "[variables('blueVmss')]", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]", - "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", - "[resourceId('Microsoft.Network/loadBalancers', variables('lbName'))]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions', variables('jenkinsVmName'), variables('vmExtensionName'))]" - ], + } + ], + "backendAddressPools": [ + { + "name": "[variables('lbBlueBeName')]" + }, + { + "name": "[variables('lbGreenBeName')]" + } + ], + "inboundNatPools": [ + { + "name": "[variables('lbBlueNatPoolName')]", "properties": { - "singlePlacementGroup": true, - "upgradePolicy": { - "mode": "Automatic" - }, - "virtualMachineProfile": { - "osProfile": { - "computerNamePrefix": "[variables('blueComputerNamePrefix')]", - "adminUsername": "[parameters('adminUsername')]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]", - "keyData": "[parameters('sshPublicKey')]" - } - ] - } - } - }, - "storageProfile": { - "osDisk": { - "createOption": "FromImage", - "caching": "ReadWrite", - "managedDisk": { - "storageAccountType": "Standard_LRS" - } - }, - "imageReference": { - "id": "[variables('imageId')]" - } - }, - "networkProfile": { - "networkInterfaceConfigurations": [ - { - "name": "[concat(variables('blueComputerNamePrefix'), 'Nic')]", - "properties": { - "primary": true, - "enableAcceleratedNetworking": false, - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" - }, - "dnsSettings": { - "dnsServers": [] - }, - "ipConfigurations": [ - { - "name": "[concat(variables('blueComputerNamePrefix'), 'IPConfig')]", - "properties": { - "subnet": { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnetName'))]" - }, - "privateIPAddressVersion": "IPv4", - "loadBalancerBackendAddressPools": [ - { - "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('lbName'), variables('lbBlueBeName'))]" - } - ], - "loadBalancerInboundNatPools": [ - { - "id": "[resourceId('Microsoft.Network/loadBalancers/inboundNatPools', variables('lbName'), variables('lbBlueNatPoolName'))]" - } - ] - } - } - ] - } - } - ] - } - }, - "overprovision": true + "protocol": "Tcp", + "backendPort": 22, + "frontendPortRangeStart": 50000, + "frontendPortRangeEnd": 50119, + "frontendIPConfiguration": { + "id": "[variables('lbFrontendId')]" + } } - }, - { - "comments": "VMSS for the green environment.", - "type": "Microsoft.Compute/virtualMachineScaleSets", - "sku": { - "name": "[parameters('virtualMachineSize')]", - "capacity": 2 - }, - "name": "[variables('greenVmss')]", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]", - "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", - "[resourceId('Microsoft.Network/loadBalancers', variables('lbName'))]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions', variables('jenkinsVmName'), variables('vmExtensionName'))]" - ], + }, + { + "name": "[variables('lbGreenNatPoolName')]", "properties": { - "singlePlacementGroup": true, - "upgradePolicy": { - "mode": "Automatic" - }, - "virtualMachineProfile": { - "osProfile": { - "computerNamePrefix": "[variables('greenComputerNamePrefix')]", - "adminUsername": "[parameters('adminUsername')]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]", - "keyData": "[parameters('sshPublicKey')]" - } - ] - } - } - }, - "storageProfile": { - "osDisk": { - "createOption": "FromImage", - "caching": "ReadWrite", - "managedDisk": { - "storageAccountType": "Standard_LRS" - } - }, - "imageReference": { - "id": "[variables('imageId')]" - } - }, - "networkProfile": { - "networkInterfaceConfigurations": [ - { - "name": "[concat(variables('greenComputerNamePrefix'), 'Nic')]", - "properties": { - "primary": true, - "enableAcceleratedNetworking": false, - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" - }, - "dnsSettings": { - "dnsServers": [] - }, - "ipConfigurations": [ - { - "name": "[concat(variables('greenComputerNamePrefix'), 'IPConfig')]", - "properties": { - "subnet": { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnetName'))]" - }, - "privateIPAddressVersion": "IPv4", - "loadBalancerBackendAddressPools": [ - { - "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('lbName'), variables('lbGreenBeName'))]" - } - ], - "loadBalancerInboundNatPools": [ - { - "id": "[resourceId('Microsoft.Network/loadBalancers/inboundNatPools', variables('lbName'), variables('lbGreenNatPoolName'))]" - } - ] - } - } - ] - } - } - ] - } - }, - "overprovision": true + "protocol": "Tcp", + "backendPort": 22, + "frontendPortRangeStart": 50120, + "frontendPortRangeEnd": 50239, + "frontendIPConfiguration": { + "id": "[variables('lbFrontendId')]" + } } - }, - { - "comments": "Frontend load balancer in Standard SKU which requires API version after 2017-08-01. Initially route to the blue backend.", - "type": "Microsoft.Network/loadBalancers", - "name": "[variables('lbName')]", - "apiVersion": "2017-08-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard" - }, - "dependsOn": [ - "[resourceId('Microsoft.Network/publicIPAddresses', variables('ipName'))]" - ], + } + ], + "loadBalancingRules": [ + { + "name": "[variables('service')]", "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('lbFrontendName')]", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('ipName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('lbBlueBeName')]" - }, - { - "name": "[variables('lbGreenBeName')]" - } - ], - "inboundNatPools": [ - { - "name": "[variables('lbBlueNatPoolName')]", - "properties": { - "protocol": "Tcp", - "backendPort": 22, - "frontendPortRangeStart": 50000, - "frontendPortRangeEnd": 50119, - "frontendIPConfiguration": { - "id": "[variables('lbFrontendId')]" - } - } - }, - { - "name": "[variables('lbGreenNatPoolName')]", - "properties": { - "protocol": "Tcp", - "backendPort": 22, - "frontendPortRangeStart": 50120, - "frontendPortRangeEnd": 50239, - "frontendIPConfiguration": { - "id": "[variables('lbFrontendId')]" - } - } - } - ], - "loadBalancingRules": [ - { - "name": "[variables('service')]", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('lbFrontendId')]" - }, - "frontendPort": 80, - "backendPort": 8080, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 4, - "protocol": "Tcp", - "loadDistribution": "Default", - "backendAddressPool": { - "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('lbName'), variables('lbBlueBeName'))]" - }, - "probe": { - "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('lbName'), variables('service'))]" - } - } - }, - { - "name": "[concat(variables('service'), '-test')]", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('lbFrontendId')]" - }, - "frontendPort": 8080, - "backendPort": 8081, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 4, - "protocol": "Tcp", - "loadDistribution": "Default", - "backendAddressPool": { - "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('lbName'), variables('lbGreenBeName'))]" - }, - "probe": { - "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('lbName'), variables('service'))]" - } - } - } - ], - "probes": [ - { - "name": "[variables('service')]", - "properties": { - "protocol": "Http", - "port": 8080, - "requestPath": "/", - "intervalInSeconds": 15, - "numberOfProbes": 2 - } - } - ] + "frontendIPConfiguration": { + "id": "[variables('lbFrontendId')]" + }, + "frontendPort": 80, + "backendPort": 8080, + "enableFloatingIP": false, + "idleTimeoutInMinutes": 4, + "protocol": "Tcp", + "loadDistribution": "Default", + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('lbName'), variables('lbBlueBeName'))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('lbName'), variables('service'))]" + } } - }, - { - "comments": "Network security groups applied to the network interfaces of the VMs in the VMSS. Needs to open at least 22 and 8080. Tweak this on your demand.", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('nsgName')]", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + }, + { + "name": "[concat(variables('service'), '-test')]", "properties": { - "securityRules": [ - { - "name": "allow-ssh-access", - "properties": { - "protocol": "*", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 101, - "direction": "Inbound", - "sourceAddressPrefixes": [], - "destinationAddressPrefixes": [] - } - }, - { - "name": "allow-http-service-access", - "properties": { - "protocol": "*", - "sourcePortRange": "*", - "destinationPortRange": "8080", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 102, - "direction": "Inbound", - "sourceAddressPrefixes": [], - "destinationAddressPrefixes": [] - } - } - ] + "frontendIPConfiguration": { + "id": "[variables('lbFrontendId')]" + }, + "frontendPort": 8080, + "backendPort": 8081, + "enableFloatingIP": false, + "idleTimeoutInMinutes": 4, + "protocol": "Tcp", + "loadDistribution": "Default", + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('lbName'), variables('lbGreenBeName'))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('lbName'), variables('service'))]" + } } - }, - { - "comments": "Public IP address in Standard SKU. This is required to match the SKU of the load balancer. Requires API version after 2017-08-01.", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('ipName')]", - "apiVersion": "2017-08-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard" - }, + } + ], + "probes": [ + { + "name": "[variables('service')]", "properties": { - "publicIPAddressVersion": "IPv4", - "publicIPAllocationMethod": "Static", - "idleTimeoutInMinutes": 4, - "dnsSettings": { - "domainNameLabel": "[parameters('tomcatDNSPrefix')]" - } + "protocol": "Http", + "port": 8080, + "requestPath": "/", + "intervalInSeconds": 15, + "numberOfProbes": 2 } - }, - { - "comments": "Virtual network for all the VMs in the VMSS. Use 10.87. prefix to avoid NSG conflicts.", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('vnetName')]", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + } + ] + } + }, + { + "comments": "Network security groups applied to the network interfaces of the VMs in the VMSS. Needs to open at least 22 and 8080. Tweak this on your demand.", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('nsgName')]", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "allow-ssh-access", "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.87.0.0/16" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "10.87.0.0/24" - } - } - ] + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 101, + "direction": "Inbound", + "sourceAddressPrefixes": [], + "destinationAddressPrefixes": [] } + }, + { + "name": "allow-http-service-access", + "properties": { + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "8080", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 102, + "direction": "Inbound", + "sourceAddressPrefixes": [], + "destinationAddressPrefixes": [] + } + } + ] + } + }, + { + "comments": "Public IP address in Standard SKU. This is required to match the SKU of the load balancer. Requires API version after 2017-08-01.", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('ipName')]", + "apiVersion": "2017-08-01", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Static", + "idleTimeoutInMinutes": 4, + "dnsSettings": { + "domainNameLabel": "[parameters('tomcatDNSPrefix')]" } - ], - "outputs": { - "admin_username": { - "type": "string", - "value": "[parameters('adminUsername')]" - }, - "jenkins_url": { - "type": "string", - "value": "[concat('http://', reference(variables('jenkinsIp')).dnsSettings.fqdn)]" - }, - "ssh": { - "type": "string", - "value": "[concat('ssh -L 8080:localhost:8080 ', parameters('adminUsername'), '@', reference(variables('jenkinsIp')).dnsSettings.fqdn)]" - }, - "tomcat_url": { - "type": "string", - "value": "[concat('http://', reference(variables('ipName')).dnsSettings.fqdn)]" + } + }, + { + "comments": "Virtual network for all the VMs in the VMSS. Use 10.87. prefix to avoid NSG conflicts.", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('vnetName')]", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.87.0.0/16" + ] }, - "base_image_id": { - "type": "string", - "value": "[variables('imageId')]" - } + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "10.87.0.0/24" + } + } + ] + } + } + ], + "outputs": { + "admin_username": { + "type": "string", + "value": "[parameters('adminUsername')]" + }, + "jenkins_url": { + "type": "string", + "value": "[concat('http://', reference(variables('jenkinsIp')).dnsSettings.fqdn)]" + }, + "ssh": { + "type": "string", + "value": "[concat('ssh -L 8080:localhost:8080 ', parameters('adminUsername'), '@', reference(variables('jenkinsIp')).dnsSettings.fqdn)]" + }, + "tomcat_url": { + "type": "string", + "value": "[concat('http://', reference(variables('ipName')).dnsSettings.fqdn)]" + }, + "base_image_id": { + "type": "string", + "value": "[variables('imageId')]" } + } } diff --git a/301-multi-tier-loadbalancing/azuredeploy.json b/301-multi-tier-loadbalancing/azuredeploy.json index 3bf3d486d0ce..ceb86e97be14 100644 --- a/301-multi-tier-loadbalancing/azuredeploy.json +++ b/301-multi-tier-loadbalancing/azuredeploy.json @@ -110,7 +110,7 @@ "defaultValue": "GEN-UNIQUE", "type": "string", "minLength": 1, - "metadata": { + "metadata": { "description": "Application prefix name, should be <= 10 characters" } }, @@ -202,6 +202,13 @@ "metadata": { "description": "Path match string for Path Rule 2" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -217,16 +224,11 @@ "region1-web-vm-nic": "[concat(variables('app-prefix'), '-web-vm-nic-rg1-')]", "region1-web-vm-pip": "[concat(variables('app-prefix'), '-web-vm-pip-rg1-')]", "region1-web-vmsprefix": "[concat(variables('app-prefix'),'webvmrg1')]", - "region2-vnet-id": "[resourceId('Microsoft.Network/virtualNetworks', concat(variables('region-vnet-name'),'1'))]", "region2-web-vm-nic": "[concat(variables('app-prefix'), '-web-vm-nic-rg2-')]", "region2-web-vm-pip": "[concat(variables('app-prefix'), '-web-vm-pip-rg2-')]", "region2-web-vmsprefix": "[concat(variables('app-prefix'),'webvmrg2')]", - "region-appGW-backendIp-default": "[concat(variables('region1-web-vmsprefix'),'0.',resourceGroup().location,'.cloudapp.azure.com')]", - "region-appGW-backendIp-ForPathRule1": "[concat(variables('region1-web-vmsprefix'),'1.',resourceGroup().location,'.cloudapp.azure.com')]", - "region-appGW-backendIp-ForPathRule2": "[concat(variables('region1-web-vmsprefix'),'1.',resourceGroup().location,'.cloudapp.azure.com')]", "region-appgw-name": "region-appgw-", "region-appgw-pip": "region-appgw-pip-", - "region-appGW-subnetRef": "[concat(variables('region1-vnet-id'),'/subnets/',variables('vnet-appGW-subnet'))]", "region-availabilitySet": "region_AvSet", "region-storage-account": "[concat('rg', uniqueString(resourceGroup().id))]", "region-tm-test-vm": "[concat(variables('app-prefix'),'-tm-vm-rg')]", @@ -235,7 +237,6 @@ "region-vnet-name": "region-multitierlb-vnet", "region-web-ilb-pip": "[concat(parameters('loadbalancer-dns-prefix'),'rg')]", "region-web-lb": "[concat(parameters('loadbalancer-dns-prefix'),'rg')]", - "vhdStorageType": "Standard_LRS", "vnet-appGW-subnet": "appGatewaySubnet", "vnet-front-end-subnet": "front-end-subnet", "vnet-lb-subnet": "lb-subnet" @@ -268,7 +269,9 @@ "tags": { "displayName": "vnetloop" }, - "dependsOn": [ "storage-accounts-loop" ], + "dependsOn": [ + "storage-accounts-loop" + ], "properties": { "addressSpace": { "addressPrefixes": [ @@ -344,7 +347,6 @@ "properties": { "publicIPAddress": { "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('region-web-ilb-pip'),copyIndex()))]" - } } } @@ -363,7 +365,6 @@ "intervalInSeconds": 15, "numberOfProbes": 2 } - } ], "loadBalancingRules": [ @@ -384,10 +385,8 @@ "backendPort": 80, "idleTimeoutInMinutes": 15 } - } ] - }, "copy": { "name": "region-web-lb-loop", @@ -479,7 +478,7 @@ "version": "latest" }, "osDisk": { - "createOption": "FromImage", + "createOption": "FromImage", "caching": "ReadWrite" }, "dataDisks": [] @@ -498,7 +497,6 @@ "networkInterfaces": [ { "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('region-tm-vm-nic'), copyindex()))]" - } ] } @@ -516,11 +514,11 @@ "tags": { "displayName": "Region-availabilitySets" }, - "properties": { - "platformFaultDomainCount": 2, - "platformUpdateDomainCount": 2, - "managed" : true - }, + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 2, + "managed": true + }, "copy": { "name": "web-vms-availabilitysets-Loop", "count": 2 @@ -840,7 +838,6 @@ "backendAddresses": [ { "fqdn": "[reference(concat('Microsoft.Network/publicIPAddresses/',variables('region1-web-vm-pip'), '0')).dnsSettings.fqdn]" - } ], "requestRoutingRules": [ @@ -853,9 +850,7 @@ { "name": "appGatewayBackendPool2", "properties": { - "backendAddresses": [ - - ], + "backendAddresses": [], "requestRoutingRules": [ { "Id": "[concat(resourceId('Microsoft.Network/applicationGateways',concat(variables('region-appgw-name'),copyIndex())), '/requestRoutingRules/rule1')]" diff --git a/301-multi-tier-service-networking/azuredeploy.json b/301-multi-tier-service-networking/azuredeploy.json index 950684e62a67..d03f4b2b29a4 100644 --- a/301-multi-tier-service-networking/azuredeploy.json +++ b/301-multi-tier-service-networking/azuredeploy.json @@ -96,13 +96,19 @@ "metadata": { "description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: 2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "imagePublisher": "MicrosoftWindowsServer", "imageOffer": "WindowsServer", "storageAccountType": "Standard_LRS", - "vmSize": "Standard_A2", "VNetName": "multiTierVNet", "FESubnetName": "FrontendSubnet", "AppSubnetName": "AppSubnet", @@ -115,9 +121,7 @@ "FrontendPrefix": "10.1.0.0/24", "AppPrefix": "10.1.1.0/24", "BackendPrefix": "10.1.2.0/24", - "feAvailabilitySetName": "feAvSet", "appAvailabilitySetName": "appAvSet", - "beAvailabilitySetName": "beAvSet", "AppServerIP1": "10.1.1.4", "AppServerIP2": "10.1.1.5", "FeNsgname": "FrontendNSG", @@ -128,9 +132,6 @@ "appGatewayPubPRef": "[resourceId('Microsoft.Network/publicIPAddresses', variables('appGatewayPubIPName'))]", "applicationGatewayID": "[resourceId('Microsoft.Network/applicationGateways',variables('appGatewayName'))]", "ILBIP": "10.1.2.100", - "SqlIP1": "10.1.2.4", - "SqlIP2": "10.1.2.5", - "SqlIP3": "10.1.2.6", "IlbID": "[resourceId('Microsoft.Network/loadBalancers',parameters('multitierILB'))]", "privateIPConfigID": "[concat(variables('IlbID'),'/frontendIPConfigurations/LoadBalancerFrontEnd')]", "IlbPoolID": "[concat(variables('IlbID'),'/backendAddressPools/BackendPool1')]", @@ -139,15 +140,14 @@ "dbNicName": "dbNic", "appScaleCount": 2, "dbSclaeCount": 3, - "dbAvailabilitySetName": "DbAvlSet", - "apiVer": "2015-06-15" + "dbAvailabilitySetName": "DbAvlSet" }, "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newDBStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -156,7 +156,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('appGatewayPubIPName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } @@ -165,7 +165,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('appServersPublicIPPrefix'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "foo", "count": "[variables('appScaleCount')]" @@ -178,7 +178,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('VNetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('FeNsgname'))]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('AppNsgname'))]", @@ -225,7 +225,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('FeNsgname')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -291,7 +291,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('AppNsgname')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -371,7 +371,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('BeNsgname')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -423,7 +423,7 @@ "apiVersion": "2017-06-01", "name": "[variables('appGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('VNetName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('appGatewayPubIPName'))]" @@ -525,7 +525,7 @@ "apiVersion": "2015-05-01-preview", "name": "[parameters('multitierILB')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('VNetName'))]" ], @@ -585,7 +585,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('appNicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "foo", "count": "[variables('appScaleCount')]" @@ -616,7 +616,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('dbNicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "foo", "count": "[variables('dbSclaeCount')]" @@ -649,7 +649,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('appAvailabilitySetName')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": 2, "platformUpdateDomainCount": 2, @@ -660,7 +660,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('appVmNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "foo", "count": "[variables('appScaleCount')]" @@ -706,7 +706,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('dbAvailabilitySetName')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": 2, "platformUpdateDomainCount": 2, @@ -717,7 +717,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('dbVmNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "foo", "count": "[variables('dbSclaeCount')]" @@ -760,4 +760,4 @@ } } ] -} \ No newline at end of file +} diff --git a/301-servicebus-create-authrule-namespace-and-queue/azuredeploy.json b/301-servicebus-create-authrule-namespace-and-queue/azuredeploy.json index 5013666d6a5c..cc3e519ef230 100644 --- a/301-servicebus-create-authrule-namespace-and-queue/azuredeploy.json +++ b/301-servicebus-create-authrule-namespace-and-queue/azuredeploy.json @@ -1,106 +1,126 @@ { - "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "serviceBusNamespaceName": { - "type": "string", - "metadata": { - "description": "Name of the Service Bus namespace" - } - }, - "namespaceAuthorizationRuleName": { - "type": "string", - "metadata": { - "description": "Name of the Namespace AuthorizationRule" - } - }, - "serviceBusQueueName": { - "type": "string", - "metadata": { - "description": "Name of the Queue" - } - }, - "queueAuthorizationRuleName": { - "type": "string", - "metadata": { - "description": "Name of the Queue AuthorizationRule" + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "serviceBusNamespaceName": { + "type": "string", + "metadata": { + "description": "Name of the Service Bus namespace" + } + }, + "namespaceAuthorizationRuleName": { + "type": "string", + "metadata": { + "description": "Name of the Namespace AuthorizationRule" + } + }, + "serviceBusQueueName": { + "type": "string", + "metadata": { + "description": "Name of the Queue" + } + }, + "queueAuthorizationRuleName": { + "type": "string", + "metadata": { + "description": "Name of the Queue AuthorizationRule" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "namespaceAuthRuleName": "[concat(parameters('serviceBusNamespaceName'), concat('/', parameters('namespaceAuthorizationRuleName')))]", + "nsAuthorizationRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('serviceBusNamespaceName'), parameters('namespaceAuthorizationRuleName'))]", + "ehAuthorizationRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/queues/authorizationRules', parameters('serviceBusNamespaceName'), parameters('serviceBusQueueName'), parameters('queueAuthorizationRuleName'))]", + "sbVersion": "2017-04-01" + }, + "resources": [ + { + "apiVersion": "2017-04-01", + "name": "[parameters('serviceBusNamespaceName')]", + "type": "Microsoft.ServiceBus/namespaces", + "location": "[parameters('location')]", + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": {}, + "resources": [ + { + "apiVersion": "2017-04-01", + "name": "[parameters('serviceBusQueueName')]", + "type": "Queues", + "dependsOn": [ + "[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'))]" + ], + "properties": { + "lockDuration": "PT5M", + "maxSizeInMegabytes": "1024", + "requiresDuplicateDetection": "false", + "requiresSession": "false", + "defaultMessageTimeToLive": "P10675199DT2H48M5.4775807S", + "deadLetteringOnMessageExpiration": "false", + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": "10", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": "false", + "enableExpress": "false" + }, + "resources": [ + { + "apiVersion": "2017-04-01", + "name": "[parameters('queueAuthorizationRuleName')]", + "type": "AuthorizationRules", + "dependsOn": [ + "[parameters('serviceBusQueueName')]" + ], + "properties": { + "rights": [ + "Listen" + ] + } } + ] } + ] }, - "variables": { - "namespaceAuthRuleName": "[concat(parameters('serviceBusNamespaceName'), concat('/', parameters('namespaceAuthorizationRuleName')))]", - "nsAuthorizationRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('serviceBusNamespaceName'), parameters('namespaceAuthorizationRuleName'))]", - "ehAuthorizationRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/queues/authorizationRules', parameters('serviceBusNamespaceName'), parameters('serviceBusQueueName'), parameters('queueAuthorizationRuleName'))]", - "sbVersion": "2017-04-01" + { + "apiVersion": "2017-04-01", + "name": "[variables('namespaceAuthRuleName')]", + "type": "Microsoft.ServiceBus/namespaces/authorizationRules", + "dependsOn": [ + "[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'))]" + ], + "location": "[parameters('location')]", + "properties": { + "rights": [ + "Send" + ] + } + } + ], + "outputs": { + "NamespaceConnectionString": { + "type": "string", + "value": "[listkeys(variables('nsAuthorizationRuleResourceId'), variables('sbVersion')).primaryConnectionString]" }, - "resources": [{ - "apiVersion": "2017-04-01", - "name": "[parameters('serviceBusNamespaceName')]", - "type": "Microsoft.ServiceBus/namespaces", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": {}, - "resources": [{ - "apiVersion": "2017-04-01", - "name": "[parameters('serviceBusQueueName')]", - "type": "Queues", - "dependsOn": [ - "[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'))]" - ], - "properties": { - "lockDuration": "PT5M", - "maxSizeInMegabytes": "1024", - "requiresDuplicateDetection": "false", - "requiresSession": "false", - "defaultMessageTimeToLive": "P10675199DT2H48M5.4775807S", - "deadLetteringOnMessageExpiration": "false", - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": "10", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": "false", - "enableExpress": "false" - }, - "resources": [{ - "apiVersion": "2017-04-01", - "name": "[parameters('queueAuthorizationRuleName')]", - "type": "AuthorizationRules", - "dependsOn": [ - "[parameters('serviceBusQueueName')]" - ], - "properties": { - "rights": ["Listen"] - } - }] - }] - }, { - "apiVersion": "2017-04-01", - "name": "[variables('namespaceAuthRuleName')]", - "type": "Microsoft.ServiceBus/namespaces/authorizationRules", - "dependsOn": ["[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'))]"], - "location": "[resourceGroup().location]", - "properties": { - "rights": ["Send"] - } - }], - "outputs": { - "NamespaceConnectionString": { - "type": "string", - "value": "[listkeys(variables('nsAuthorizationRuleResourceId'), variables('sbVersion')).primaryConnectionString]" - }, - "NamespaceSharedAccessPolicyPrimaryKey": { - "type": "string", - "value": "[listkeys(variables('nsAuthorizationRuleResourceId'), variables('sbVersion')).primaryKey]" - }, - "EventHubConnectionString": { - "type": "string", - "value": "[listkeys(variables('ehAuthorizationRuleResourceId'), variables('sbVersion')).primaryConnectionString]" - }, - "EventHubSharedAccessPolicyPrimaryKey": { - "type": "string", - "value": "[listkeys(variables('ehAuthorizationRuleResourceId'), variables('sbVersion')).primaryKey]" - } + "NamespaceSharedAccessPolicyPrimaryKey": { + "type": "string", + "value": "[listkeys(variables('nsAuthorizationRuleResourceId'), variables('sbVersion')).primaryKey]" + }, + "EventHubConnectionString": { + "type": "string", + "value": "[listkeys(variables('ehAuthorizationRuleResourceId'), variables('sbVersion')).primaryConnectionString]" + }, + "EventHubSharedAccessPolicyPrimaryKey": { + "type": "string", + "value": "[listkeys(variables('ehAuthorizationRuleResourceId'), variables('sbVersion')).primaryKey]" } -} \ No newline at end of file + } +} diff --git a/301-storage-spaces-direct-md-zones/nestedtemplates/deploy-s2d-cluster.json b/301-storage-spaces-direct-md-zones/nestedtemplates/deploy-s2d-cluster.json index ea4f2184960f..bd12519f58ba 100644 --- a/301-storage-spaces-direct-md-zones/nestedtemplates/deploy-s2d-cluster.json +++ b/301-storage-spaces-direct-md-zones/nestedtemplates/deploy-s2d-cluster.json @@ -1,309 +1,314 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "location": { - "type": "string", - "metadata": { - "description": "Location for the VM, only certain regions support zones during preview." - } - }, - "namePrefix": { - "type": "string", - "minLength": 3, - "maxLength": 8, - "metadata": { - "description": "Naming prefix for each new resource created. 3-char min, 8-char max, lowercase alphanumeric" - } - }, - "domainName": { - "type": "string", - "metadata": { - "description": "DNS domain name for existing Active Directory domain" - } - }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "Name of the Administrator of the existing Active Directory Domain" - } - }, - "adminPassword": { - "type": "securestring", - "minLength": 12, - "metadata": { - "description": "Password for the Administrator account of the existing Active Directory Domain" - } - }, - "nicSubnetUri": { - "type": "string", - "metadata": { - "description": "Resource ID for existing vnet/subnet to which VM NICs should be attached" - } - }, - "vmSize": { - "type": "string", - "metadata": { - "description": "Size of the S2D VMs to be created" - } - }, - "vmCount": { - "type": "int", - "minValue": 2, - "maxValue": 3, - "metadata": { - "description": "Number of S2D VMs to be created in cluster (Min=2, Max=3)" - } - }, - "vmDiskSize": { - "type": "int", - "minValue": 128, - "maxValue": 1023, - "metadata": { - "description": "Size of each data disk in GB on each S2D VM (Min=128, Max=1023)" - } - }, - "vmDiskCount": { - "type": "int", - "minValue": 2, - "maxValue": 32, - "metadata": { - "description": "Number of data disks on each S2D VM (Min=2, Max=32). Ensure that the VM size you've selected will support this number of data disks." - } - }, - "sofsName": { - "type": "string", - "metadata": { - "description": "Name of clustered Scale-Out File Server role" - } - }, - "shareName": { - "type": "string", - "metadata": { - "description": "Name of shared data folder on clustered Scale-Out File Server role" - } - }, - "imagePublisher": { - "type": "string", - "defaultValue": "MicrosoftWindowsServer" - }, - "imageOffer": { - "type": "string", - "defaultValue": "WindowsServer" - }, - "imageSKU": { - "type": "string", - "defaultValue": "2016-Datacenter" - }, - "imageVersion": { - "type": "string", - "defaultValue": "latest" - }, - "_artifactsLocation": { - "type": "string" - }, - "_artifactsLocationSasToken": { - "type": "string" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Location for the VM, only certain regions support zones during preview." + }, + "defaultValue": "[resourceGroup().location]" }, - "variables": { - "apiVersionStorage": "2016-01-01", - "witnessStorageName": "[concat(parameters('namePrefix'),uniqueString(resourceGroup().id),'cw')]", - "witnessStorageType": "Standard_LRS", - "vmNamePrefix": "[concat(parameters('namePrefix'),'-s2d-')]", - "clusterName": "[concat(variables('vmNamePrefix'),'c')]", - "vmLoopTemplateURL": "[concat(parameters('_artifactsLocation'),'/newVM.json',parameters('_artifactsLocationSasToken'))]", - "s2dPrepModulesURL": "[concat(parameters('_artifactsLocation'),'/prep-s2d.ps1.zip',parameters('_artifactsLocationSasToken'))]", - "s2dPrepFunction": "PrepS2D.ps1\\PrepS2D", - "s2dConfigModulesURL": "[concat(parameters('_artifactsLocation'),'/config-s2d.ps1.zip',parameters('_artifactsLocationSasToken'))]", - "s2dConfigFunction": "ConfigS2D.ps1\\ConfigS2D", - "zones": ["1","2","3"] + "namePrefix": { + "type": "string", + "minLength": 3, + "maxLength": 8, + "metadata": { + "description": "Naming prefix for each new resource created. 3-char min, 8-char max, lowercase alphanumeric" + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('witnessStorageName')]", - "apiVersion": "2016-01-01", - "location": "[parameters('location')]", - "sku": { - "name": "[variables('witnessStorageType')]" - }, - "kind": "Storage" - }, - { - "name": "[concat(variables('vmNamePrefix'), copyindex(), '-nic')]", - "type": "Microsoft.Network/networkInterfaces", - "location": "[parameters('location')]", - "apiVersion": "2016-10-01", - "copy": { - "name": "nicLoop", - "count": "[parameters('vmCount')]" - }, + "domainName": { + "type": "string", + "metadata": { + "description": "DNS domain name for existing Active Directory domain" + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "Name of the Administrator of the existing Active Directory Domain" + } + }, + "adminPassword": { + "type": "securestring", + "minLength": 12, + "metadata": { + "description": "Password for the Administrator account of the existing Active Directory Domain" + } + }, + "nicSubnetUri": { + "type": "string", + "metadata": { + "description": "Resource ID for existing vnet/subnet to which VM NICs should be attached" + } + }, + "vmSize": { + "type": "string", + "metadata": { + "description": "Size of the S2D VMs to be created" + } + }, + "vmCount": { + "type": "int", + "minValue": 2, + "maxValue": 3, + "metadata": { + "description": "Number of S2D VMs to be created in cluster (Min=2, Max=3)" + } + }, + "vmDiskSize": { + "type": "int", + "minValue": 128, + "maxValue": 1023, + "metadata": { + "description": "Size of each data disk in GB on each S2D VM (Min=128, Max=1023)" + } + }, + "vmDiskCount": { + "type": "int", + "minValue": 2, + "maxValue": 32, + "metadata": { + "description": "Number of data disks on each S2D VM (Min=2, Max=32). Ensure that the VM size you've selected will support this number of data disks." + } + }, + "sofsName": { + "type": "string", + "metadata": { + "description": "Name of clustered Scale-Out File Server role" + } + }, + "shareName": { + "type": "string", + "metadata": { + "description": "Name of shared data folder on clustered Scale-Out File Server role" + } + }, + "imagePublisher": { + "type": "string", + "defaultValue": "MicrosoftWindowsServer" + }, + "imageOffer": { + "type": "string", + "defaultValue": "WindowsServer" + }, + "imageSKU": { + "type": "string", + "defaultValue": "2016-Datacenter" + }, + "imageVersion": { + "type": "string", + "defaultValue": "latest" + }, + "_artifactsLocation": { + "type": "string" + }, + "_artifactsLocationSasToken": { + "type": "string" + } + }, + "variables": { + "apiVersionStorage": "2016-01-01", + "witnessStorageName": "[concat(parameters('namePrefix'),uniqueString(resourceGroup().id),'cw')]", + "witnessStorageType": "Standard_LRS", + "vmNamePrefix": "[concat(parameters('namePrefix'),'-s2d-')]", + "clusterName": "[concat(variables('vmNamePrefix'),'c')]", + "vmLoopTemplateURL": "[concat(parameters('_artifactsLocation'),'/newVM.json',parameters('_artifactsLocationSasToken'))]", + "s2dPrepModulesURL": "[concat(parameters('_artifactsLocation'),'/prep-s2d.ps1.zip',parameters('_artifactsLocationSasToken'))]", + "s2dPrepFunction": "PrepS2D.ps1\\PrepS2D", + "s2dConfigModulesURL": "[concat(parameters('_artifactsLocation'),'/config-s2d.ps1.zip',parameters('_artifactsLocationSasToken'))]", + "s2dConfigFunction": "ConfigS2D.ps1\\ConfigS2D", + "zones": [ + "1", + "2", + "3" + ] + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('witnessStorageName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "sku": { + "name": "[variables('witnessStorageType')]" + }, + "kind": "Storage" + }, + { + "name": "[concat(variables('vmNamePrefix'), copyindex(), '-nic')]", + "type": "Microsoft.Network/networkInterfaces", + "location": "[parameters('location')]", + "apiVersion": "2016-10-01", + "copy": { + "name": "nicLoop", + "count": "[parameters('vmCount')]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[parameters('nicSubnetUri')]" - } - } - } - ] + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[parameters('nicSubnetUri')]" + } } + } + ] + } + }, + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "copy": { + "name": "virtualMachineLoop", + "count": "[parameters('vmCount')]" + }, + "name": "[concat(variables('vmNamePrefix'),copyindex(),'-newVM')]", + "dependsOn": [ + "nicLoop" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('vmLoopTemplateURL')]" }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "copy": { - "name": "virtualMachineLoop", - "count": "[parameters('vmCount')]" - }, - "name": "[concat(variables('vmNamePrefix'),copyindex(),'-newVM')]", - "dependsOn": [ - "nicLoop" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('vmLoopTemplateURL')]" - }, - "parameters": { - "location": { - "value": "[parameters('location')]" - }, - "vmName": { - "value": "[concat(variables('vmNamePrefix'), copyindex())]" - }, - "vmSize": { - "value": "[parameters('vmSize')]" - }, - "vmDiskCount": { - "value": "[parameters('vmDiskCount')]" - }, - "vmDiskSize": { - "value": "[parameters('vmDiskSize')]" - }, - "adminUsername": { - "value": "[parameters('adminUsername')]" - }, - "adminPassword": { - "value": "[parameters('adminPassword')]" - }, - "_artifactsLocation": { - "value": "[parameters('_artifactsLocation')]" - }, - "_artifactsLocationSasToken": { - "value": "[parameters('_artifactsLocationSasToken')]" - }, - "imagePublisher": { - "value": "[parameters('imagePublisher')]" - }, - "imageOffer": { - "value": "[parameters('imageOffer')]" - }, - "imageSKU": { - "value": "[parameters('imageSKU')]" - }, - "imageVersion": { - "value": "[parameters('imageVersion')]" - }, - "zones": { - "value": "[take(skip(variables('zones'),mod(copyIndex(),length(variables('zones')))),1)]" - } - } + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "vmName": { + "value": "[concat(variables('vmNamePrefix'), copyindex())]" + }, + "vmSize": { + "value": "[parameters('vmSize')]" + }, + "vmDiskCount": { + "value": "[parameters('vmDiskCount')]" + }, + "vmDiskSize": { + "value": "[parameters('vmDiskSize')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "_artifactsLocation": { + "value": "[parameters('_artifactsLocation')]" + }, + "_artifactsLocationSasToken": { + "value": "[parameters('_artifactsLocationSasToken')]" + }, + "imagePublisher": { + "value": "[parameters('imagePublisher')]" + }, + "imageOffer": { + "value": "[parameters('imageOffer')]" + }, + "imageSKU": { + "value": "[parameters('imageSKU')]" + }, + "imageVersion": { + "value": "[parameters('imageVersion')]" + }, + "zones": { + "value": "[take(skip(variables('zones'),mod(copyIndex(),length(variables('zones')))),1)]" + } + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmNamePrefix'),copyindex(1),'/s2dPrep')]", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "virtualMachineLoop" + ], + "copy": { + "name": "virtualMachineExtensionLoop", + "count": "[sub(parameters('vmCount'),1)]" + }, + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.20", + "autoUpgradeMinorVersion": true, + "settings": { + "modulesUrl": "[variables('s2dPrepModulesURL')]", + "configurationFunction": "[variables('s2dPrepFunction')]", + "properties": { + "domainName": "[parameters('domainName')]", + "adminCreds": { + "userName": "[parameters('adminUserName')]", + "password": "PrivateSettingsRef:adminPassword" } + } }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmNamePrefix'),copyindex(1),'/s2dPrep')]", - "apiVersion": "2017-03-30", - "location": "[parameters('location')]", - "dependsOn": [ - "virtualMachineLoop" - ], - "copy": { - "name": "virtualMachineExtensionLoop", - "count": "[sub(parameters('vmCount'),1)]" + "protectedSettings": { + "items": { + "adminPassword": "[parameters('adminPassword')]" + } + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmNamePrefix'),'0/s2dConfig')]", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "virtualMachineLoop", + "virtualMachineExtensionLoop", + "[resourceId('Microsoft.Storage/storageAccounts', variables('witnessStorageName'))]" + ], + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.20", + "autoUpgradeMinorVersion": true, + "settings": { + "modulesUrl": "[variables('s2dConfigModulesURL')]", + "configurationFunction": "[variables('s2dConfigFunction')]", + "properties": { + "domainName": "[parameters('domainName')]", + "clusterName": "[variables('clusterName')]", + "sofsName": "[parameters('sofsName')]", + "shareName": "[parameters('shareName')]", + "vmNamePrefix": "[variables('vmNamePrefix')]", + "vmCount": "[parameters('vmCount')]", + "vmDiskSize": "[parameters('vmDiskSize')]", + "witnessStorageName": "[variables('witnessStorageName')]", + "witnessStorageKey": { + "userName": "PLACEHOLDER-DO-NOT-USE", + "password": "PrivateSettingsRef:witnessStorageKey" }, - "properties": { - "publisher": "Microsoft.Powershell", - "type": "DSC", - "typeHandlerVersion": "2.20", - "autoUpgradeMinorVersion": true, - "settings": { - "modulesUrl": "[variables('s2dPrepModulesURL')]", - "configurationFunction": "[variables('s2dPrepFunction')]", - "properties": { - "domainName": "[parameters('domainName')]", - "adminCreds": { - "userName": "[parameters('adminUserName')]", - "password": "PrivateSettingsRef:adminPassword" - } - } - }, - "protectedSettings": { - "items": { - "adminPassword": "[parameters('adminPassword')]" - } - } + "adminCreds": { + "userName": "[parameters('adminUserName')]", + "password": "PrivateSettingsRef:adminPassword" } + } }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmNamePrefix'),'0/s2dConfig')]", - "apiVersion": "2017-03-30", - "location": "[parameters('location')]", - "dependsOn": [ - "virtualMachineLoop", - "virtualMachineExtensionLoop", - "[resourceId('Microsoft.Storage/storageAccounts', variables('witnessStorageName'))]" - ], - "properties": { - "publisher": "Microsoft.Powershell", - "type": "DSC", - "typeHandlerVersion": "2.20", - "autoUpgradeMinorVersion": true, - "settings": { - "modulesUrl": "[variables('s2dConfigModulesURL')]", - "configurationFunction": "[variables('s2dConfigFunction')]", - "properties": { - "domainName": "[parameters('domainName')]", - "clusterName": "[variables('clusterName')]", - "sofsName": "[parameters('sofsName')]", - "shareName": "[parameters('shareName')]", - "vmNamePrefix": "[variables('vmNamePrefix')]", - "vmCount": "[parameters('vmCount')]", - "vmDiskSize": "[parameters('vmDiskSize')]", - "witnessStorageName": "[variables('witnessStorageName')]", - "witnessStorageKey": { - "userName": "PLACEHOLDER-DO-NOT-USE", - "password": "PrivateSettingsRef:witnessStorageKey" - }, - "adminCreds": { - "userName": "[parameters('adminUserName')]", - "password": "PrivateSettingsRef:adminPassword" - } - } - }, - "protectedSettings": { - "items": { - "adminPassword": "[parameters('adminPassword')]", - "witnessStorageKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts',variables('witnessStorageName')),variables('apiVersionStorage')).keys[0].value]" - } - } - } - } - ], - "outputs": { - "sofsName": { - "type": "string", - "value": "[parameters('sofsName')]" - }, - "shareName": { - "type": "string", - "value": "[parameters('shareName')]" + "protectedSettings": { + "items": { + "adminPassword": "[parameters('adminPassword')]", + "witnessStorageKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts',variables('witnessStorageName')),variables('apiVersionStorage')).keys[0].value]" + } } + } + } + ], + "outputs": { + "sofsName": { + "type": "string", + "value": "[parameters('sofsName')]" + }, + "shareName": { + "type": "string", + "value": "[parameters('shareName')]" } -} \ No newline at end of file + } +} diff --git a/301-storage-spaces-direct-md-zones/nestedtemplates/newVM.json b/301-storage-spaces-direct-md-zones/nestedtemplates/newVM.json index 66b6066caa8a..eae328aea348 100644 --- a/301-storage-spaces-direct-md-zones/nestedtemplates/newVM.json +++ b/301-storage-spaces-direct-md-zones/nestedtemplates/newVM.json @@ -1,125 +1,126 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "location": { - "type": "string" - }, - "vmName": { - "type": "string" - }, - "vmSize": { - "type": "string" - }, - "vmDiskCount": { - "type": "int" - }, - "vmDiskSize": { - "type": "int" - }, - "adminUsername": { - "type": "string" - }, - "adminPassword": { - "type": "securestring" - }, - "imagePublisher": { - "type": "string" - }, - "imageOffer": { - "type": "string" - }, - "imageSKU": { - "type": "string" - }, - "imageVersion": { - "type": "string" - }, - "zones": { - "type": "array" - }, - "_artifactsLocation": { - "type": "string" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]" + }, + "vmName": { + "type": "string" + }, + "vmSize": { + "type": "string" + }, + "vmDiskCount": { + "type": "int" + }, + "vmDiskSize": { + "type": "int" + }, + "adminUsername": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "imagePublisher": { + "type": "string" + }, + "imageOffer": { + "type": "string" + }, + "imageSKU": { + "type": "string" + }, + "imageVersion": { + "type": "string" + }, + "zones": { + "type": "array" + }, + "_artifactsLocation": { + "type": "string" + }, + "_artifactsLocationSasToken": { + "type": "string" + } + }, + "variables": { + "diskSelectionTemplateUri": "[concat(parameters('_artifactsLocation'),'/diskSelection.json',parameters('_artifactsLocationSasToken'))]" + }, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "name": "[concat(parameters('vmName'),'-diskSelection')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('diskSelectionTemplateUri')]" }, - "_artifactsLocationSasToken": { - "type": "string" + "parameters": { + "vmDiskCount": { + "value": "[parameters('vmDiskCount')]" + }, + "vmDiskSize": { + "value": "[parameters('vmDiskSize')]" + }, + "diskCaching": { + "value": "None" + }, + "diskNamingPrefix": { + "value": "[concat(parameters('vmName'), '-data')]" + } } + } }, - "variables": { - "diskSelectionTemplateUri": "[concat(parameters('_artifactsLocation'),'/diskSelection.json',parameters('_artifactsLocationSasToken'))]" - }, - "resources": [ - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "name": "[concat(parameters('vmName'),'-diskSelection')]", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('diskSelectionTemplateUri')]" - }, - "parameters": { - "vmDiskCount": { - "value": "[parameters('vmDiskCount')]" - }, - "vmDiskSize": { - "value": "[parameters('vmDiskSize')]" - }, - "diskCaching": { - "value": "None" - }, - "diskNamingPrefix": { - "value": "[concat(parameters('vmName'), '-data')]" - } - } - } + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "name": "[parameters('vmName')]", + "zones": "[parameters('zones')]", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/',parameters('vmName'),'-diskSelection')]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" }, - { - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2017-03-30", - "location": "[parameters('location')]", - "name": "[parameters('vmName')]", - "zones": "[parameters('zones')]", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/',parameters('vmName'),'-diskSelection')]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" - }, - "osProfile": { - "computerName": "[parameters('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('imagePublisher')]", - "offer": "[parameters('imageOffer')]", - "sku": "[parameters('imageSku')]", - "version": "[parameters('imageVersion')]" - }, - "osDisk": { - "name": "[concat(parameters('vmName'),'-osdisk')]", - "caching": "ReadWrite", - "createOption": "FromImage" - }, - "dataDisks": "[reference(concat(parameters('vmName'),'-diskSelection')).outputs.dataDiskArray.value]" - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('vmName'),'-nic'))]" - } - ] - } + "osProfile": { + "computerName": "[parameters('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('imagePublisher')]", + "offer": "[parameters('imageOffer')]", + "sku": "[parameters('imageSku')]", + "version": "[parameters('imageVersion')]" + }, + "osDisk": { + "name": "[concat(parameters('vmName'),'-osdisk')]", + "caching": "ReadWrite", + "createOption": "FromImage" + }, + "dataDisks": "[reference(concat(parameters('vmName'),'-diskSelection')).outputs.dataDiskArray.value]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('vmName'),'-nic'))]" } + ] } - ], - "outputs": { - "vmName": { - "type": "string", - "value": "[parameters('vmName')]" - } + } + } + ], + "outputs": { + "vmName": { + "type": "string", + "value": "[parameters('vmName')]" } -} \ No newline at end of file + } +} diff --git a/301-storage-spaces-direct/nestedtemplates/deploy-s2d-cluster.json b/301-storage-spaces-direct/nestedtemplates/deploy-s2d-cluster.json index 7a6958e0e5a0..b73d168546b1 100644 --- a/301-storage-spaces-direct/nestedtemplates/deploy-s2d-cluster.json +++ b/301-storage-spaces-direct/nestedtemplates/deploy-s2d-cluster.json @@ -1,340 +1,347 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "namePrefix": { - "type": "string", - "minLength": 3, - "maxLength": 8, - "metadata": { - "description": "Naming prefix for each new resource created. 3-char min, 8-char max, lowercase alphanumeric" - } - }, - "domainName": { - "type": "string", - "metadata": { - "description": "DNS domain name for existing Active Directory domain" - } - }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "Name of the Administrator of the existing Active Directory Domain" - } - }, - "adminPassword": { - "type": "securestring", - "minLength": 12, - "metadata": { - "description": "Password for the Administrator account of the existing Active Directory Domain" - } - }, - "storageAccountType": { - "type": "string", - "allowedValues": [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Premium_LRS" - ], - "metadata": { - "description": "Type of new Storage Accounts (Standard_LRS, Standard_GRS, Standard_RAGRS or Premium_LRS) to be created to store VM disks" - } - }, - "nicSubnetUri": { - "type": "string", - "metadata": { - "description": "Resource ID for existing vnet/subnet to which VM NICs should be attached" - } - }, - "vmSize": { - "type": "string", - "metadata": { - "description": "Size of the S2D VMs to be created" - } - }, - "vmCount": { - "type": "int", - "minValue": 2, - "maxValue": 3, - "metadata": { - "description": "Number of S2D VMs to be created in cluster (Min=2, Max=3)" - } - }, - "vmDiskSize": { - "type": "int", - "minValue": 128, - "maxValue": 1023, - "metadata": { - "description": "Size of each data disk in GB on each S2D VM (Min=128, Max=1023)" - } - }, - "vmDiskCount": { - "type": "int", - "minValue": 2, - "maxValue": 32, - "metadata": { - "description": "Number of data disks on each S2D VM (Min=2, Max=32). Ensure that the VM size you've selected will support this number of data disks." - } - }, - "sofsName": { - "type": "string", - "metadata": { - "description": "Name of clustered Scale-Out File Server role" - } - }, - "shareName": { - "type": "string", - "metadata": { - "description": "Name of shared data folder on clustered Scale-Out File Server role" - } - }, - "imagePublisher": { - "type": "string", - "defaultValue": "MicrosoftWindowsServer" - }, - "imageOffer": { - "type": "string", - "defaultValue": "WindowsServer" - }, - "imageSKU": { - "type": "string", - "defaultValue": "2016-Datacenter" - }, - "imageVersion": { - "type": "string", - "defaultValue": "latest" - }, - "_artifactsLocation": { - "type": "string" - }, - "_artifactsLocationSasToken": { - "type": "string" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "namePrefix": { + "type": "string", + "minLength": 3, + "maxLength": 8, + "metadata": { + "description": "Naming prefix for each new resource created. 3-char min, 8-char max, lowercase alphanumeric" + } }, - "variables": { - "apiVersionStorage": "2016-01-01", - "storageNamePrefix": "[concat(parameters('namePrefix'),uniqueString(resourceGroup().id),'vm')]", - "witnessStorageName": "[concat(parameters('namePrefix'),uniqueString(resourceGroup().id),'cw')]", - "witnessStorageType": "Standard_LRS", - "vmNamePrefix": "[concat(parameters('namePrefix'),'-s2d-')]", - "vmAvailabilitySetName": "[concat(variables('vmNamePrefix'),'as')]", - "clusterName": "[concat(variables('vmNamePrefix'),'c')]", - "vmLoopTemplateURL": "[concat(parameters('_artifactsLocation'),'/nestedtemplates/newVM.json',parameters('_artifactsLocationSasToken'))]", - "s2dPrepModulesURL": "[concat(parameters('_artifactsLocation'),'/dsc/prep-s2d.ps1.zip',parameters('_artifactsLocationSasToken'))]", - "s2dPrepFunction": "PrepS2D.ps1\\PrepS2D", - "s2dConfigModulesURL": "[concat(parameters('_artifactsLocation'),'/dsc/config-s2d.ps1.zip',parameters('_artifactsLocationSasToken'))]", - "s2dConfigFunction": "ConfigS2D.ps1\\ConfigS2D" + "domainName": { + "type": "string", + "metadata": { + "description": "DNS domain name for existing Active Directory domain" + } }, - "resources": [ - { - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('vmAvailabilitySetName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('witnessStorageName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "[variables('witnessStorageType')]" - }, - "kind": "Storage" - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('storageNamePrefix'),copyindex())]", - "apiVersion": "2016-01-01", - "copy": { - "name": "storageAccountLoop", - "count": "[parameters('vmCount')]" - }, - "location": "[resourceGroup().location]", - "sku": { - "name": "[parameters('storageAccountType')]" - }, - "kind": "Storage" - }, - { - "name": "[concat(variables('vmNamePrefix'), copyindex(), '-nic')]", - "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "copy": { - "name": "nicLoop", - "count": "[parameters('vmCount')]" - }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "Name of the Administrator of the existing Active Directory Domain" + } + }, + "adminPassword": { + "type": "securestring", + "minLength": 12, + "metadata": { + "description": "Password for the Administrator account of the existing Active Directory Domain" + } + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Premium_LRS" + ], + "metadata": { + "description": "Type of new Storage Accounts (Standard_LRS, Standard_GRS, Standard_RAGRS or Premium_LRS) to be created to store VM disks" + } + }, + "nicSubnetUri": { + "type": "string", + "metadata": { + "description": "Resource ID for existing vnet/subnet to which VM NICs should be attached" + } + }, + "vmSize": { + "type": "string", + "metadata": { + "description": "Size of the S2D VMs to be created" + } + }, + "vmCount": { + "type": "int", + "minValue": 2, + "maxValue": 3, + "metadata": { + "description": "Number of S2D VMs to be created in cluster (Min=2, Max=3)" + } + }, + "vmDiskSize": { + "type": "int", + "minValue": 128, + "maxValue": 1023, + "metadata": { + "description": "Size of each data disk in GB on each S2D VM (Min=128, Max=1023)" + } + }, + "vmDiskCount": { + "type": "int", + "minValue": 2, + "maxValue": 32, + "metadata": { + "description": "Number of data disks on each S2D VM (Min=2, Max=32). Ensure that the VM size you've selected will support this number of data disks." + } + }, + "sofsName": { + "type": "string", + "metadata": { + "description": "Name of clustered Scale-Out File Server role" + } + }, + "shareName": { + "type": "string", + "metadata": { + "description": "Name of shared data folder on clustered Scale-Out File Server role" + } + }, + "imagePublisher": { + "type": "string", + "defaultValue": "MicrosoftWindowsServer" + }, + "imageOffer": { + "type": "string", + "defaultValue": "WindowsServer" + }, + "imageSKU": { + "type": "string", + "defaultValue": "2016-Datacenter" + }, + "imageVersion": { + "type": "string", + "defaultValue": "latest" + }, + "_artifactsLocation": { + "type": "string" + }, + "_artifactsLocationSasToken": { + "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "apiVersionStorage": "2016-01-01", + "storageNamePrefix": "[concat(parameters('namePrefix'),uniqueString(resourceGroup().id),'vm')]", + "witnessStorageName": "[concat(parameters('namePrefix'),uniqueString(resourceGroup().id),'cw')]", + "witnessStorageType": "Standard_LRS", + "vmNamePrefix": "[concat(parameters('namePrefix'),'-s2d-')]", + "vmAvailabilitySetName": "[concat(variables('vmNamePrefix'),'as')]", + "clusterName": "[concat(variables('vmNamePrefix'),'c')]", + "vmLoopTemplateURL": "[concat(parameters('_artifactsLocation'),'/nestedtemplates/newVM.json',parameters('_artifactsLocationSasToken'))]", + "s2dPrepModulesURL": "[concat(parameters('_artifactsLocation'),'/dsc/prep-s2d.ps1.zip',parameters('_artifactsLocationSasToken'))]", + "s2dPrepFunction": "PrepS2D.ps1\\PrepS2D", + "s2dConfigModulesURL": "[concat(parameters('_artifactsLocation'),'/dsc/config-s2d.ps1.zip',parameters('_artifactsLocationSasToken'))]", + "s2dConfigFunction": "ConfigS2D.ps1\\ConfigS2D" + }, + "resources": [ + { + "type": "Microsoft.Compute/availabilitySets", + "name": "[variables('vmAvailabilitySetName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": {} + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('witnessStorageName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "sku": { + "name": "[variables('witnessStorageType')]" + }, + "kind": "Storage" + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[concat(variables('storageNamePrefix'),copyindex())]", + "apiVersion": "2016-01-01", + "copy": { + "name": "storageAccountLoop", + "count": "[parameters('vmCount')]" + }, + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "name": "[concat(variables('vmNamePrefix'), copyindex(), '-nic')]", + "type": "Microsoft.Network/networkInterfaces", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "copy": { + "name": "nicLoop", + "count": "[parameters('vmCount')]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[parameters('nicSubnetUri')]" - } - } - } - ] + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[parameters('nicSubnetUri')]" + } } + } + ] + } + }, + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "copy": { + "name": "virtualMachineLoop", + "count": "[parameters('vmCount')]" + }, + "name": "[concat(variables('vmNamePrefix'),copyindex(),'-newVM')]", + "dependsOn": [ + "storageAccountLoop", + "nicLoop", + "[resourceId('Microsoft.Compute/availabilitySets', variables('vmAvailabilitySetName'))]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('vmLoopTemplateURL')]" }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "copy": { - "name": "virtualMachineLoop", - "count": "[parameters('vmCount')]" - }, - "name": "[concat(variables('vmNamePrefix'),copyindex(),'-newVM')]", - "dependsOn": [ - "storageAccountLoop", - "nicLoop", - "[resourceId('Microsoft.Compute/availabilitySets', variables('vmAvailabilitySetName'))]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('vmLoopTemplateURL')]" - }, - "parameters": { - "vmName": { - "value": "[concat(variables('vmNamePrefix'), copyindex())]" - }, - "storageAccountUri": { - "value": "[reference(concat('Microsoft.Storage/storageAccounts/',variables('StorageNamePrefix'),copyIndex()),variables('apiVersionStorage')).primaryEndpoints.blob]" - }, - "vmAvailabilitySetName": { - "value": "[variables('vmAvailabilitySetName')]" - }, - "vmSize": { - "value": "[parameters('vmSize')]" - }, - "vmDiskCount": { - "value": "[parameters('vmDiskCount')]" - }, - "vmDiskSize": { - "value": "[parameters('vmDiskSize')]" - }, - "adminUsername": { - "value": "[parameters('adminUsername')]" - }, - "adminPassword": { - "value": "[parameters('adminPassword')]" - }, - "_artifactsLocation": { - "value": "[parameters('_artifactsLocation')]" - }, - "_artifactsLocationSasToken": { - "value": "[parameters('_artifactsLocationSasToken')]" - }, - "imagePublisher": { - "value": "[parameters('imagePublisher')]" - }, - "imageOffer": { - "value": "[parameters('imageOffer')]" - }, - "imageSKU": { - "value": "[parameters('imageSKU')]" - }, - "imageVersion": { - "value": "[parameters('imageVersion')]" - } - } + "parameters": { + "vmName": { + "value": "[concat(variables('vmNamePrefix'), copyindex())]" + }, + "storageAccountUri": { + "value": "[reference(concat('Microsoft.Storage/storageAccounts/',variables('StorageNamePrefix'),copyIndex()),variables('apiVersionStorage')).primaryEndpoints.blob]" + }, + "vmAvailabilitySetName": { + "value": "[variables('vmAvailabilitySetName')]" + }, + "vmSize": { + "value": "[parameters('vmSize')]" + }, + "vmDiskCount": { + "value": "[parameters('vmDiskCount')]" + }, + "vmDiskSize": { + "value": "[parameters('vmDiskSize')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "_artifactsLocation": { + "value": "[parameters('_artifactsLocation')]" + }, + "_artifactsLocationSasToken": { + "value": "[parameters('_artifactsLocationSasToken')]" + }, + "imagePublisher": { + "value": "[parameters('imagePublisher')]" + }, + "imageOffer": { + "value": "[parameters('imageOffer')]" + }, + "imageSKU": { + "value": "[parameters('imageSKU')]" + }, + "imageVersion": { + "value": "[parameters('imageVersion')]" + } + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmNamePrefix'),copyindex(1),'/s2dPrep')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "virtualMachineLoop" + ], + "copy": { + "name": "virtualMachineExtensionLoop", + "count": "[sub(parameters('vmCount'),1)]" + }, + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.20", + "autoUpgradeMinorVersion": true, + "settings": { + "modulesUrl": "[variables('s2dPrepModulesURL')]", + "configurationFunction": "[variables('s2dPrepFunction')]", + "properties": { + "domainName": "[parameters('domainName')]", + "adminCreds": { + "userName": "[parameters('adminUsername')]", + "password": "PrivateSettingsRef:adminPassword" } + } }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmNamePrefix'),copyindex(1),'/s2dPrep')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "virtualMachineLoop" - ], - "copy": { - "name": "virtualMachineExtensionLoop", - "count": "[sub(parameters('vmCount'),1)]" + "protectedSettings": { + "items": { + "adminPassword": "[parameters('adminPassword')]" + } + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmNamePrefix'),'0/s2dConfig')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "virtualMachineLoop", + "virtualMachineExtensionLoop", + "[resourceId('Microsoft.Storage/storageAccounts', variables('witnessStorageName'))]" + ], + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.20", + "autoUpgradeMinorVersion": true, + "settings": { + "modulesUrl": "[variables('s2dConfigModulesURL')]", + "configurationFunction": "[variables('s2dConfigFunction')]", + "properties": { + "domainName": "[parameters('domainName')]", + "clusterName": "[variables('clusterName')]", + "sofsName": "[parameters('sofsName')]", + "shareName": "[parameters('shareName')]", + "vmNamePrefix": "[variables('vmNamePrefix')]", + "vmCount": "[parameters('vmCount')]", + "vmDiskSize": "[parameters('vmDiskSize')]", + "witnessStorageName": "[variables('witnessStorageName')]", + "witnessStorageEndpoint": "[replace(split(reference(concat('Microsoft.Storage/storageAccounts/', variables('witnessStorageName'))).primaryEndpoints.blob, 'blob.')[1], '/', '')]", + "witnessStorageKey": { + "userName": "PLACEHOLDER-DO-NOT-USE", + "password": "PrivateSettingsRef:witnessStorageKey" }, - "properties": { - "publisher": "Microsoft.Powershell", - "type": "DSC", - "typeHandlerVersion": "2.20", - "autoUpgradeMinorVersion": true, - "settings": { - "modulesUrl": "[variables('s2dPrepModulesURL')]", - "configurationFunction": "[variables('s2dPrepFunction')]", - "properties": { - "domainName": "[parameters('domainName')]", - "adminCreds": { - "userName": "[parameters('adminUsername')]", - "password": "PrivateSettingsRef:adminPassword" - } - } - }, - "protectedSettings": { - "items": { - "adminPassword": "[parameters('adminPassword')]" - } - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmNamePrefix'),'0/s2dConfig')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "virtualMachineLoop", - "virtualMachineExtensionLoop", - "[resourceId('Microsoft.Storage/storageAccounts', variables('witnessStorageName'))]" - ], - "properties": { - "publisher": "Microsoft.Powershell", - "type": "DSC", - "typeHandlerVersion": "2.20", - "autoUpgradeMinorVersion": true, - "settings": { - "modulesUrl": "[variables('s2dConfigModulesURL')]", - "configurationFunction": "[variables('s2dConfigFunction')]", - "properties": { - "domainName": "[parameters('domainName')]", - "clusterName": "[variables('clusterName')]", - "sofsName": "[parameters('sofsName')]", - "shareName": "[parameters('shareName')]", - "vmNamePrefix": "[variables('vmNamePrefix')]", - "vmCount": "[parameters('vmCount')]", - "vmDiskSize": "[parameters('vmDiskSize')]", - "witnessStorageName": "[variables('witnessStorageName')]", - "witnessStorageEndpoint": "[replace(split(reference(concat('Microsoft.Storage/storageAccounts/', variables('witnessStorageName'))).primaryEndpoints.blob, 'blob.')[1], '/', '')]", - "witnessStorageKey": { - "userName": "PLACEHOLDER-DO-NOT-USE", - "password": "PrivateSettingsRef:witnessStorageKey" - }, - "adminCreds": { - "userName": "[parameters('adminUsername')]", - "password": "PrivateSettingsRef:adminPassword" - } - } - }, - "protectedSettings": { - "items": { - "adminPassword": "[parameters('adminPassword')]", - "witnessStorageKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts',variables('witnessStorageName')),variables('apiVersionStorage')).keys[0].value]" - } - } + "adminCreds": { + "userName": "[parameters('adminUsername')]", + "password": "PrivateSettingsRef:adminPassword" } - } - ], - "outputs": { - "sofsName": { - "type": "string", - "value": "[parameters('sofsName')]" + } }, - "shareName": { - "type": "string", - "value": "[parameters('shareName')]" + "protectedSettings": { + "items": { + "adminPassword": "[parameters('adminPassword')]", + "witnessStorageKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts',variables('witnessStorageName')),variables('apiVersionStorage')).keys[0].value]" + } } + } + } + ], + "outputs": { + "sofsName": { + "type": "string", + "value": "[parameters('sofsName')]" + }, + "shareName": { + "type": "string", + "value": "[parameters('shareName')]" } -} \ No newline at end of file + } +} diff --git a/301-storage-spaces-direct/nestedtemplates/newVM.json b/301-storage-spaces-direct/nestedtemplates/newVM.json index ebc503e46a4e..d3ab7e46b936 100644 --- a/301-storage-spaces-direct/nestedtemplates/newVM.json +++ b/301-storage-spaces-direct/nestedtemplates/newVM.json @@ -1,133 +1,140 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string" - }, - "storageAccountUri": { - "type": "string" - }, - "vmAvailabilitySetName": { - "type": "string" - }, - "vmSize": { - "type": "string" - }, - "vmDiskCount": { - "type": "int" - }, - "vmDiskSize": { - "type": "int" - }, - "adminUsername": { - "type": "string" - }, - "adminPassword": { - "type": "securestring" - }, - "imagePublisher": { - "type": "string" - }, - "imageOffer": { - "type": "string" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string" + }, + "storageAccountUri": { + "type": "string" + }, + "vmAvailabilitySetName": { + "type": "string" + }, + "vmSize": { + "type": "string" + }, + "vmDiskCount": { + "type": "int" + }, + "vmDiskSize": { + "type": "int" + }, + "adminUsername": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "imagePublisher": { + "type": "string" + }, + "imageOffer": { + "type": "string" + }, + "imageSKU": { + "type": "string" + }, + "imageVersion": { + "type": "string" + }, + "_artifactsLocation": { + "type": "string" + }, + "_artifactsLocationSasToken": { + "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "diskSelectionTemplateUri": "[concat(parameters('_artifactsLocation'),'/nestedtemplates/diskSelection.json',parameters('_artifactsLocationSasToken'))]" + }, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "name": "[concat(parameters('vmName'),'-diskSelection')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('diskSelectionTemplateUri')]" }, - "imageSKU": { - "type": "string" + "parameters": { + "vmDiskCount": { + "value": "[parameters('vmDiskCount')]" + }, + "vmDiskSize": { + "value": "[parameters('vmDiskSize')]" + }, + "diskCaching": { + "value": "None" + }, + "storageAccountUri": { + "value": "[parameters('storageAccountUri')]" + }, + "diskNamingPrefix": { + "value": "[concat(parameters('vmName'), '-data')]" + } + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "name": "[parameters('vmName')]", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/',parameters('vmName'),'-diskSelection')]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" }, - "imageVersion": { - "type": "string" + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets/', parameters('vmAvailabilitySetName'))]" }, - "_artifactsLocation": { - "type": "string" + "osProfile": { + "computerName": "[parameters('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" }, - "_artifactsLocationSasToken": { - "type": "string" - } - }, - "variables": { - "diskSelectionTemplateUri": "[concat(parameters('_artifactsLocation'),'/nestedtemplates/diskSelection.json',parameters('_artifactsLocationSasToken'))]" - }, - "resources": [ - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "name": "[concat(parameters('vmName'),'-diskSelection')]", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('diskSelectionTemplateUri')]" - }, - "parameters": { - "vmDiskCount": { - "value": "[parameters('vmDiskCount')]" - }, - "vmDiskSize": { - "value": "[parameters('vmDiskSize')]" - }, - "diskCaching": { - "value": "None" - }, - "storageAccountUri": { - "value": "[parameters('storageAccountUri')]" - }, - "diskNamingPrefix": { - "value": "[concat(parameters('vmName'), '-data')]" - } - } - } + "storageProfile": { + "imageReference": { + "publisher": "[parameters('imagePublisher')]", + "offer": "[parameters('imageOffer')]", + "sku": "[parameters('imageSku')]", + "version": "[parameters('imageVersion')]" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat(parameters('storageAccountUri'), 'vhds/',parameters('vmName'),'-osdisk.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "FromImage" + }, + "dataDisks": "[reference(concat(parameters('vmName'),'-diskSelection')).outputs.dataDiskArray.value]" }, - { - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "name": "[parameters('vmName')]", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/',parameters('vmName'),'-diskSelection')]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets/', parameters('vmAvailabilitySetName'))]" - }, - "osProfile": { - "computerName": "[parameters('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('imagePublisher')]", - "offer": "[parameters('imageOffer')]", - "sku": "[parameters('imageSku')]", - "version": "[parameters('imageVersion')]" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat(parameters('storageAccountUri'), 'vhds/',parameters('vmName'),'-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - }, - "dataDisks": "[reference(concat(parameters('vmName'),'-diskSelection')).outputs.dataDiskArray.value]" - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('vmName'),'-nic'))]" - } - ] - } + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('vmName'),'-nic'))]" } + ] } - ], - "outputs": { - "vmName": { - "type": "string", - "value": "[parameters('vmName')]" - } + } + } + ], + "outputs": { + "vmName": { + "type": "string", + "value": "[parameters('vmName')]" } -} \ No newline at end of file + } +} diff --git a/301-subnet-driven-deployment/AVSet.json b/301-subnet-driven-deployment/AVSet.json index 042086d8bd40..125930e6dbfb 100644 --- a/301-subnet-driven-deployment/AVSet.json +++ b/301-subnet-driven-deployment/AVSet.json @@ -8,19 +8,24 @@ "metadata": { "description": "AVSet name the VM will belong to" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('availabilitySetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": { } + "location": "[parameters('location')]", + "properties": {} } ], - "outputs": { - } + "outputs": {} } diff --git a/301-subnet-driven-deployment/ConfigDC.json b/301-subnet-driven-deployment/ConfigDC.json index 24dc5e665d1b..dd35257fedd2 100644 --- a/301-subnet-driven-deployment/ConfigDC.json +++ b/301-subnet-driven-deployment/ConfigDC.json @@ -46,23 +46,28 @@ "metadata": { "description": "Computer Name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "adConfigurationFunction": "[concat('CreateADC.ps1\\CreateADC_', variables('dscFiletocall'))]", - "adDataDisk": "[concat('ADDataDisk',parameters('indx'))]", - "adDataDiskSize": 1000, + "adModulesURL": "[concat(parameters('assetLocation'),'CreateADC.ps1.zip')]", "dscFiletocall": "[mod(add(parameters('indx'),2),add(parameters('indx'),1))]", "vmName": "[concat(parameters('vmNamePrefix'), parameters('computerName'), parameters('indx'))]" - }, "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/CreateDC',parameters('indx'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.Powershell", "type": "DSC", @@ -87,8 +92,6 @@ } } } - ], - "outputs": { - } + "outputs": {} } diff --git a/301-subnet-driven-deployment/LabSubnet.json b/301-subnet-driven-deployment/LabSubnet.json index 4fd6bd0051a7..7c67a0ad583a 100644 --- a/301-subnet-driven-deployment/LabSubnet.json +++ b/301-subnet-driven-deployment/LabSubnet.json @@ -45,11 +45,17 @@ "metadata": { "description": "CIDR prefix of the subnet to add" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "publicIPAddressName": "[uniqueString(resourceGroup().id, 'PublicIP')]", "lbName": "[uniqueString(resourceGroup().id, 'labLB')]", "sbn": [ @@ -66,7 +72,7 @@ "apiVersion": "2015-06-15", "name": "[variables('lbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]" ], @@ -103,7 +109,7 @@ { "name": "[parameters('vnetName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]" @@ -139,4 +145,4 @@ "value": "[variables('lbName')]" } } -} \ No newline at end of file +} diff --git a/301-subnet-driven-deployment/SetVNetDNS.json b/301-subnet-driven-deployment/SetVNetDNS.json index 52e450bb05de..3d905e080e3d 100644 --- a/301-subnet-driven-deployment/SetVNetDNS.json +++ b/301-subnet-driven-deployment/SetVNetDNS.json @@ -19,7 +19,9 @@ "metadata": { "Description": "The address ranges of the new VNET in CIDR format" }, - "defaultValue": [ "10.0.0.0/16" ] + "defaultValue": [ + "10.0.0.0/16" + ] }, "dnsServerAddresses": { "type": "array", diff --git a/301-subnet-driven-deployment/Storage.json b/301-subnet-driven-deployment/Storage.json index 2f0d8362792a..62c440cf07de 100644 --- a/301-subnet-driven-deployment/Storage.json +++ b/301-subnet-driven-deployment/Storage.json @@ -14,6 +14,13 @@ "metadata": { "description": "Storage account" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -24,7 +31,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } diff --git a/301-subnet-driven-deployment/WinServ.json b/301-subnet-driven-deployment/WinServ.json index d56c2f9bfba5..4a8807c18d86 100644 --- a/301-subnet-driven-deployment/WinServ.json +++ b/301-subnet-driven-deployment/WinServ.json @@ -196,6 +196,13 @@ "metadata": { "description": "Activate boot diagnostics. MUST be set to false is premium storage option is used" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -203,7 +210,6 @@ "frontEndIPConfigID": "[concat(variables('lbID'),'/frontendIPConfigurations/loadBalancerFrontend')]", "natRuleName": "[concat(parameters('natRulePrefix'), parameters('computerName'), parameters('indx'))]", "inboundNatName": "[concat(parameters('lbName'), '/', variables('natRuleName'))]", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('vnetName'))]", "subnetIndex": "[mod(parameters('indx'),length(parameters('subnets')))]", "subnetRef": "[parameters('subnets')[variables('subnetIndex') ].id]", "vmName": "[concat(parameters('vmNamePrefix'), parameters('computerName'), parameters('indx'))]", @@ -216,7 +222,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/loadBalancers/inboundNatRules", "name": "[variables('inboundNatName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "frontendIPConfiguration": { "id": "[variables('frontEndIPConfigID')]" @@ -231,7 +237,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/loadBalancers/', parameters('lbName'), '/inboundNatRules/', variables('natRuleName'))]" ], @@ -263,7 +269,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -314,7 +320,7 @@ { "name": "[concat(variables('vmName'),'/BgInfo')]", "type": "Microsoft.Compute/virtualMachines/extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "[variables('apiVersion')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" @@ -332,7 +338,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/MyCustomScriptExtension')]", "apiVersion": "[variables('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]", "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'),'/extensions/BgInfo')]" @@ -359,4 +365,4 @@ "value": "[reference(variables('nicName')).ipConfigurations[0].properties.privateIPAddress]" } } -} \ No newline at end of file +} diff --git a/301-subnet-driven-deployment/azuredeploy.json b/301-subnet-driven-deployment/azuredeploy.json index 58dba219109e..5e11e29e2ad7 100644 --- a/301-subnet-driven-deployment/azuredeploy.json +++ b/301-subnet-driven-deployment/azuredeploy.json @@ -45,7 +45,6 @@ }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/301-subnet-driven-deployment/" }, - "adminUsername": { "type": "string", "metadata": { @@ -68,17 +67,10 @@ "variables": { "vnetName": "[uniqueString(resourceGroup().id, 'labVNet')]", "labVNetPrefix": "172.16.0.0/12", - "apiVersion": "2015-06-15", "storageAccountSuffix": "st", "storageAccountType": "[concat(parameters('storageCategory'),'_LRS')]", "adDataDiskSize": "30", - "mbrDataDiskSize": "127", - "vmSize-Standard": "Standard_A2", - "vmSize-Premium": "Standard_DS2", - "boot-Standard": true, - "boot-Premium": false - - + "mbrDataDiskSize": "127" }, "resources": [ { @@ -92,18 +84,27 @@ "contentVersion": "1.1.0.0" }, "parameters": { - "labVNetPrefix": { "value": "[variables('labVNetPrefix')]" }, + "labVNetPrefix": { + "value": "[variables('labVNetPrefix')]" + }, "subnets": { "value": [] }, - "addedSubnetName": { "value": "sbn-Central" }, - "addedSubnetPrefix": { "value": "172.16.0.0/24" }, - "vnetName": { "value": "[variables('vnetName')]" }, - "dnsLabel": { "value": "[parameters('dnsLabelPrefix')]" } + "addedSubnetName": { + "value": "sbn-Central" + }, + "addedSubnetPrefix": { + "value": "172.16.0.0/24" + }, + "vnetName": { + "value": "[variables('vnetName')]" + }, + "dnsLabel": { + "value": "[parameters('dnsLabelPrefix')]" + } } } }, - { "apiVersion": "2015-01-01", "name": "[concat('sbn', copyIndex(1))]", @@ -119,18 +120,27 @@ "contentVersion": "1.1.0.0" }, "parameters": { - "labVNetPrefix": { "value": "[variables('labVNetPrefix')]" }, + "labVNetPrefix": { + "value": "[variables('labVNetPrefix')]" + }, "subnets": { "value": "[reference(concat('sbn', copyIndex())).outputs.vnetSubnets.value]" }, - "vnetName": { "value": "[variables('vnetName')]" }, - "dnsLabel": { "value": "[parameters('dnsLabelPrefix')]" }, - "addedSubnetName": { "value": "[concat('sbn-',copyIndex(1))]" }, - "addedSubnetPrefix": { "value": "[concat('172.16.',copyIndex(1),'.0/24')]" } + "vnetName": { + "value": "[variables('vnetName')]" + }, + "dnsLabel": { + "value": "[parameters('dnsLabelPrefix')]" + }, + "addedSubnetName": { + "value": "[concat('sbn-',copyIndex(1))]" + }, + "addedSubnetPrefix": { + "value": "[concat('172.16.',copyIndex(1),'.0/24')]" + } } } }, - { "apiVersion": "2015-01-01", "name": "LabStorage", @@ -142,8 +152,12 @@ "contentVersion": "1.1.0.0" }, "parameters": { - "storageAccountSuffix": { "value": "[variables('storageAccountSuffix')]" }, - "storageAccountType": { "value": "[variables('storageAccountType')]" } + "storageAccountSuffix": { + "value": "[variables('storageAccountSuffix')]" + }, + "storageAccountType": { + "value": "[variables('storageAccountType')]" + } } } }, @@ -158,7 +172,9 @@ "contentVersion": "1.0.0.1" }, "parameters": { - "availabilitySetName": { "value": "AVSetDC" } + "availabilitySetName": { + "value": "AVSetDC" + } } } }, @@ -178,13 +194,27 @@ "contentVersion": "1.1.0.0" }, "parameters": { - "indx": { "value": 0 }, - "vmNamePrefix": { "value": "" }, - "computerName": { "value": "dc" }, - "domainName": { "value": "[parameters('domainName')]" }, - "adminUsername": { "value": "[parameters('adminUsername')]" }, - "adminPassword": { "value": "[parameters('adminPassword')]" }, - "assetLocation": { "value": "[parameters('assetLocation')]" } + "indx": { + "value": 0 + }, + "vmNamePrefix": { + "value": "" + }, + "computerName": { + "value": "dc" + }, + "domainName": { + "value": "[parameters('domainName')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "assetLocation": { + "value": "[parameters('assetLocation')]" + } } } }, @@ -202,10 +232,22 @@ "contentVersion": "1.0.0.1" }, "parameters": { - "dnsServerAddresses": { "value": [ "[reference('dc0').outputs.vmIPAddress.value]" ] }, - "virtualNetworkName": { "value": "[variables('vnetName')]" }, - "virtualNetworkSubnets": { "value": "[reference(concat('sbn', add(parameters('numberOfSubnets'),-1))).outputs.vnetSubnets.value]" }, - "virtualNetworkAddressRanges": { "value": [ "[variables('labVNetPrefix')]" ] } + "dnsServerAddresses": { + "value": [ + "[reference('dc0').outputs.vmIPAddress.value]" + ] + }, + "virtualNetworkName": { + "value": "[variables('vnetName')]" + }, + "virtualNetworkSubnets": { + "value": "[reference(concat('sbn', add(parameters('numberOfSubnets'),-1))).outputs.vnetSubnets.value]" + }, + "virtualNetworkAddressRanges": { + "value": [ + "[variables('labVNetPrefix')]" + ] + } } } }, @@ -223,22 +265,54 @@ "contentVersion": "1.2.0.0" }, "parameters": { - "indx": { "value": 0 }, - "bootDiagnostics": { "value": "[variables(concat('boot-',parameters('storageCategory')))]" }, - "vmSize": { "value": "[variables(concat('vmSize-', parameters('storageCategory')))]" }, - "lbName": { "value": "[reference('sbn0').outputs.lbName.value]" }, - "computerName": { "value": "dc" }, - "publicIPAddressName": { "value": "[reference('sbn0').outputs.publicIPAddressName.value]" }, - "publicStartRdpPort": { "value": 5000 }, - "vnetName": { "value": "[variables('vnetName')]" }, - "subnets": { "value": "[reference('sbn0').outputs.vnetSubnets.value]" }, - "storageAccountName": { "value": "[reference('LabStorage').outputs.storageAccountName.value]" }, - "availabilitySetName": { "value": "AvSetDC" }, - "vmNamePrefix": { "value": "" }, - "nicNamePrefix": { "value": "nic" }, - "adminUsername": { "value": "[parameters('adminUsername')]" }, - "adminPassword": { "value": "[parameters('adminPassword')]" }, - "assetLocation": { "value": "[parameters('assetLocation')]" }, + "indx": { + "value": 0 + }, + "bootDiagnostics": { + "value": "[variables(concat('boot-',parameters('storageCategory')))]" + }, + "vmSize": { + "value": "[variables(concat('vmSize-', parameters('storageCategory')))]" + }, + "lbName": { + "value": "[reference('sbn0').outputs.lbName.value]" + }, + "computerName": { + "value": "dc" + }, + "publicIPAddressName": { + "value": "[reference('sbn0').outputs.publicIPAddressName.value]" + }, + "publicStartRdpPort": { + "value": 5000 + }, + "vnetName": { + "value": "[variables('vnetName')]" + }, + "subnets": { + "value": "[reference('sbn0').outputs.vnetSubnets.value]" + }, + "storageAccountName": { + "value": "[reference('LabStorage').outputs.storageAccountName.value]" + }, + "availabilitySetName": { + "value": "AvSetDC" + }, + "vmNamePrefix": { + "value": "" + }, + "nicNamePrefix": { + "value": "nic" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "assetLocation": { + "value": "[parameters('assetLocation')]" + }, "dDisks": { "value": [ { @@ -275,22 +349,54 @@ "contentVersion": "1.2.0.0" }, "parameters": { - "indx": { "value": "[copyIndex(1)]" }, - "bootDiagnostics": { "value": "[variables(concat('boot-',parameters('storageCategory')))]" }, - "vmSize": { "value": "[variables(concat('vmSize-', parameters('storageCategory')))]" }, - "lbName": { "value": "[reference('sbn0').outputs.lbName.value]" }, - "computerName": { "value": "dc" }, - "publicIPAddressName": { "value": "[reference('sbn0').outputs.publicIPAddressName.value]" }, - "publicStartRdpPort": { "value": 5000 }, - "vnetName": { "value": "[variables('vnetName')]" }, - "subnets": { "value": "[reference(concat('sbn', add(parameters('numberOfSubnets'),-1))).outputs.vnetSubnets.value]" }, - "storageAccountName": { "value": "[reference('LabStorage').outputs.storageAccountName.value]" }, - "availabilitySetName": { "value": "AvSetDC" }, - "vmNamePrefix": { "value": "" }, - "nicNamePrefix": { "value": "nic" }, - "adminUsername": { "value": "[parameters('adminUsername')]" }, - "adminPassword": { "value": "[parameters('adminPassword')]" }, - "assetLocation": { "value": "[parameters('assetLocation')]" }, + "indx": { + "value": "[copyIndex(1)]" + }, + "bootDiagnostics": { + "value": "[variables(concat('boot-',parameters('storageCategory')))]" + }, + "vmSize": { + "value": "[variables(concat('vmSize-', parameters('storageCategory')))]" + }, + "lbName": { + "value": "[reference('sbn0').outputs.lbName.value]" + }, + "computerName": { + "value": "dc" + }, + "publicIPAddressName": { + "value": "[reference('sbn0').outputs.publicIPAddressName.value]" + }, + "publicStartRdpPort": { + "value": 5000 + }, + "vnetName": { + "value": "[variables('vnetName')]" + }, + "subnets": { + "value": "[reference(concat('sbn', add(parameters('numberOfSubnets'),-1))).outputs.vnetSubnets.value]" + }, + "storageAccountName": { + "value": "[reference('LabStorage').outputs.storageAccountName.value]" + }, + "availabilitySetName": { + "value": "AvSetDC" + }, + "vmNamePrefix": { + "value": "" + }, + "nicNamePrefix": { + "value": "nic" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "assetLocation": { + "value": "[parameters('assetLocation')]" + }, "dDisks": { "value": [ { @@ -327,20 +433,48 @@ "contentVersion": "1.2.0.0" }, "parameters": { - "indx": { "value": "[copyIndex()]" }, - "bootDiagnostics": { "value": "[variables(concat('boot-',parameters('storageCategory')))]" }, - "vmSize": { "value": "[variables(concat('vmSize-', parameters('storageCategory')))]" }, - "lbName": { "value": "[reference('sbn0').outputs.lbName.value]" }, - "computerName": { "value": "srvMbmr" }, - "publicStartRdpPort": { "value": 6000 }, - "publicIPAddressName": { "value": "[reference('sbn0').outputs.publicIPAddressName.value]" }, - "vnetName": { "value": "[variables('vnetName')]" }, - "subnets": { "value": "[reference(concat('sbn', add(parameters('numberOfSubnets'),-1))).outputs.vnetSubnets.value]" }, - "storageAccountName": { "value": "[reference('LabStorage').outputs.storageAccountName.value]" }, - "availabilitySetName": { "value": "AVSetDC" }, - "adminUsername": { "value": "[parameters('adminUsername')]" }, - "adminPassword": { "value": "[parameters('adminPassword')]" }, - "assetLocation": { "value": "[parameters('assetLocation')]" }, + "indx": { + "value": "[copyIndex()]" + }, + "bootDiagnostics": { + "value": "[variables(concat('boot-',parameters('storageCategory')))]" + }, + "vmSize": { + "value": "[variables(concat('vmSize-', parameters('storageCategory')))]" + }, + "lbName": { + "value": "[reference('sbn0').outputs.lbName.value]" + }, + "computerName": { + "value": "srvMbmr" + }, + "publicStartRdpPort": { + "value": 6000 + }, + "publicIPAddressName": { + "value": "[reference('sbn0').outputs.publicIPAddressName.value]" + }, + "vnetName": { + "value": "[variables('vnetName')]" + }, + "subnets": { + "value": "[reference(concat('sbn', add(parameters('numberOfSubnets'),-1))).outputs.vnetSubnets.value]" + }, + "storageAccountName": { + "value": "[reference('LabStorage').outputs.storageAccountName.value]" + }, + "availabilitySetName": { + "value": "AVSetDC" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "assetLocation": { + "value": "[parameters('assetLocation')]" + }, "dDisks": { "value": [ { @@ -377,13 +511,27 @@ "contentVersion": "1.1.0.0" }, "parameters": { - "indx": { "value": "[copyIndex(1)]" }, - "computerName": { "value": "dc" }, - "vmNamePrefix": { "value": "" }, - "domainName": { "value": "[parameters('domainName')]" }, - "adminUsername": { "value": "[parameters('adminUsername')]" }, - "adminPassword": { "value": "[parameters('adminPassword')]" }, - "assetLocation": { "value": "[parameters('assetLocation')]" } + "indx": { + "value": "[copyIndex(1)]" + }, + "computerName": { + "value": "dc" + }, + "vmNamePrefix": { + "value": "" + }, + "domainName": { + "value": "[parameters('domainName')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "assetLocation": { + "value": "[parameters('assetLocation')]" + } } } }, @@ -406,11 +554,21 @@ "contentVersion": "1.1.0.0" }, "parameters": { - "indx": { "value": "[copyIndex()]" }, - "computerName": { "value": "srvMbmr" }, - "domainName": { "value": "[parameters('domainName')]" }, - "domainJoinUsername": { "value": "[parameters('adminUsername')]" }, - "domainJoinPassword": { "value": "[parameters('adminPassword')]" } + "indx": { + "value": "[copyIndex()]" + }, + "computerName": { + "value": "srvMbmr" + }, + "domainName": { + "value": "[parameters('domainName')]" + }, + "domainJoinUsername": { + "value": "[parameters('adminUsername')]" + }, + "domainJoinPassword": { + "value": "[parameters('adminPassword')]" + } } } } @@ -429,4 +587,4 @@ "value": "[reference(concat('sbn',add(parameters('numberOfSubnets'),-1))).outputs.vnetLength.value]" } } -} \ No newline at end of file +} diff --git a/301-subnet-driven-deployment/confDomainMember.json b/301-subnet-driven-deployment/confDomainMember.json index c59fdddc5bd6..cbf449f7cc0c 100644 --- a/301-subnet-driven-deployment/confDomainMember.json +++ b/301-subnet-driven-deployment/confDomainMember.json @@ -42,17 +42,23 @@ "metadata": { "description": "The user to join the domain" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "vmName": "[concat(parameters('vmNamePrefix'), parameters('computerName'), parameters('indx'))]", - "apiVersion": "2015-06-15" + "vmName": "[concat(parameters('vmNamePrefix'), parameters('computerName'), parameters('indx'))]" }, "resources": [ { "name": "[concat(variables('vmName'),'/extensions')]", "type": "Microsoft.Compute/virtualMachines/extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "properties": { "publisher": "Microsoft.Compute", @@ -72,4 +78,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/301-vm-sql-full-autobackup-autopatching-keyvault/azuredeploy.json b/301-vm-sql-full-autobackup-autopatching-keyvault/azuredeploy.json index 3824c4d6c314..33449968288d 100644 --- a/301-vm-sql-full-autobackup-autopatching-keyvault/azuredeploy.json +++ b/301-vm-sql-full-autobackup-autopatching-keyvault/azuredeploy.json @@ -48,11 +48,11 @@ "metadata": { "description": "SQL Server Virtual Machine Storage Account Type" }, - "allowedValues":[ - "Premium_LRS", - "Standard_LRS" - ], - "defaultValue":"Premium_LRS" + "allowedValues": [ + "Premium_LRS", + "Standard_LRS" + ], + "defaultValue": "Premium_LRS" }, "virtualNetworkName": { "type": "string", @@ -251,11 +251,11 @@ } }, "sqlAutobackupEncryptionPassword": { - "type": "string", - "metadata": { - "description": "SQL Server Auto Backup Encryption Password" - } - }, + "type": "string", + "metadata": { + "description": "SQL Server Auto Backup Encryption Password" + } + }, "sqlAkvCredentialName": { "type": "string", "metadata": { @@ -292,6 +292,13 @@ "metadata": { "description": "SQL Server Authentication Login Account Password" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -303,7 +310,7 @@ "name": "[parameters('virtualMachineName')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]", "[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]" @@ -370,7 +377,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('virtualMachineName'), '/SqlIaasExtension')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]" ], @@ -381,7 +388,7 @@ "autoUpgradeMinorVersion": true, "settings": { "AutoTelemetrySettings": { - "Region": "[resourceGroup().location]" + "Region": "[parameters('location')]" }, "AutoPatchingSettings": { "PatchCategory": "WindowsMandatoryUpdates", @@ -403,7 +410,7 @@ "protectedSettings": { "StorageUrl": "[reference(resourceId('Microsoft.Storage/storageAccounts', parameters('sqlAutobackupStorageAccountName')), '2015-06-15').primaryEndpoints['blob']]", "StorageAccessKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('sqlAutobackupStorageAccountName')), '2015-06-15').key1]", - "Password": "[parameters('sqlAutobackupEncryptionPassword')]", + "Password": "[parameters('sqlAutobackupEncryptionPassword')]", "PrivateKeyVaultCredentialSettings": { "AzureKeyVaultUrl": "[parameters('sqlAkvUrl')]", "ServicePrincipalName": "[parameters('sqlAkvPrincipalName')]", @@ -429,7 +436,7 @@ "value": "[parameters('virtualMachineName')]" }, "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" @@ -471,7 +478,7 @@ "name": "[parameters('storageAccountName')]", "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -480,7 +487,7 @@ "name": "[parameters('sqlAutobackupStorageAccountName')]", "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "['Standard_LRS']" } @@ -489,7 +496,7 @@ "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -510,7 +517,7 @@ "name": "[parameters('networkInterfaceName')]", "type": "Microsoft.Network/networkInterfaces", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]", @@ -540,7 +547,7 @@ "name": "[parameters('publicIpAddressName')]", "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIpAddressType')]" } @@ -549,7 +556,7 @@ "name": "[parameters('networkSecurityGroupName')]", "type": "Microsoft.Network/networkSecurityGroups", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -588,4 +595,4 @@ "value": "[parameters('adminUsername')]" } } -} \ No newline at end of file +} diff --git a/301-vm-sql-full-autobackup-autopatching-keyvault/nested/preparingSqlServerSa.json b/301-vm-sql-full-autobackup-autopatching-keyvault/nested/preparingSqlServerSa.json index b9fe5ba79b86..616d6289cf64 100644 --- a/301-vm-sql-full-autobackup-autopatching-keyvault/nested/preparingSqlServerSa.json +++ b/301-vm-sql-full-autobackup-autopatching-keyvault/nested/preparingSqlServerSa.json @@ -1,89 +1,86 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "sqlVMName": { - "type": "string" - }, - "location": { - "type": "string" - }, - "adminUsername": { - "type": "string" - }, - "adminPassword": { - "type": "securestring" - }, - "sqlUsername": { - "type": "string" - }, - "sqlPassword": { - "type": "securestring" - }, - "disksCount": { - "type": "int" - }, - "diskSizeInGB": { - "type": "int" - }, - "sqlEnginePort": { - "type": "int" - }, - "workloadType": { - "type": "string" - }, - "connectionType": { - "type": "string" - }, - "sqlVMPrepareModulesURL": { - "type": "string" - }, - "sqlVMPrepareConfigurationFunction": { - "type": "string" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "sqlVMName": { + "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]" }, - "resources":[ - { - "type":"Microsoft.Compute/virtualMachines/extensions", - - "name": "[concat(parameters('sqlVMName'),'/dscExtension')]", - - "apiVersion":"2015-06-15", - - "location": "[parameters('location')]", - "properties":{ - "publisher":"Microsoft.Powershell", - "type":"DSC", - "typeHandlerVersion":"2.19", - "autoUpgradeMinorVersion":false, - "settings":{ - "ModulesUrl":"[parameters('sqlVMPrepareModulesURL')]", - "ConfigurationFunction":"[parameters('sqlVMPrepareConfigurationFunction')]", - "properties": { - "SQLAdminAuthCreds": { - "userName": "[parameters('adminUsername')]", - "Password": "privateSettingsRef:AdminPassword" - }, - "SQLAuthCreds": { - "userName": "[parameters('sqlUsername')]", - "Password": "privateSettingsRef:SqlAuthPassword" - }, - "DisksCount": "[parameters('disksCount')]", - "DiskSizeInGB": "[parameters('diskSizeInGB')]", - "DatabaseEnginePort": "[parameters('sqlEnginePort')]", - "WorkloadType": "[parameters('workloadType')]", - "ConnectionType": "[parameters('connectionType')]" - } + "adminUsername": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "sqlUsername": { + "type": "string" + }, + "sqlPassword": { + "type": "securestring" + }, + "disksCount": { + "type": "int" + }, + "diskSizeInGB": { + "type": "int" + }, + "sqlEnginePort": { + "type": "int" + }, + "workloadType": { + "type": "string" + }, + "connectionType": { + "type": "string" + }, + "sqlVMPrepareModulesURL": { + "type": "string" + }, + "sqlVMPrepareConfigurationFunction": { + "type": "string" + } + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('sqlVMName'),'/dscExtension')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.19", + "autoUpgradeMinorVersion": false, + "settings": { + "ModulesUrl": "[parameters('sqlVMPrepareModulesURL')]", + "ConfigurationFunction": "[parameters('sqlVMPrepareConfigurationFunction')]", + "properties": { + "SQLAdminAuthCreds": { + "userName": "[parameters('adminUsername')]", + "Password": "privateSettingsRef:AdminPassword" }, - "protectedSettings":{ - "items":{ - "AdminPassword": "[parameters('adminPassword')]", - "SqlAuthPassword": "[parameters('sqlPassword')]" - } - } - } + "SQLAuthCreds": { + "userName": "[parameters('sqlUsername')]", + "Password": "privateSettingsRef:SqlAuthPassword" + }, + "DisksCount": "[parameters('disksCount')]", + "DiskSizeInGB": "[parameters('diskSizeInGB')]", + "DatabaseEnginePort": "[parameters('sqlEnginePort')]", + "WorkloadType": "[parameters('workloadType')]", + "ConnectionType": "[parameters('connectionType')]" + } + }, + "protectedSettings": { + "items": { + "AdminPassword": "[parameters('adminPassword')]", + "SqlAuthPassword": "[parameters('sqlPassword')]" + } + } } - ], - "outputs":{ - } -} \ No newline at end of file + } + ], + "outputs": {} +} diff --git a/301-web-app-sql-docdb-search/azuredeploy.json b/301-web-app-sql-docdb-search/azuredeploy.json index c2a44b39459c..5a5b4ce18fb7 100644 --- a/301-web-app-sql-docdb-search/azuredeploy.json +++ b/301-web-app-sql-docdb-search/azuredeploy.json @@ -199,6 +199,13 @@ "metadata": { "description": "The Azure Cosmos DB offer type" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -210,7 +217,7 @@ "apiVersion": "2015-04-08", "type": "Microsoft.DocumentDB/databaseAccounts", "name": "[parameters('databaseAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "DocumentDB" }, @@ -224,7 +231,7 @@ }, "locations": [ { - "locationName": "[resourceGroup().location]", + "locationName": "[parameters('location')]", "failoverPriority": 0 } ] @@ -233,9 +240,9 @@ { "name": "[variables('sqlServerName')]", "type": "Microsoft.Sql/servers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01-preview", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "SQL Server" }, @@ -248,7 +255,7 @@ { "name": "AllowAllWindowsAzureIps", "type": "firewallrules", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01-preview", "dependsOn": [ "[concat('Microsoft.Sql/servers/', variables('sqlServerName'))]" @@ -261,7 +268,7 @@ { "name": "[parameters('sqlDatabaseName')]", "type": "databases", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01-preview", "dependsOn": [ "[variables('sqlServerName')]" @@ -281,9 +288,9 @@ { "name": "[parameters('webAppName')]", "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-06-01", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "App Service Plan" }, @@ -297,7 +304,7 @@ { "name": "[parameters('webAppName')]", "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-08-01", "dependsOn": [ "[concat('Microsoft.Web/serverfarms/', parameters('webAppName'))]" @@ -310,16 +317,14 @@ "name": "[parameters('webAppName')]", "serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', parameters('webAppName'))]" }, - "resources": [ - - ] + "resources": [] }, { "name": "[variables('storageAccountName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "Storage Account" }, @@ -331,7 +336,7 @@ "apiVersion": "2015-02-28", "name": "[parameters('azureSearchname')]", "type": "Microsoft.Search/searchServices", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "Azure Search" }, @@ -343,21 +348,20 @@ "partitionCount": "[parameters('azureSearchpartitionCount')]" } }, - { - "name": "appinsights", - "type": "Microsoft.Insights/components", - "location": "Central US", - "apiVersion": "2014-04-01", - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('webAppName'))]" - ], - "tags": { - "displayName": "Application Insights" - }, - "properties": { - "applicationId": "[parameters('webAppName')]" - } + { + "name": "appinsights", + "type": "Microsoft.Insights/components", + "location": "Central US", + "apiVersion": "2014-04-01", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('webAppName'))]" + ], + "tags": { + "displayName": "Application Insights" + }, + "properties": { + "applicationId": "[parameters('webAppName')]" } - + } ] } diff --git a/IaaS-Story/03-Static-public-IP/azuredeploy.json b/IaaS-Story/03-Static-public-IP/azuredeploy.json index 4ca675781746..a10ee00c4d74 100644 --- a/IaaS-Story/03-Static-public-IP/azuredeploy.json +++ b/IaaS-Story/03-Static-public-IP/azuredeploy.json @@ -62,11 +62,22 @@ }, "adminUsername": { "type": "string", - "metadata": { "description": "Username for local admin account." } + "metadata": { + "description": "Username for local admin account." + } }, "adminPassword": { "type": "securestring", - "metadata": { "description": "Password for local admin account." } + "metadata": { + "description": "Password for local admin account." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -102,130 +113,130 @@ "webVMSetting": "[variables('webVMSettings')[parameters('osType')]]", "stdStorageName": "[replace(replace(tolower(concat(parameters('storageAccountNamePrefix'), uniquestring(resourceGroup().id))), '-',''),'.','')]" }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('stdStorageName')]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "Storage Account - Simple" - }, - "properties": { - "accountType": "[parameters('stdStorageType')]" - } + "resources": [ + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('stdStorageName')]", + "location": "[parameters('location')]", + "tags": { + "displayName": "Storage Account - Simple" + }, + "properties": { + "accountType": "[parameters('stdStorageType')]" + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('vnetName')]", + "location": "[parameters('location')]", + "tags": { + "displayName": "VNet" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[parameters('vnetName')]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "VNet" + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('vnetPrefix')]" + ] }, - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[parameters('vnetPrefix')]" - ] - }, - "subnets": [ - { - "name": "[parameters('frontEndSubnetName')]", - "properties": { - "addressPrefix": "[parameters('frontEndSubnetPrefix')]" - } + "subnets": [ + { + "name": "[parameters('frontEndSubnetName')]", + "properties": { + "addressPrefix": "[parameters('frontEndSubnetPrefix')]" } - ] - } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('webVMSetting').pipName]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Static" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('webVMSetting').pipName]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Static" - }, - "tags": { - "displayName": "PublicIPAddress - Web" - } + "tags": { + "displayName": "PublicIPAddress - Web" + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('webVMSetting').nicName]", + "location": "[parameters('location')]", + "tags": { + "displayName": "NetworkInterface - Web" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('webVMSetting').nicName]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "NetworkInterface - Web" - }, - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('webVMSetting').pipName)]", - "[concat('Microsoft.Network/virtualNetworks/', parameters('vnetName'))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[variables('webVMSetting').ipAddress]", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('webVMSetting').pipName)]" - }, - "subnet": { - "id": "[variables('frontEndSubnetRef')]" - } + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/', variables('webVMSetting').pipName)]", + "[concat('Microsoft.Network/virtualNetworks/', parameters('vnetName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('webVMSetting').ipAddress]", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('webVMSetting').pipName)]" + }, + "subnet": { + "id": "[variables('frontEndSubnetRef')]" } } - ] - } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('webVMSetting').vmName]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', variables('webVMSetting').nicName)]", + "[concat('Microsoft.Storage/storageAccounts/', variables('stdStorageName'))]" + ], + "tags": { + "displayName": "VM - Web" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('webVMSetting').vmName]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('webVMSetting').nicName)]", - "[concat('Microsoft.Storage/storageAccounts/', variables('stdStorageName'))]" - ], - "tags": { - "displayName": "VM - Web" + "properties": { + "hardwareProfile": { + "vmSize": "[variables('webVMSetting').vmSize]" }, - "properties": { - "hardwareProfile": { - "vmSize": "[variables('webVMSetting').vmSize]" - }, - "osProfile": { - "computerName": "[variables('webVMSetting').vmName]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" + "osProfile": { + "computerName": "[variables('webVMSetting').vmName]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[variables('webVMSetting').publisher]", + "offer": "[variables('webVMSetting').offer]", + "sku": "[variables('webVMSetting').sku]", + "version": "[variables('webVMSetting').version]" }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('webVMSetting').publisher]", - "offer": "[variables('webVMSetting').offer]", - "sku": "[variables('webVMSetting').sku]", - "version": "[variables('webVMSetting').version]" + "osDisk": { + "name": "[variables('webVMSetting').osdisk]", + "vhd": { + "uri": "[concat('http://', variables('stdStorageName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('webVMSetting').osdisk,'.vhd')]" }, - "osDisk": { - "name": "[variables('webVMSetting').osdisk]", - "vhd": { - "uri": "[concat('http://', variables('stdStorageName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('webVMSetting').osdisk,'.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('webVMSetting').nicName)]" - } - ] + "caching": "ReadWrite", + "createOption": "FromImage" } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('webVMSetting').nicName)]" + } + ] } } - ] - } + } + ] +} diff --git a/IaaS-Story/11-MultiNIC/azuredeploy.json b/IaaS-Story/11-MultiNIC/azuredeploy.json index 0f88fb09705a..da6892ba7035 100644 --- a/IaaS-Story/11-MultiNIC/azuredeploy.json +++ b/IaaS-Story/11-MultiNIC/azuredeploy.json @@ -64,11 +64,15 @@ }, "adminUsername": { "type": "string", - "metadata": { "description": "Username for local admin account." } + "metadata": { + "description": "Username for local admin account." + } }, "adminPassword": { "type": "securestring", - "metadata": { "description": "Password for local admin account." } + "metadata": { + "description": "Password for local admin account." + } }, "dbCount": { "type": "int", @@ -83,6 +87,13 @@ "metadata": { "description": "Name of resource group containing vnet and front end resources." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -125,164 +136,168 @@ "backEndSubnetRef": "[concat(variables('vnetID'),'/subnets/',parameters('backEndSubnetName'))]", "dbVMSetting": "[variables('dbVMSettings')[parameters('osType')]]" }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('prmStorageName')]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "Storage Account - Premium" - }, - "properties": { - "accountType": "[parameters('prmStorageType')]" - } + "resources": [ + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('prmStorageName')]", + "location": "[parameters('location')]", + "tags": { + "displayName": "Storage Account - Premium" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('dbVMSetting').nicName,'-DA-', copyindex(1))]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "NetworkInterfaces - DB DA" - }, - "copy": { - "name": "dbniccount", - "count": "[parameters('dbCount')]" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(variables('dbVMSetting').ipAddress,copyindex(4))]", - "subnet": { - "id": "[variables('backEndSubnetRef')]" - } + "properties": { + "accountType": "[parameters('prmStorageType')]" + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('dbVMSetting').nicName,'-DA-', copyindex(1))]", + "location": "[parameters('location')]", + "tags": { + "displayName": "NetworkInterfaces - DB DA" + }, + "copy": { + "name": "dbniccount", + "count": "[parameters('dbCount')]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[concat(variables('dbVMSetting').ipAddress,copyindex(4))]", + "subnet": { + "id": "[variables('backEndSubnetRef')]" } } - ] - } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('dbVMSetting').nicName, '-RA-',copyindex(1))]", + "location": "[parameters('location')]", + "tags": { + "displayName": "NetworkInterfaces - DB RA" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('dbVMSetting').nicName, '-RA-',copyindex(1))]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "NetworkInterfaces - DB RA" - }, - "copy": { - "name": "dbniccount", - "count": "[parameters('dbCount')]" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('remoteAccessNSGName'))]" - }, - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(variables('dbVMSetting').ipAddress,copyindex(54))]", - "subnet": { - "id": "[variables('backEndSubnetRef')]" - } + "copy": { + "name": "dbniccount", + "count": "[parameters('dbCount')]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('remoteAccessNSGName'))]" + }, + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[concat(variables('dbVMSetting').ipAddress,copyindex(54))]", + "subnet": { + "id": "[variables('backEndSubnetRef')]" } } - ] - } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/availabilitySets", + "name": "[variables('dbVMSetting').avsetName]", + "location": "[parameters('location')]", + "tags": { + "displayName": "AvailabilitySet - DB" + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[concat(variables('dbVMSetting').vmName,copyindex(1))]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', variables('dbVMSetting').nicName,'-DA-', copyindex(1))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('dbVMSetting').nicName,'-RA-', copyindex(1))]", + "[concat('Microsoft.Compute/availabilitySets/', variables('dbVMSetting').avsetName)]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('prmStorageName'))]" + ], + "tags": { + "displayName": "VMs - DB" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('dbVMSetting').avsetName]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "AvailabilitySet - DB" - } + "copy": { + "name": "dbvmcount", + "count": "[parameters('dbCount')]" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('dbVMSetting').vmName,copyindex(1))]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('dbVMSetting').nicName,'-DA-', copyindex(1))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('dbVMSetting').nicName,'-RA-', copyindex(1))]", - "[concat('Microsoft.Compute/availabilitySets/', variables('dbVMSetting').avsetName)]", - "[concat('Microsoft.Storage/storageAccounts/', parameters('prmStorageName'))]" - ], - "tags": { - "displayName": "VMs - DB" + "properties": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('dbVMSetting').avsetName)]" }, - "copy": { - "name": "dbvmcount", - "count": "[parameters('dbCount')]" + "hardwareProfile": { + "vmSize": "[variables('dbVMSetting').vmSize]" }, - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('dbVMSetting').avsetName)]" - }, - "hardwareProfile": { - "vmSize": "[variables('dbVMSetting').vmSize]" - }, - "osProfile": { - "computerName": "[concat(variables('dbVMSetting').vmName,copyindex(1))]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" + "osProfile": { + "computerName": "[concat(variables('dbVMSetting').vmName,copyindex(1))]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[variables('dbVMSetting').publisher]", + "offer": "[variables('dbVMSetting').offer]", + "sku": "[variables('dbVMSetting').sku]", + "version": "[variables('dbVMSetting').version]" }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('dbVMSetting').publisher]", - "offer": "[variables('dbVMSetting').offer]", - "sku": "[variables('dbVMSetting').sku]", - "version": "[variables('dbVMSetting').version]" + "osDisk": { + "name": "[concat(variables('dbVMSetting').osdisk,copyindex(1))]", + "vhd": { + "uri": "[concat('http://', parameters('stdStorageName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('dbVMSetting').osdisk, copyindex(1),'.vhd')]" }, - "osDisk": { - "name": "[concat(variables('dbVMSetting').osdisk,copyindex(1))]", + "caching": "ReadWrite", + "createOption": "FromImage" + }, + "dataDisks": [ + { "vhd": { - "uri": "[concat('http://', parameters('stdStorageName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('dbVMSetting').osdisk, copyindex(1),'.vhd')]" + "uri": "[concat('http://', parameters('prmStorageName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('dbVMSetting').datadisk, copyindex(1),'-1','.vhd')]" }, - "caching": "ReadWrite", - "createOption": "FromImage" + "name": "[concat(variables('dbVMSetting').datadisk,copyindex(1),'-data-disk1')]", + "diskSizeGB": 127, + "createOption": "Empty", + "lun": 0 }, - "dataDisks": [ - { - "vhd": { - "uri": "[concat('http://', parameters('prmStorageName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('dbVMSetting').datadisk, copyindex(1),'-1','.vhd')]" - }, - "name": "[concat(variables('dbVMSetting').datadisk,copyindex(1),'-data-disk1')]", - "diskSizeGB": 127, - "createOption": "Empty", - "lun": 0 + { + "vhd": { + "uri": "[concat('http://', parameters('prmStorageName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('dbVMSetting').datadisk, copyindex(1),'-2','.vhd')]" }, - { - "vhd": { - "uri": "[concat('http://', parameters('prmStorageName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('dbVMSetting').datadisk, copyindex(1),'-2','.vhd')]" - }, - "name": "[concat(variables('dbVMSetting').datadisk,copyindex(1),'-data-disk2')]", - "diskSizeGB": 127, - "createOption": "Empty", - "lun": 1 + "name": "[concat(variables('dbVMSetting').datadisk,copyindex(1),'-data-disk2')]", + "diskSizeGB": 127, + "createOption": "Empty", + "lun": 1 + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('dbVMSetting').nicName,'-DA-',copyindex(1)))]", + "properties": { + "primary": true } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('dbVMSetting').nicName,'-DA-',copyindex(1)))]", - "properties": { "primary": true } - }, - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('dbVMSetting').nicName,'-RA-',copyindex(1)))]", - "properties": { "primary": false } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('dbVMSetting').nicName,'-RA-',copyindex(1)))]", + "properties": { + "primary": false } - ] - } + } + ] } } - ] - } + } + ] +} diff --git a/IaaS-Story/11-MultiNIC/prerequisites.json b/IaaS-Story/11-MultiNIC/prerequisites.json index ea5fe3e1fa0b..41641176b7a1 100644 --- a/IaaS-Story/11-MultiNIC/prerequisites.json +++ b/IaaS-Story/11-MultiNIC/prerequisites.json @@ -96,11 +96,15 @@ }, "adminUsername": { "type": "string", - "metadata": { "description": "Username for local admin account." } + "metadata": { + "description": "Username for local admin account." + } }, "adminPassword": { "type": "securestring", - "metadata": { "description": "Password for local admin account." } + "metadata": { + "description": "Password for local admin account." + } }, "webCount": { "type": "int", @@ -129,6 +133,13 @@ "metadata": { "description": "Name for load balancer PIP." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -184,370 +195,373 @@ "lbProbeID": "[concat(variables('lbID'),'/probes/tcpProbe')]", "dbDeploymentUri": "" }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('stdStorageName')]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "Storage Account - Simple" - }, - "properties": { - "accountType": "[parameters('stdStorageType')]" - } + "resources": [ + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('stdStorageName')]", + "location": "[parameters('location')]", + "tags": { + "displayName": "Storage Account - Simple" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[parameters('remoteAccessNSGName')]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "NSG - Remote access" - }, - "properties": { - "securityRules": [ - { - "name": "allow-remote-access", - "properties": { - "description": "Allow remote access", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "[variables('dbVMSetting').remotePort]", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 200, - "direction": "Inbound" - } + "properties": { + "accountType": "[parameters('stdStorageType')]" + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[parameters('remoteAccessNSGName')]", + "location": "[parameters('location')]", + "tags": { + "displayName": "NSG - Remote access" + }, + "properties": { + "securityRules": [ + { + "name": "allow-remote-access", + "properties": { + "description": "Allow remote access", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "[variables('dbVMSetting').remotePort]", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 200, + "direction": "Inbound" } - ] - } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[parameters('backEndNSGName')]", + "location": "[parameters('location')]", + "tags": { + "displayName": "NSG - Back End" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[parameters('backEndNSGName')]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "NSG - Back End" - }, - "properties": { - "securityRules": [ - { - "name": "allow-frontend", - "properties": { - "description": "Allow FE Subnet", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "[variables('dbVMSetting').dbPort]", - "sourceAddressPrefix": "[parameters('frontEndSubnetPrefix')]", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 100, - "direction": "Inbound" - } - }, - { - "name": "block-internet", - "properties": { - "description": "Block Internet", - "protocol": "*", - "sourcePortRange": "*", - "destinationPortRange": "*", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "Internet", - "access": "Deny", - "priority": 100, - "direction": "Outbound" - } + "properties": { + "securityRules": [ + { + "name": "allow-frontend", + "properties": { + "description": "Allow FE Subnet", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "[variables('dbVMSetting').dbPort]", + "sourceAddressPrefix": "[parameters('frontEndSubnetPrefix')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" } - - ] - } + }, + { + "name": "block-internet", + "properties": { + "description": "Block Internet", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "Internet", + "access": "Deny", + "priority": 100, + "direction": "Outbound" + } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[parameters('frontEndNSGName')]", + "location": "[parameters('location')]", + "tags": { + "displayName": "NSG - Front End" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[parameters('frontEndNSGName')]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "NSG - Front End" - }, - "properties": { - "securityRules": [ - { - "name": "allow-http", - "properties": { - "description": "Allow HTTP", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "80", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 101, - "direction": "Inbound" - } - }, - { - "name": "allow-https", - "properties": { - "description": "Allow HTTPS", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "443", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 102, - "direction": "Inbound" - } + "properties": { + "securityRules": [ + { + "name": "allow-http", + "properties": { + "description": "Allow HTTP", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "80", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 101, + "direction": "Inbound" } - ] - } + }, + { + "name": "allow-https", + "properties": { + "description": "Allow HTTPS", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 102, + "direction": "Inbound" + } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('vnetName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', parameters('frontEndNSGName'))]", + "[concat('Microsoft.Network/networkSecurityGroups/', parameters('backEndNSGName'))]" + ], + "tags": { + "displayName": "VNet" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[parameters('vnetName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/networkSecurityGroups/', parameters('frontEndNSGName'))]", - "[concat('Microsoft.Network/networkSecurityGroups/', parameters('backEndNSGName'))]" - ], - "tags": { - "displayName": "VNet" + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('vnetPrefix')]" + ] }, - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[parameters('vnetPrefix')]" - ] - }, - "subnets": [ - { - "name": "[parameters('frontEndSubnetName')]", - "properties": { - "addressPrefix": "[parameters('frontEndSubnetPrefix')]", - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('frontEndNSGName'))]" - } + "subnets": [ + { + "name": "[parameters('frontEndSubnetName')]", + "properties": { + "addressPrefix": "[parameters('frontEndSubnetPrefix')]", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('frontEndNSGName'))]" } - }, - { - "name": "[parameters('backEndSubnetName')]", - "properties": { - "addressPrefix": "[parameters('backEndSubnetPrefix')]", - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('backEndNSGName'))]" - } + } + }, + { + "name": "[parameters('backEndSubnetName')]", + "properties": { + "addressPrefix": "[parameters('backEndSubnetPrefix')]", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('backEndNSGName'))]" } } - ] - } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[parameters('lbPIPName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Dynamic" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[parameters('lbPIPName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic" - }, - "tags": { - "displayName": "PublicIPAddress - LB" - } + "tags": { + "displayName": "PublicIPAddress - LB" + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('webVMSetting').nicName, copyindex(1))]", + "location": "[parameters('location')]", + "tags": { + "displayName": "NetworkInterfaces - Web" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('webVMSetting').nicName, copyindex(1))]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "NetworkInterfaces - Web" - }, - "copy": { - "name": "webniccount", - "count": "[parameters('webCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', parameters('vnetName'))]", - "[concat('Microsoft.Network/loadBalancers/', parameters('lbName'))]", - "[concat('Microsoft.Network/loadBalancers/',parameters('lbName'),'/inboundNatRules/', 'RDP-', variables('webVMSetting').vmName, copyIndex(1))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('remoteAccessNSGName'))]" - }, - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(variables('webVMSetting').ipAddress,copyindex(4))]", - "subnet": { - "id": "[variables('frontEndSubnetRef')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('lbID'), '/backendAddressPools/LoadBalancerBackend')]" - } - ], - "loadBalancerInboundNatRules": [ - { - "id": "[resourceId('Microsoft.Network/loadBalancers/inboundNatRules', parameters('lbName'),concat('RDP-', variables('webVMSetting').vmName, copyIndex(1)))]" - } - ] - } + "copy": { + "name": "webniccount", + "count": "[parameters('webCount')]" + }, + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', parameters('vnetName'))]", + "[concat('Microsoft.Network/loadBalancers/', parameters('lbName'))]", + "[concat('Microsoft.Network/loadBalancers/',parameters('lbName'),'/inboundNatRules/', 'RDP-', variables('webVMSetting').vmName, copyIndex(1))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('remoteAccessNSGName'))]" + }, + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[concat(variables('webVMSetting').ipAddress,copyindex(4))]", + "subnet": { + "id": "[variables('frontEndSubnetRef')]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[concat(variables('lbID'), '/backendAddressPools/LoadBalancerBackend')]" + } + ], + "loadBalancerInboundNatRules": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/inboundNatRules', parameters('lbName'),concat('RDP-', variables('webVMSetting').vmName, copyIndex(1)))]" + } + ] } - ] - } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/availabilitySets", + "name": "[variables('webVMSetting').avsetName]", + "location": "[parameters('location')]", + "tags": { + "displayName": "AvailabilitySet - Web" + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[concat(variables('webVMSetting').vmName,copyindex(1))]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', variables('webVMSetting').nicName, copyindex(1))]", + "[concat('Microsoft.Compute/availabilitySets/', variables('webVMSetting').avsetName)]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('stdStorageName'))]" + ], + "tags": { + "displayName": "VMs - Web" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('webVMSetting').avsetName]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "AvailabilitySet - Web" - } + "copy": { + "name": "webvmcount", + "count": "[parameters('webCount')]" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('webVMSetting').vmName,copyindex(1))]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('webVMSetting').nicName, copyindex(1))]", - "[concat('Microsoft.Compute/availabilitySets/', variables('webVMSetting').avsetName)]", - "[concat('Microsoft.Storage/storageAccounts/', parameters('stdStorageName'))]" - ], - "tags": { - "displayName": "VMs - Web" + "properties": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('webVMSetting').avsetName)]" }, - "copy": { - "name": "webvmcount", - "count": "[parameters('webCount')]" + "hardwareProfile": { + "vmSize": "[variables('webVMSetting').vmSize]" }, - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('webVMSetting').avsetName)]" - }, - "hardwareProfile": { - "vmSize": "[variables('webVMSetting').vmSize]" - }, - "osProfile": { - "computerName": "[concat(variables('webVMSetting').vmName,copyindex(1))]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" + "osProfile": { + "computerName": "[concat(variables('webVMSetting').vmName,copyindex(1))]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[variables('webVMSetting').publisher]", + "offer": "[variables('webVMSetting').offer]", + "sku": "[variables('webVMSetting').sku]", + "version": "[variables('webVMSetting').version]" }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('webVMSetting').publisher]", - "offer": "[variables('webVMSetting').offer]", - "sku": "[variables('webVMSetting').sku]", - "version": "[variables('webVMSetting').version]" + "osDisk": { + "name": "[concat(variables('webVMSetting').osdisk,copyindex(1))]", + "vhd": { + "uri": "[concat('http://', parameters('stdStorageName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('webVMSetting').osdisk, copyindex(1),'.vhd')]" }, - "osDisk": { - "name": "[concat(variables('webVMSetting').osdisk,copyindex(1))]", - "vhd": { - "uri": "[concat('http://', parameters('stdStorageName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('webVMSetting').osdisk, copyindex(1),'.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('webVMSetting').nicName,copyindex(1)))]" - } - ] + "caching": "ReadWrite", + "createOption": "FromImage" } - } - }, - { - "apiVersion": "2015-05-01-preview", - "type": "Microsoft.Network/loadBalancers", - "name": "[parameters('lbName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', parameters('lbPIPName'))]" - ], - "tags": { - "displayName": "LB - Public" }, - "properties": { - "frontendIPConfigurations": [ + "networkProfile": { + "networkInterfaces": [ { - "name": "LoadBalancerFrontend", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('lbPIPName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "loadBalancerBackend" + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('webVMSetting').nicName,copyindex(1)))]" } - ], - "loadBalancingRules": [ - { - "name": "LBRule-80", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('frontEndIPConfigID')]" - }, - "backendAddressPool": { "id": "[variables('lbPoolID')]" }, - "protocol": "Tcp", - "frontendPort": 80, - "backendPort": 80, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "probe": { "id": "[variables('lbProbeID')]" } + ] + } + } + }, + { + "apiVersion": "2015-05-01-preview", + "type": "Microsoft.Network/loadBalancers", + "name": "[parameters('lbName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/', parameters('lbPIPName'))]" + ], + "tags": { + "displayName": "LB - Public" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontend", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('lbPIPName'))]" } } - ], - "probes": [ - { - "name": "tcpProbe", - "properties": { - "protocol": "Tcp", - "port": 80, - "intervalInSeconds": 5, - "numberOfProbes": "[parameters('webCount')]" + } + ], + "backendAddressPools": [ + { + "name": "loadBalancerBackend" + } + ], + "loadBalancingRules": [ + { + "name": "LBRule-80", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('frontEndIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('lbPoolID')]" + }, + "protocol": "Tcp", + "frontendPort": 80, + "backendPort": 80, + "enableFloatingIP": false, + "idleTimeoutInMinutes": 5, + "probe": { + "id": "[variables('lbProbeID')]" } } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/loadBalancers/inboundNatRules", - "name": "[concat(parameters('lbName'), '/RDP-', variables('webVMSetting').vmName, copyIndex(1))]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/loadBalancers/', parameters('lbName'))]" + } ], - "tags": { - "displayName": "LB - NAT Rules" - }, - "copy": { - "name": "lbLoopNode", - "count": "[parameters('webCount')]" + "probes": [ + { + "name": "tcpProbe", + "properties": { + "protocol": "Tcp", + "port": 80, + "intervalInSeconds": 5, + "numberOfProbes": "[parameters('webCount')]" + } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/loadBalancers/inboundNatRules", + "name": "[concat(parameters('lbName'), '/RDP-', variables('webVMSetting').vmName, copyIndex(1))]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/loadBalancers/', parameters('lbName'))]" + ], + "tags": { + "displayName": "LB - NAT Rules" + }, + "copy": { + "name": "lbLoopNode", + "count": "[parameters('webCount')]" + }, + "properties": { + "frontendIPConfiguration": { + "id": "[variables('frontEndIPConfigID')]" }, - "properties": { - "frontendIPConfiguration": { - "id": "[variables('frontEndIPConfigID')]" - }, - "protocol": "tcp", - "frontendPort": "[add(50000,copyIndex(1))]", - "backendPort": "[variables('webVMSetting').remotePort]", - "enableFloatingIP": false - } + "protocol": "tcp", + "frontendPort": "[add(50000,copyIndex(1))]", + "backendPort": "[variables('webVMSetting').remotePort]", + "enableFloatingIP": false } - ] - } \ No newline at end of file + } + ] +} diff --git a/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/configureADBDC.json b/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/configureADBDC.json index 2e4c80ac0f1c..f063a738a0be 100644 --- a/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/configureADBDC.json +++ b/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/configureADBDC.json @@ -6,7 +6,8 @@ "type": "string" }, "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "adminUsername": { "type": "string" @@ -42,26 +43,26 @@ "typeHandlerVersion": "2.24", "autoUpgradeMinorVersion": true, "settings": { - "configuration": { - "url": "[parameters('adBDCConfigurationModulesURL')]", - "script": "[parameters('adBDCConfigurationScript')]", - "function": "[parameters('adBDCConfigurationFunction')]" - }, - "configurationArguments": { - "domainName": "[parameters('domainName')]" - } + "configuration": { + "url": "[parameters('adBDCConfigurationModulesURL')]", + "script": "[parameters('adBDCConfigurationScript')]", + "function": "[parameters('adBDCConfigurationFunction')]" + }, + "configurationArguments": { + "domainName": "[parameters('domainName')]" + } }, "protectedSettings": { - "configurationUrlSasToken": "[parameters('_artifactsLocationSasToken')]", - "configurationArguments": { - "adminCreds": { - "userName": "[parameters('adminUserName')]", - "password": "[parameters('adminPassword')]" - } + "configurationUrlSasToken": "[parameters('_artifactsLocationSasToken')]", + "configurationArguments": { + "adminCreds": { + "userName": "[parameters('adminUserName')]", + "password": "[parameters('adminPassword')]" } + } } } } ], "outputs": {} -} \ No newline at end of file +} diff --git a/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/nic.json b/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/nic.json index bc5998e8c199..7e7d02d37cec 100644 --- a/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/nic.json +++ b/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/nic.json @@ -19,13 +19,20 @@ "metadata": { "Description": "The DNS Servers of the NIC" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "name": "[parameters('nicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-10-01", "properties": { "ipConfigurations": "[parameters('ipConfigurations')]", diff --git a/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/vnet-with-dns-server.json b/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/vnet-with-dns-server.json index 8dd6c9ac8c83..712b9efa8d9c 100644 --- a/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/vnet-with-dns-server.json +++ b/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/vnet-with-dns-server.json @@ -33,13 +33,20 @@ "metadata": { "Description": "The DNS address(es) of the DNS Server(s) used by the VNET" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-10-01", "properties": { "addressSpace": { diff --git a/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/vnet.json b/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/vnet.json index 5fe690763059..560970be1503 100644 --- a/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/vnet.json +++ b/active-directory-new-domain-ha-2-dc-zones/nestedtemplates/vnet.json @@ -27,13 +27,20 @@ "Description": "The address range of the subnet created in the new VNET" }, "defaultValue": "10.0.0.0/24" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-10-01", "properties": { "addressSpace": { diff --git a/active-directory-new-domain-ha-2-dc/azuredeploy.json b/active-directory-new-domain-ha-2-dc/azuredeploy.json index 805fd6ec1c6a..05315764d6ac 100644 --- a/active-directory-new-domain-ha-2-dc/azuredeploy.json +++ b/active-directory-new-domain-ha-2-dc/azuredeploy.json @@ -54,6 +54,13 @@ "description": "Auto-generated token to access _artifactsLocation" }, "defaultValue": "" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -105,17 +112,18 @@ "name": "[variables('vhdStorageAccountName')]", "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2016-05-01", - "location": "[resourceGroup().location]", - "properties": { + "location": "[parameters('location')]", + "properties": {}, + "sku": { + "name": "[variables('storageAccountType')]" }, - "sku":{"name":"[variables('storageAccountType')]"}, - "kind":"Storage" + "kind": "Storage" }, { "name": "[variables('publicIPAddressName')]", "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2016-10-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -127,7 +135,7 @@ "name": "[variables('adAvailabilitySetName')]", "type": "Microsoft.Compute/availabilitySets", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, { "name": "VNet", @@ -159,7 +167,7 @@ "name": "[variables('adLBName')]", "type": "Microsoft.Network/loadBalancers", "apiVersion": "2016-10-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" ], @@ -211,7 +219,7 @@ "name": "[variables('adPDCNicName')]", "type": "Microsoft.Network/networkInterfaces", "apiVersion": "2016-10-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Resources/deployments/VNet", "[variables('adLBName')]" @@ -245,7 +253,7 @@ "name": "[variables('adBDCNicName')]", "type": "Microsoft.Network/networkInterfaces", "apiVersion": "2016-10-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Resources/deployments/VNet", "[concat('Microsoft.Network/loadBalancers/',variables('adLBName'))]" @@ -279,7 +287,7 @@ "name": "[variables('adPDCVMName')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts',variables('vhdStorageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces',variables('adPDCNicName'))]", @@ -339,7 +347,7 @@ "name": "CreateADForest", "type": "extensions", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('adPDCVMName'))]" ], @@ -456,7 +464,7 @@ "name": "[variables('adBDCVMName')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts',variables('vhdStorageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces',variables('adBDCNicName'))]", @@ -516,7 +524,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('adBDCVMName'),'/PrepareBDC')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('adBDCVMName'))]" ], @@ -553,7 +561,7 @@ "value": "[variables('adBDCVMName')]" }, "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" @@ -609,4 +617,4 @@ } } ] -} \ No newline at end of file +} diff --git a/active-directory-new-domain-ha-2-dc/nestedtemplates/configureADBDC.json b/active-directory-new-domain-ha-2-dc/nestedtemplates/configureADBDC.json index fc2082ec60b3..4c9ad7b5c938 100644 --- a/active-directory-new-domain-ha-2-dc/nestedtemplates/configureADBDC.json +++ b/active-directory-new-domain-ha-2-dc/nestedtemplates/configureADBDC.json @@ -6,7 +6,8 @@ "type": "string" }, "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "adminUsername": { "type": "string" @@ -56,4 +57,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/active-directory-new-domain-ha-2-dc/nestedtemplates/nic.json b/active-directory-new-domain-ha-2-dc/nestedtemplates/nic.json index bc5998e8c199..7e7d02d37cec 100644 --- a/active-directory-new-domain-ha-2-dc/nestedtemplates/nic.json +++ b/active-directory-new-domain-ha-2-dc/nestedtemplates/nic.json @@ -19,13 +19,20 @@ "metadata": { "Description": "The DNS Servers of the NIC" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "name": "[parameters('nicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-10-01", "properties": { "ipConfigurations": "[parameters('ipConfigurations')]", diff --git a/active-directory-new-domain-ha-2-dc/nestedtemplates/vnet-with-dns-server.json b/active-directory-new-domain-ha-2-dc/nestedtemplates/vnet-with-dns-server.json index 8dd6c9ac8c83..712b9efa8d9c 100644 --- a/active-directory-new-domain-ha-2-dc/nestedtemplates/vnet-with-dns-server.json +++ b/active-directory-new-domain-ha-2-dc/nestedtemplates/vnet-with-dns-server.json @@ -33,13 +33,20 @@ "metadata": { "Description": "The DNS address(es) of the DNS Server(s) used by the VNET" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-10-01", "properties": { "addressSpace": { diff --git a/active-directory-new-domain-ha-2-dc/nestedtemplates/vnet.json b/active-directory-new-domain-ha-2-dc/nestedtemplates/vnet.json index 5fe690763059..560970be1503 100644 --- a/active-directory-new-domain-ha-2-dc/nestedtemplates/vnet.json +++ b/active-directory-new-domain-ha-2-dc/nestedtemplates/vnet.json @@ -27,13 +27,20 @@ "Description": "The address range of the subnet created in the new VNET" }, "defaultValue": "10.0.0.0/24" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-10-01", "properties": { "addressSpace": { diff --git a/active-directory-new-domain/azuredeploy.json b/active-directory-new-domain/azuredeploy.json index c47d45acb452..cbb5aab89996 100644 --- a/active-directory-new-domain/azuredeploy.json +++ b/active-directory-new-domain/azuredeploy.json @@ -39,6 +39,13 @@ "description": "Auto-generated token to access _artifactsLocation" }, "defaultValue": "" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -62,7 +69,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, @@ -73,7 +80,7 @@ "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -85,7 +92,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('adAvailabilitySetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { @@ -118,7 +125,7 @@ "type": "Microsoft.Network/loadBalancers", "name": "[variables('adLBName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" ], @@ -158,7 +165,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[variables('adNicName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Resources/deployments/VNet", "[resourceId('Microsoft.Network/loadBalancers', variables('adLBName'))]" @@ -192,7 +199,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[variables('adVMName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces', variables('adNicName'))]", @@ -252,7 +259,7 @@ "type": "extensions", "name": "CreateADForest", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('adVMName'))]" ], @@ -316,4 +323,4 @@ } } ] -} \ No newline at end of file +} diff --git a/active-directory-new-domain/nestedtemplates/vnet-with-dns-server.json b/active-directory-new-domain/nestedtemplates/vnet-with-dns-server.json index 6be845c6526e..30152711ecf5 100644 --- a/active-directory-new-domain/nestedtemplates/vnet-with-dns-server.json +++ b/active-directory-new-domain/nestedtemplates/vnet-with-dns-server.json @@ -33,6 +33,13 @@ "metadata": { "description": "The DNS address(es) of the DNS Server(s) used by the VNET" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -40,7 +47,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -61,4 +68,4 @@ } } ] -} \ No newline at end of file +} diff --git a/active-directory-new-domain/nestedtemplates/vnet.json b/active-directory-new-domain/nestedtemplates/vnet.json index debce7e1d266..e75c8f1afb0f 100644 --- a/active-directory-new-domain/nestedtemplates/vnet.json +++ b/active-directory-new-domain/nestedtemplates/vnet.json @@ -27,6 +27,13 @@ "description": "The address range of the subnet created in the new VNET" }, "defaultValue": "10.0.0.0/24" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -34,7 +41,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -52,4 +59,4 @@ } } ] -} \ No newline at end of file +} diff --git a/ansible-advancedlinux/azuredeploy.json b/ansible-advancedlinux/azuredeploy.json index 2f34b4f74a32..7545d833e372 100644 --- a/ansible-advancedlinux/azuredeploy.json +++ b/ansible-advancedlinux/azuredeploy.json @@ -123,11 +123,17 @@ "metadata": { "description": "Public facing IP Type." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "scriptsBaseUrl": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/ansible-advancedlinux/", - "apiVersion": "2015-06-15", "vmStorageAccountContainerName": "vhds", "createRAID": "true", "availabilitySetName": "ANS01", @@ -192,7 +198,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -219,7 +225,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('vnetRef')]" ], @@ -234,7 +240,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/loadBalancers", "name": "[variables('loadBalancerName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('publicIPRef')]" ], @@ -274,7 +280,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "PlatformFaultDomainCount": "[variables('faultDomainCount')]", "PlatformUpdateDomainCount": "[variables('updateDomainCount')]" @@ -284,7 +290,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -293,7 +299,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('vmNICNamePattern'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "NICSLoop", "count": "[parameters('numberOfVMS')]" @@ -326,7 +332,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmNamePattern'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "ServerRole": "[parameters('serversRole')]", "ServerEnvironment": "[parameters('serversPurpose')]" @@ -423,7 +429,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmNamePattern'),copyIndex(),'/configuressh')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "VMExtensionsLoop", "count": "[parameters('numberOfVms')]" @@ -450,7 +456,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "AnsibleController", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('vnetRef')]", "[variables('loadBalancerRef')]" @@ -479,7 +485,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "AnsibleController", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "ServerRole": "AnsibleController", "ServerEnvironment": "[parameters('serversPurpose')]" @@ -543,7 +549,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "AnsibleController/installAnsible", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "VMExtensionsLoop" ], @@ -570,4 +576,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/ansible-tower-rhel/azuredeploy.json b/ansible-tower-rhel/azuredeploy.json index 8f6a9037f335..4aabaf87b37a 100644 --- a/ansible-tower-rhel/azuredeploy.json +++ b/ansible-tower-rhel/azuredeploy.json @@ -1,443 +1,454 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmAnsibleTowerUsername": { - "type": "string", - "metadata": { - "description": "Username for virtual machine that will have ansible tower installed" - } - }, - "sshKeyData": { - "type": "string", - "metadata": { - "description": "Enter ssh rsa public key file string data." - } - }, - "ansibleTowerAdminPassword": { - "type": "securestring", - "minLength": 5, - "metadata": { - "description": "Password for ansible tower console admin(min length:5)" - } - }, - "ansibleTowerDatabasePassword": { - "type": "securestring", - "minLength": 5, - "metadata": { - "description": "Password for ansible tower database(min length:5)" - } - }, - "vmClientUsername": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "Username for client vm's" - } - }, - "vmClientPassword": { - "type": "securestring", - "minLength": 12, - "metadata": { - "description": "Password for client vm's" - } - }, - "remoteAllowedCIDR": { - "type": "string", - "minLength": 7, - "defaultValue": "0.0.0.0/0", - "metadata": { - "description": "Enter Public IP CIDR to allow for accessing the deployment.Enter in 0.0.0.0/0 format. You can always modify these later in NSG Settings" - } - }, - "_artifactsLocation": { - "type": "string", - "defaultValue": "https://gallery.azure.com/artifact/20151001/redhat.ansible-toweransible-tower.1.0.6/Artifacts", - "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.Leave blank if unsure" - }, - "defaultValue": "" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmAnsibleTowerUsername": { + "type": "string", + "metadata": { + "description": "Username for virtual machine that will have ansible tower installed" + } + }, + "sshKeyData": { + "type": "string", + "metadata": { + "description": "Enter ssh rsa public key file string data." + } + }, + "ansibleTowerAdminPassword": { + "type": "securestring", + "minLength": 5, + "metadata": { + "description": "Password for ansible tower console admin(min length:5)" + } + }, + "ansibleTowerDatabasePassword": { + "type": "securestring", + "minLength": 5, + "metadata": { + "description": "Password for ansible tower database(min length:5)" + } + }, + "vmClientUsername": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "Username for client vm's" + } + }, + "vmClientPassword": { + "type": "securestring", + "minLength": 12, + "metadata": { + "description": "Password for client vm's" + } + }, + "remoteAllowedCIDR": { + "type": "string", + "minLength": 7, + "defaultValue": "0.0.0.0/0", + "metadata": { + "description": "Enter Public IP CIDR to allow for accessing the deployment.Enter in 0.0.0.0/0 format. You can always modify these later in NSG Settings" + } + }, + "_artifactsLocation": { + "type": "string", + "defaultValue": "https://gallery.azure.com/artifact/20151001/redhat.ansible-toweransible-tower.1.0.6/Artifacts", + "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.Leave blank if unsure" + }, + "defaultValue": "" }, - "variables": { - "VmSize": "Standard_D2_v2", - "clientAvSet": "client-avset", - "ansibleNsgName": "tower-nsg", - "clientNsgName": "client-nsg", - "clientStorageAccountName": "[concat('clstorage',uniqueString(resourceGroup().id))]", - "StorageAccountType": "Standard_GRS", - "diagStorageAccountName": "[concat('dgstorge2',uniqueString(resourceGroup().id))]", - "ansibleVnetName": "ansible-vnet", - "ansibleVnetPrefix": "10.0.0.0/16", - "ansibleVnetTowerSubnetName": "tower-subnet", - "ansibleVnetTowerSubnetPrefix": "10.0.0.0/24", - "ansibleVnetClientSubnetName": "client-subnet", - "ansibleVnetClientSubnetPrefix": "10.0.1.0/24", - "clientSubnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets/',variables('ansibleVnetName'), variables('ansibleVnetClientSubnetName'))]", - "pipClientName": "public-ip-client", - "pipClientDNSName": "[concat('client',uniqueString(resourceGroup().id))]", - "vmTowerName": "vm-ansible-tower", - "vmClientName": "vm-client", - "vmClientNicName": "vm-client-nic-", - "storageAccountContainerName": "vhds", - "redHatTags": { - "type": "object", - "provider": "9d2c71fc-96ba-4b4a-93b3-14def5bc96fc" + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "VmSize": "Standard_D2_v2", + "clientAvSet": "client-avset", + "ansibleNsgName": "tower-nsg", + "clientNsgName": "client-nsg", + "clientStorageAccountName": "[concat('clstorage',uniqueString(resourceGroup().id))]", + "StorageAccountType": "Standard_GRS", + "diagStorageAccountName": "[concat('dgstorge2',uniqueString(resourceGroup().id))]", + "ansibleVnetName": "ansible-vnet", + "ansibleVnetPrefix": "10.0.0.0/16", + "ansibleVnetTowerSubnetName": "tower-subnet", + "ansibleVnetTowerSubnetPrefix": "10.0.0.0/24", + "ansibleVnetClientSubnetName": "client-subnet", + "ansibleVnetClientSubnetPrefix": "10.0.1.0/24", + "clientSubnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets/',variables('ansibleVnetName'), variables('ansibleVnetClientSubnetName'))]", + "pipClientName": "public-ip-client", + "pipClientDNSName": "[concat('client',uniqueString(resourceGroup().id))]", + "vmTowerName": "vm-ansible-tower", + "vmClientName": "vm-client", + "vmClientNicName": "vm-client-nic-", + "storageAccountContainerName": "vhds", + "redHatTags": { + "type": "object", + "provider": "9d2c71fc-96ba-4b4a-93b3-14def5bc96fc" + }, + "quickstartTags": { + "type": "object", + "name": "ansible-tower-rhel" + } + }, + "resources": [ + { + "apiVersion": "2017-05-10", + "name": "linkedTemplate", + "type": "Microsoft.Resources/deployments", + "dependsOn": [], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'),'/mainTemplate.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "quickstartTags": { - "type": "object", - "name": "ansible-tower-rhel" + "parameters": { + "vmAnsibleTowerUsername": { + "value": "[parameters('vmAnsibleTowerUsername')]" + }, + "sshKeyData": { + "value": "[parameters('sshKeyData')]" + }, + "vmSize": { + "value": "Standard_DS2_v2" + }, + "vmTowerName": { + "value": "[variables('vmTowerName')]" + }, + "ansibleTowerAdminPassword": { + "value": "[parameters('ansibleTowerAdminPassword')]" + }, + "ansibleTowerDatabasePassword": { + "value": "[parameters('ansibleTowerDatabasePassword')]" + }, + "remoteAllowedCIDR": { + "value": "[parameters('remoteAllowedCIDR')]" + }, + "location": { + "value": "[parameters('location')]" + }, + "baseUrl": { + "value": "[parameters('_artifactsLocation')]" + } } + } }, - "resources": [{ - "apiVersion": "2017-05-10", - "name": "linkedTemplate", - "type": "Microsoft.Resources/deployments", - "dependsOn": [], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'),'/mainTemplate.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "vmAnsibleTowerUsername": { - "value": "[parameters('vmAnsibleTowerUsername')]" - }, - "sshKeyData": { - "value": "[parameters('sshKeyData')]" - }, - "vmSize": { - "value": "Standard_DS2_v2" - }, - "vmTowerName": { - "value": "[variables('vmTowerName')]" - }, - "ansibleTowerAdminPassword": { - "value": "[parameters('ansibleTowerAdminPassword')]" - }, - "ansibleTowerDatabasePassword": { - "value": "[parameters('ansibleTowerDatabasePassword')]" - }, - "remoteAllowedCIDR": { - "value": "[parameters('remoteAllowedCIDR')]" - }, - "location": { - "value": "[resourceGroup().location]" - }, - "baseUrl": { - "value": "[parameters('_artifactsLocation')]" - } - } - } - }, - { - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('clientAvSet')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "comments": "This availability set will consist of virtual machines configured as ansible clients ", - "tags": { - "displayName": "Availability Set-Client", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('redHatTags').provider]" - }, - "properties": {} - }, - { - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('clientNsgName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "This nsg will have security rules for all ansible clients", - "tags": { - "displayName": "Client-NSG", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('redHatTags').provider]" - }, + { + "type": "Microsoft.Compute/availabilitySets", + "name": "[variables('clientAvSet')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "This availability set will consist of virtual machines configured as ansible clients ", + "tags": { + "displayName": "Availability Set-Client", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('redHatTags').provider]" + }, + "properties": {} + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('clientNsgName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "This nsg will have security rules for all ansible clients", + "tags": { + "displayName": "Client-NSG", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('redHatTags').provider]" + }, + "properties": { + "securityRules": [ + { + "name": "allow-80", "properties": { - "securityRules": [{ - "name": "allow-80", - "properties": { - "access": "Allow", - "destinationAddressPrefix": "*", - "destinationPortRange": "80", - "direction": "Inbound", - "priority": 301, - "protocol": "Tcp", - "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", - "sourcePortRange": "*" - } - }, - { - "name": "allow-8080", - "properties": { - "access": "Allow", - "destinationAddressPrefix": "*", - "destinationPortRange": "8080", - "direction": "Inbound", - "priority": 302, - "protocol": "Tcp", - "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", - "sourcePortRange": "*" - } - }, - { - "name": "allow-443", - "properties": { - "access": "Allow", - "destinationAddressPrefix": "*", - "destinationPortRange": "443", - "direction": "Inbound", - "priority": 303, - "protocol": "Tcp", - "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", - "sourcePortRange": "*" - } - }, - { - "name": "default-allow-ssh", - "properties": { - "access": "Allow", - "destinationAddressPrefix": "*", - "destinationPortRange": "22", - "direction": "Inbound", - "priority": 300, - "protocol": "Tcp", - "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", - "sourcePortRange": "*" - } - } - ] + "access": "Allow", + "destinationAddressPrefix": "*", + "destinationPortRange": "80", + "direction": "Inbound", + "priority": 301, + "protocol": "Tcp", + "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", + "sourcePortRange": "*" } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('clientStorageAccountName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "comments": "This storage account is used to store the VM disks of all client vms", - "tags": { - "displayName": "Client Storage Account", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('redHatTags').provider]" - }, + }, + { + "name": "allow-8080", "properties": { - "accountType": "[variables('StorageAccountType')]" + "access": "Allow", + "destinationAddressPrefix": "*", + "destinationPortRange": "8080", + "direction": "Inbound", + "priority": 302, + "protocol": "Tcp", + "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", + "sourcePortRange": "*" } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('diagStorageAccountName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "comments": "This storage account is used for diagnostic data for all vms", - "tags": { - "displayName": "Diagnostics Storage Account", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('redHatTags').provider]" - }, + }, + { + "name": "allow-443", "properties": { - "accountType": "Standard_LRS" + "access": "Allow", + "destinationAddressPrefix": "*", + "destinationPortRange": "443", + "direction": "Inbound", + "priority": 303, + "protocol": "Tcp", + "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", + "sourcePortRange": "*" } - }, - { - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('ansibleVnetName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "comments": "This Virtual Network contains all the VMs needed", - "tags": { - "displayName": "Ansible-Virtual Network", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('redHatTags').provider]" - }, - "dependsOn": [ - - "[resourceId('Microsoft.Network/networkSecurityGroups', variables('clientNsgName'))]", - "[resourceId('Microsoft.Resources/deployments','linkedTemplate')]" - ], + }, + { + "name": "default-allow-ssh", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('ansibleVnetPrefix')]" - ] - }, - "subnets": [{ - "name": "[variables('ansibleVnetTowerSubnetName')]", - "properties": { - "addressPrefix": "[variables('ansibleVnetTowerSubnetPrefix')]", - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('ansibleNsgName'))]" - } - } - }, - { - "name": "[variables('ansibleVnetClientSubnetName')]", - "properties": { - "addressPrefix": "[variables('ansibleVnetClientSubnetPrefix')]", - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('clientNsgName'))]" - } - } - } - ] + "access": "Allow", + "destinationAddressPrefix": "*", + "destinationPortRange": "22", + "direction": "Inbound", + "priority": 300, + "protocol": "Tcp", + "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", + "sourcePortRange": "*" } + } + ] + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('clientStorageAccountName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "This storage account is used to store the VM disks of all client vms", + "tags": { + "displayName": "Client Storage Account", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('redHatTags').provider]" + }, + "properties": { + "accountType": "[variables('StorageAccountType')]" + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('diagStorageAccountName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "This storage account is used for diagnostic data for all vms", + "tags": { + "displayName": "Diagnostics Storage Account", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('redHatTags').provider]" + }, + "properties": { + "accountType": "Standard_LRS" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('ansibleVnetName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "This Virtual Network contains all the VMs needed", + "tags": { + "displayName": "Ansible-Virtual Network", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('redHatTags').provider]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Network/networkSecurityGroups', variables('clientNsgName'))]", + "[resourceId('Microsoft.Resources/deployments','linkedTemplate')]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('ansibleVnetPrefix')]" + ] }, - - { - "type": "Microsoft.Network/publicIPAddresses", - "name": "[concat(variables('pipClientName'), copyindex(1))]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "comments": "This will create two public IP used by Client VMs", - "tags": { - "displayName": "Client VMs Public IP Addresses", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('redHatTags').provider]" - }, - "copy": { - "name": "clientpubliciploop", - "count": 2 - }, + "subnets": [ + { + "name": "[variables('ansibleVnetTowerSubnetName')]", "properties": { - "publicIPAllocationMethod": "Static", - "dnsSettings": { - "domainNameLabel": "[concat(variables('pipClientDnsName'),copyIndex(1))]" - } + "addressPrefix": "[variables('ansibleVnetTowerSubnetPrefix')]", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('ansibleNsgName'))]" + } } - }, - { - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmClientNicName'), copyindex(1))]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "comments": "These NIC's will be used by ClientVM1 and ClientVM2", - "tags": { - "displayName": "NIC Client VMs", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('redHatTags').provider]" - }, - "dependsOn": [ - "[resourceId('Microsoft.Network/virtualNetworks', variables('ansibleVnetName'))]", - "clientpubliciploop" - ], - "copy": { - "name": "clientnicloop", - "count": 2 - }, + }, + { + "name": "[variables('ansibleVnetClientSubnetName')]", "properties": { - "ipConfigurations": [{ - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[variables('clientSubnetRef')]" - }, - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('pipClientName'),copyIndex(1)))]" - } - } - }] + "addressPrefix": "[variables('ansibleVnetClientSubnetPrefix')]", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('clientNsgName'))]" + } } - }, - { - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('vmClientName'), copyindex(1))]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "comments": "Two Ansible Client Virtual Machines", - "tags": { - "displayName": "Client-VMs", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('redHatTags').provider]" - }, - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('clientStorageAccountName'))]", - "[resourceId('Microsoft.Compute/availabilitySets', variables('clientAvSet'))]", - "clientnicloop" - - ], - "copy": { - "name": "clientvmloop", - "count": 2 - }, + } + ] + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(variables('pipClientName'), copyindex(1))]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "This will create two public IP used by Client VMs", + "tags": { + "displayName": "Client VMs Public IP Addresses", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('redHatTags').provider]" + }, + "copy": { + "name": "clientpubliciploop", + "count": 2 + }, + "properties": { + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(variables('pipClientDnsName'),copyIndex(1))]" + } + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmClientNicName'), copyindex(1))]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "These NIC's will be used by ClientVM1 and ClientVM2", + "tags": { + "displayName": "NIC Client VMs", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('redHatTags').provider]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', variables('ansibleVnetName'))]", + "clientpubliciploop" + ], + "copy": { + "name": "clientnicloop", + "count": 2 + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('clientAvSet'))]" - }, - "hardwareProfile": { - "vmSize": "[variables('VmSize')]" - }, - "osProfile": { - "computerName": "[variables('vmClientName')]", - "adminUsername": "[parameters('vmClientUsername')]", - "adminPassword": "[parameters('vmClientPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "RedHat", - "offer": "RHEL", - "sku": "7.2", - "version": "latest" - }, - "osDisk": { - "name": "[concat('vmClient',copyIndex(1),'os-disk')]", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('clientStorageAccountName')), '2015-06-15').primaryEndpoints.blob, variables('storageAccountContainerName'),'/','vmClient',copyIndex(1),'os-disk','.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [{ - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmClientNicName'),copyIndex(1)))]" - }] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('diagStorageAccountName')),'2015-06-15').primaryEndpoints.blob]" - } - } + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[variables('clientSubnetRef')]" + }, + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('pipClientName'),copyIndex(1)))]" + } } - } - ], - "outputs": { - "ansibleTowerFqdn": { - "value": "[reference('linkedTemplate').outputs.ansibleTowerFqdn.value]", - "type": "string" - }, - "client01Ip": { - "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',concat(variables('pipClientName'),'1'))).ipAddress]", - "type": "string" + } + ] + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "name": "[concat(variables('vmClientName'), copyindex(1))]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "Two Ansible Client Virtual Machines", + "tags": { + "displayName": "Client-VMs", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('redHatTags').provider]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('clientStorageAccountName'))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('clientAvSet'))]", + "clientnicloop" + ], + "copy": { + "name": "clientvmloop", + "count": 2 + }, + "properties": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('clientAvSet'))]" }, - "client01PrivateIP": { - "value": "[reference(concat(variables('vmClientNicName'),'1')).ipConfigurations[ 0 ].properties.privateIPAddress]", - "type": "string" + "hardwareProfile": { + "vmSize": "[variables('VmSize')]" }, - "client01Fqdn": { - "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',concat(variables('pipClientName'),'1'))).dnsSettings.fqdn]", - "type": "string" + "osProfile": { + "computerName": "[variables('vmClientName')]", + "adminUsername": "[parameters('vmClientUsername')]", + "adminPassword": "[parameters('vmClientPassword')]" }, - "client02Ip": { - "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',concat(variables('pipClientName'),'2'))).ipAddress]", - "type": "string" + "storageProfile": { + "imageReference": { + "publisher": "RedHat", + "offer": "RHEL", + "sku": "7.2", + "version": "latest" + }, + "osDisk": { + "name": "[concat('vmClient',copyIndex(1),'os-disk')]", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('clientStorageAccountName')), '2015-06-15').primaryEndpoints.blob, variables('storageAccountContainerName'),'/','vmClient',copyIndex(1),'os-disk','.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "FromImage" + } }, - "client02PrivateIP": { - "value": "[reference(concat(variables('vmClientNicName'),'2')).ipConfigurations[ 0 ].properties.privateIPAddress]", - "type": "string" + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmClientNicName'),copyIndex(1)))]" + } + ] }, - "client02Fqdn": { - "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',concat(variables('pipClientName'),'2'))).dnsSettings.fqdn]", - "type": "string" + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('diagStorageAccountName')),'2015-06-15').primaryEndpoints.blob]" + } } + } + } + ], + "outputs": { + "ansibleTowerFqdn": { + "value": "[reference('linkedTemplate').outputs.ansibleTowerFqdn.value]", + "type": "string" + }, + "client01Ip": { + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',concat(variables('pipClientName'),'1'))).ipAddress]", + "type": "string" + }, + "client01PrivateIP": { + "value": "[reference(concat(variables('vmClientNicName'),'1')).ipConfigurations[ 0 ].properties.privateIPAddress]", + "type": "string" + }, + "client01Fqdn": { + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',concat(variables('pipClientName'),'1'))).dnsSettings.fqdn]", + "type": "string" + }, + "client02Ip": { + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',concat(variables('pipClientName'),'2'))).ipAddress]", + "type": "string" + }, + "client02PrivateIP": { + "value": "[reference(concat(variables('vmClientNicName'),'2')).ipConfigurations[ 0 ].properties.privateIPAddress]", + "type": "string" + }, + "client02Fqdn": { + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',concat(variables('pipClientName'),'2'))).dnsSettings.fqdn]", + "type": "string" } + } } diff --git a/anti-malware-extension-windows-vm/azuredeploy.json b/anti-malware-extension-windows-vm/azuredeploy.json index aaa94773588f..0840c8dd4d24 100644 --- a/anti-malware-extension-windows-vm/azuredeploy.json +++ b/anti-malware-extension-windows-vm/azuredeploy.json @@ -116,6 +116,13 @@ "metadata": { "description": "Extension name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -127,7 +134,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -136,7 +143,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } @@ -145,7 +152,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -166,7 +173,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" @@ -192,7 +199,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]" @@ -235,7 +242,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/', parameters('vmExtensionName'))]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], diff --git a/apache2-on-ubuntu-vm/azuredeploy.json b/apache2-on-ubuntu-vm/azuredeploy.json index eceb9b7403fb..18592d745956 100644 --- a/apache2-on-ubuntu-vm/azuredeploy.json +++ b/apache2-on-ubuntu-vm/azuredeploy.json @@ -37,6 +37,13 @@ "metadata": { "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values: 12.04.5-LTS, 14.04.2-LTS, 15.10." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -62,7 +69,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -71,7 +78,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -83,7 +90,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -104,7 +111,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -130,7 +137,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -173,7 +180,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/application-gateway-demo-setup/azuredeploy.json b/application-gateway-demo-setup/azuredeploy.json index bac54f8b41f3..c7cf2baef60c 100644 --- a/application-gateway-demo-setup/azuredeploy.json +++ b/application-gateway-demo-setup/azuredeploy.json @@ -44,6 +44,13 @@ "metadata": { "description": "Password for the backend Web servers" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -145,7 +152,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -154,7 +161,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -175,7 +182,7 @@ "apiVersion": "2017-06-01", "name": "[variables('applicationGatewayName')]", "type": "Microsoft.Network/applicationGateways", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", diff --git a/asr-oms-monitoring/azuredeploy.json b/asr-oms-monitoring/azuredeploy.json index 3622084f6133..e61eea23469d 100644 --- a/asr-oms-monitoring/azuredeploy.json +++ b/asr-oms-monitoring/azuredeploy.json @@ -277,7 +277,7 @@ "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]" ], - "tags": { }, + "tags": {}, "properties": { "description": "OMS Workspace Id", "value": "[concat('\"',reference(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsLogAnalyticsWorkspaceName')),'2015-11-01-preview').customerId,'\"')]" @@ -291,7 +291,7 @@ "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]" ], - "tags": { }, + "tags": {}, "properties": { "description": "OMS Workspace key", "value": "[concat('\"',listKeys(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsLogAnalyticsWorkspaceName')), '2015-11-01-preview').primarySharedKey,'\"')]" @@ -305,8 +305,7 @@ "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]" ], - "tags": { - }, + "tags": {}, "properties": { "description": "Azure Subscription Id", "isEncrypted": 0, @@ -318,7 +317,7 @@ "name": "[variables('psModules').azureRmOperationalInsights.name]", "type": "Modules", "apiVersion": "2015-10-31", - "tags": { }, + "tags": {}, "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/Modules/', variables('psModules').azureRmProfile.name)]" @@ -333,7 +332,7 @@ "name": "[variables('psModules').azureRmResources.name]", "type": "Modules", "apiVersion": "2015-10-31", - "tags": { }, + "tags": {}, "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/Modules/', variables('psModules').azureRmProfile.name)]" @@ -348,7 +347,7 @@ "name": "[variables('psModules').azureRmAutomation.name]", "type": "Modules", "apiVersion": "2015-10-31", - "tags": { }, + "tags": {}, "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/Modules/', variables('psModules').azureRmProfile.name)]", @@ -364,7 +363,7 @@ "name": "[variables('psModules').azureRmStorage.name]", "type": "Modules", "apiVersion": "2015-10-31", - "tags": { }, + "tags": {}, "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/Modules/', variables('psModules').azureRmProfile.name)]", @@ -380,7 +379,7 @@ "name": "[variables('psModules').azureStorage.name]", "type": "Modules", "apiVersion": "2015-10-31", - "tags": { }, + "tags": {}, "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/Modules/', variables('psModules').azureRmProfile.name)]" @@ -395,7 +394,7 @@ "name": "[variables('psModules').azureRmCompute.name]", "type": "Modules", "apiVersion": "2015-10-31", - "tags": { }, + "tags": {}, "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/Modules/', variables('psModules').azureRmProfile.name)]" @@ -410,7 +409,7 @@ "name": "[variables('psModules').azureRmSiteRecovery.name]", "type": "Modules", "apiVersion": "2015-10-31", - "tags": { }, + "tags": {}, "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/Modules/', variables('psModules').azureRmProfile.name)]", @@ -426,7 +425,7 @@ "name": "[variables('psModules').azureRmbackup.name]", "type": "Modules", "apiVersion": "2015-10-31", - "tags": { }, + "tags": {}, "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/Modules/', variables('psModules').azureRmProfile.name)]", @@ -442,7 +441,7 @@ "name": "[variables('psModules').azureRmRecoveryServices.name]", "type": "Modules", "apiVersion": "2015-10-31", - "tags": { }, + "tags": {}, "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/Modules/', variables('psModules').azureRmProfile.name)]", @@ -458,7 +457,7 @@ "name": "[variables('psModules').azureRmProfile.name]", "type": "Modules", "apiVersion": "2015-10-31", - "tags": { }, + "tags": {}, "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]" ], @@ -472,7 +471,7 @@ "name": "[variables('psModules').omsASRMonitoring.name]", "type": "Modules", "apiVersion": "2015-10-31", - "tags": { }, + "tags": {}, "dependsOn": [ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/Modules/', variables('psModules').azureStorage.name)]" @@ -505,7 +504,7 @@ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/Modules/', variables('psModules').azureRmAutomation.name)]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/Modules/', variables('psModules').omsASRMonitoring.name)]" ], - "tags": { }, + "tags": {}, "properties": { "runbookType": "[variables('runbooks').omsASRMonitoring.type]", "logProgress": "false", @@ -526,7 +525,7 @@ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/runbooks/', variables('runbooks').omsASRMonitoring.name)]" ], - "tags": { }, + "tags": {}, "properties": { "description": "OMS Ingestion API Scheduler", "startTime": "", @@ -545,7 +544,7 @@ "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), '/runbooks/', variables('runbooks').omsASRMonitoring.name)]", "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]" ], - "tags": { }, + "tags": {}, "properties": { "schedule": { "name": "[variables('ingestScheduleName')]" @@ -562,10 +561,10 @@ "AutomationAccontName": { "value": "[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'))]", "type": "string" - }, + }, "LogAnalyticsworkspacename": { "value": "[concat('Microsoft.OperationalInsights/workspaces/', parameters('omsLogAnalyticsWorkspaceName'))]", "type": "string" - } } - } \ No newline at end of file + } +} diff --git a/azmgmt-demo/nestedtemplates/drEnablement.json b/azmgmt-demo/nestedtemplates/drEnablement.json index 718c3915206d..b9b4ef715da2 100644 --- a/azmgmt-demo/nestedtemplates/drEnablement.json +++ b/azmgmt-demo/nestedtemplates/drEnablement.json @@ -1,270 +1,274 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmResourceGroup": { - "type": "string" - }, - "vmResourceGroupLocation": { - "type": "string" - }, - "vmDrResourceGroup": { - "type": "string" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmResourceGroup": { + "type": "string" }, - "variables": { - "storageAccountName": "[toLower(concat('dr', uniquestring(resourceGroup().name)))]", - "sourcevNetName": "managedVnet", - "sourceSubnetName": "subnet01", - "vNetName": "managedVnet-asr", - "vNetAddressPrefix": "192.168.0.0/16", - "subnetName": "subnet01-asr", - "subnetAddressPrefix": "192.168.0.0/24", - "vNetId": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNetName'))]", - "subnetRef": "[concat(variables('vNetId'),'/subnets/', variables('subnetName'))]", - "vaultName": "a2adrvault", - "sourceFabricName": "[concat(variables('vaultName'), '/asr-a2a-default-', parameters('vmResourceGroupLocation'))]", - "targetFabricName": "[concat(variables('vaultName'), '/asr-a2a-default-', resourceGroup().location)]", - "sourceContainerName": "[concat(variables('sourceContainerName'), '/asr-a2a-default-', parameters('vmresourceGroupLocation'), '-container')]", - "targetContainerName": "[concat(variables('targetFabricName'), '/asr-a2a-default-', resourceGroup().location, '-container')]", - "sourceMapping": "[concat(variables('sourceContainerName'), '/', parameters('vmResourceGroupLocation'), '-', resourceGroup().location, '-24-hour-retention-policy')]", - "targetMapping": "[concat(variables('targetContainerName'), '/', resourceGroup().location, '-', parameters('vmResourceGroupLocation'), '-24-hour-retention-policy')]", - "sourcevNetMapping": "[concat(variables('sourceFabricName'), '/azureNetwork/', resourceGroup().location, '-', parameters('vmResourceGroupLocation'), variables('vNetName'))]", - "targetvNetMapping": "[concat(variables('targetFabricName'), '/azureNetwork/', parameters('vmResourceGroupLocation'), '-', resourceGroup().location, variables('vNetName'))]" + "vmResourceGroupLocation": { + "type": "string" }, - "resources": [ - { - "apiVersion": "2017-06-01", - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": {} + "vmDrResourceGroup": { + "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountName": "[toLower(concat('dr', uniquestring(resourceGroup().name)))]", + "sourcevNetName": "managedVnet", + "vNetName": "managedVnet-asr", + "vNetAddressPrefix": "192.168.0.0/16", + "subnetName": "subnet01-asr", + "subnetAddressPrefix": "192.168.0.0/24", + "vaultName": "a2adrvault", + "sourceFabricName": "[concat(variables('vaultName'), '/asr-a2a-default-', parameters('vmResourceGroupLocation'))]", + "targetFabricName": "[concat(variables('vaultName'), '/asr-a2a-default-', parameters('location'))]", + "sourceContainerName": "[concat(variables('sourceContainerName'), '/asr-a2a-default-', parameters('vmresourceGroupLocation'), '-container')]", + "targetContainerName": "[concat(variables('targetFabricName'), '/asr-a2a-default-', parameters('location'), '-container')]", + "sourceMapping": "[concat(variables('sourceContainerName'), '/', parameters('vmResourceGroupLocation'), '-', parameters('location'), '-24-hour-retention-policy')]", + "targetMapping": "[concat(variables('targetContainerName'), '/', parameters('location'), '-', parameters('vmResourceGroupLocation'), '-24-hour-retention-policy')]", + "sourcevNetMapping": "[concat(variables('sourceFabricName'), '/azureNetwork/', parameters('location'), '-', parameters('vmResourceGroupLocation'), variables('vNetName'))]", + "targetvNetMapping": "[concat(variables('targetFabricName'), '/azureNetwork/', parameters('vmResourceGroupLocation'), '-', parameters('location'), variables('vNetName'))]" + }, + "resources": [ + { + "apiVersion": "2017-06-01", + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2017-04-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('vNetName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vNetAddressPrefix')]" + ] }, - { - "apiVersion": "2017-04-01", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('vNetName')]", - "location": "[resourceGroup().location]", + "subnets": [ + { + "name": "[variables('subnetName')]", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('vNetAddressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetAddressPrefix')]" - } - } - ] + "addressPrefix": "[variables('subnetAddressPrefix')]" } - }, - { - "type": "Microsoft.RecoveryServices/vaults", - "apiVersion": "2016-08-10", - "location": "[resourceGroup().location]", - "name": "a2adrvault", - "properties": {}, - "sku": { - "name": "RS0", - "tier": "Standard" + } + ] + } + }, + { + "type": "Microsoft.RecoveryServices/vaults", + "apiVersion": "2016-08-10", + "location": "[parameters('location')]", + "name": "a2adrvault", + "properties": {}, + "sku": { + "name": "RS0", + "tier": "Standard" + } + }, + { + "type": "Microsoft.RecoveryServices/vaults/replicationFabrics", + "name": "[variables('sourceFabricName')]", + "apiVersion": "2016-08-10", + "properties": { + "customDetails": { + "instanceType": "Azure", + "location": "[parameters('vmResourceGroupLocation')]" + } + }, + "dependsOn": [] + }, + { + "type": "Microsoft.RecoveryServices/vaults/replicationFabrics", + "name": "[variables('targetFabricName')]", + "apiVersion": "2016-08-10", + "properties": { + "customDetails": { + "instanceType": "Azure", + "location": "[parameters('location')]" + } + }, + "dependsOn": [ + "[variables('sourceFabricName')]" + ] + }, + { + "type": "Microsoft.RecoveryServices/vaults/replicationPolicies", + "name": "[concat(variables('vaultName'), '/24-hour-retention-policy')]", + "apiVersion": "2016-08-10", + "properties": { + "providerSpecificInput": { + "instanceType": "A2A", + "appConsistentFrequencyInMinutes": 240, + "crashConsistentFrequencyInMinutes": 5, + "multiVmSyncStatus": "Enable", + "recoveryPointHistory": 1440 + } + }, + "dependsOn": [] + }, + { + "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers", + "name": "[variables('sourceContainerName')]", + "apiVersion": "2016-08-10", + "properties": { + "providerSpecificDetails": [ + { + "instanceType": "A2A" + } + ] + }, + "dependsOn": [ + "[variables('sourceFabricName')]" + ] + }, + { + "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers", + "name": "[variables('targetContainerName')]", + "apiVersion": "2016-08-10", + "properties": { + "providerSpecificDetails": [ + { + "instanceType": "A2A" + } + ] + }, + "dependsOn": [ + "[variables('targetFabricName')]" + ] + }, + { + "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings", + "name": "[variables('sourceMapping')]", + "apiVersion": "2016-08-10", + "properties": { + "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/replicationPolicies/', variables('vaultName'), '24-hour-retention-policy')]", + "targetProtectionContainerId": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.RecoveryServices/vaults/', variables('targetMapping'))]" + }, + "dependsOn": [ + "[variables('sourceMapping')]", + "[variables('targetMapping')]", + "[resourceId('Microsoft.RecoveryServices/vaults/', variables('vaultName'), '24-hour-retention-policy')]" + ] + }, + { + "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings", + "name": "[variables('targetMapping')]", + "apiVersion": "2016-08-10", + "properties": { + "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/replicationPolicies/', variables('vaultName'), '24-hour-retention-policy')]", + "targetProtectionContainerId": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.RecoveryServices/vaults/', variables('sourceMapping'))]" + }, + "dependsOn": [ + "[variables('sourceMapping')]", + "[variables('targetMapping')]", + "[resourceId('Microsoft.RecoveryServices/vaults/', variables('vaultName'), '24-hour-retention-policy')]" + ] + }, + { + "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings", + "name": "[variables('sourcevNetMapping')]", + "apiVersion": "2016-08-10", + "properties": { + "recoveryFabricName": "asr-a2a-default-northeurope", + "recoveryNetworkId": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworks/', variables('vnetName'))]", + "fabricSpecificDetails": { + "instanceType": "AzureToAzure", + "primaryNetworkId": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', parameters('vmResourceGroup'), '/providers/Microsoft.Network/virtualNetworks/', variables('sourcevNetName'))]" + } + }, + "dependsOn": [ + "[variables('sourceFabricName')]", + "[variables('targetFabricName')]" + ] + }, + { + "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings", + "name": "[variables('targetvNetMapping')]", + "apiVersion": "2016-08-10", + "properties": { + "recoveryFabricName": "asr-a2a-default-westeurope", + "recoveryNetworkId": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', parameters('vmResourceGroup'), '/providers/Microsoft.Network/virtualNetworks/', variables('sourcevNetName'))]", + "fabricSpecificDetails": { + "instanceType": "AzureToAzure", + "primaryNetworkId": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworks/', variables('vNetName'))]" + } + }, + "dependsOn": [ + "[variables('sourcevNetMapping')]", + "[variables('sourceFabricName')]", + "[variables('targetFabricName')]" + ] + }, + { + "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems", + "name": "drvaultas/asr-a2a-default-westeurope/asr-a2a-default-westeurope-container/e5ec70ea-098b-4ae8-a72f-c74e595a8f6e", + "apiVersion": "2016-08-10", + "properties": { + "policyId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationPolicies/24-hour-retention-policy", + "protectableItemId": "", + "providerSpecificDetails": { + "instanceType": "A2A", + "fabricObjectId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/KeyNoteWL/providers/Microsoft.Compute/virtualMachines/keynotewlVM0", + "recoveryResourceGroupId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/KeyNoteWL-asr", + "recoveryContainerId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-northeurope/replicationProtectionContainers/asr-a2a-default-northeurope-container", + "vmDisks": [ + { + "diskUri": "http://stw45gwvufbhhbe.blob.core.windows.net/vhds/osdisk0.vhd", + "primaryStagingAzureStorageAccountId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/keynotewl-asr/providers/Microsoft.Storage/storageAccounts/stw45gwvufbhhbecacheasr", + "recoveryAzureStorageAccountId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/keynotewl-asr/providers/Microsoft.Storage/storageAccounts/stw45gwvufbhhbeasr" } - }, - { - "type": "Microsoft.RecoveryServices/vaults/replicationFabrics", - "name": "[variables('sourceFabricName')]", - "apiVersion": "2016-08-10", - "properties": { - "customDetails": { - "instanceType": "Azure", - "location": "[parameters('vmResourceGroupLocation')]" - } - }, - "dependsOn": [] - }, - { - "type": "Microsoft.RecoveryServices/vaults/replicationFabrics", - "name": "[variables('targetFabricName')]", - "apiVersion": "2016-08-10", - "properties": { - "customDetails": { - "instanceType": "Azure", - "location": "[resourceGroup().location]" - } - }, - "dependsOn": [ - "[variables('sourceFabricName')]" - ] - }, - { - "type": "Microsoft.RecoveryServices/vaults/replicationPolicies", - "name": "[concat(variables('vaultName'), '/24-hour-retention-policy')]", - "apiVersion": "2016-08-10", - "properties": { - "providerSpecificInput": { - "instanceType": "A2A", - "appConsistentFrequencyInMinutes": 240, - "crashConsistentFrequencyInMinutes": 5, - "multiVmSyncStatus": "Enable", - "recoveryPointHistory": 1440 - } - }, - "dependsOn": [] - }, - { - "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers", - "name": "[variables('sourceContainerName')]", - "apiVersion": "2016-08-10", - "properties": { - "providerSpecificDetails": [ - { - "instanceType": "A2A" - } - ] - }, - "dependsOn": [ - "[variables('sourceFabricName')]" - ] - }, - { - "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers", - "name": "[variables('targetContainerName')]", - "apiVersion": "2016-08-10", - "properties": { - "providerSpecificDetails": [ - { - "instanceType": "A2A" - } - ] - }, - "dependsOn": [ - "[variables('targetFabricName')]" - ] - }, - { - "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings", - "name": "[variables('sourceMapping')]", - "apiVersion": "2016-08-10", - "properties": { - "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/replicationPolicies/', variables('vaultName'), '24-hour-retention-policy')]", - "targetProtectionContainerId": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.RecoveryServices/vaults/', variables('targetMapping'))]" - }, - "dependsOn": [ - "[variables('sourceMapping')]", - "[variables('targetMapping')]", - "[resourceId('Microsoft.RecoveryServices/vaults/', variables('vaultName'), '24-hour-retention-policy')]" - ] - }, - { - "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings", - "name": "[variables('targetMapping')]", - "apiVersion": "2016-08-10", - "properties": { - "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/replicationPolicies/', variables('vaultName'), '24-hour-retention-policy')]", - "targetProtectionContainerId": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.RecoveryServices/vaults/', variables('sourceMapping'))]" - }, - "dependsOn": [ - "[variables('sourceMapping')]", - "[variables('targetMapping')]", - "[resourceId('Microsoft.RecoveryServices/vaults/', variables('vaultName'), '24-hour-retention-policy')]" - ] - }, - { - "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings", - "name": "[variables('sourcevNetMapping')]", - "apiVersion": "2016-08-10", - "properties": { - "recoveryFabricName": "asr-a2a-default-northeurope", - "recoveryNetworkId": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworks/', variables('vnetName'))]", - "fabricSpecificDetails": { - "instanceType": "AzureToAzure", - "primaryNetworkId": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', parameters('vmResourceGroup'), '/providers/Microsoft.Network/virtualNetworks/', variables('sourcevNetName'))]" - } - }, - "dependsOn": [ - "[variables('sourceFabricName')]", - "[variables('targetFabricName')]" - ] - }, - { - "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings", - "name": "[variables('targetvNetMapping')]", - "apiVersion": "2016-08-10", - "properties": { - "recoveryFabricName": "asr-a2a-default-westeurope", - "recoveryNetworkId": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', parameters('vmResourceGroup'), '/providers/Microsoft.Network/virtualNetworks/', variables('sourcevNetName'))]", - "fabricSpecificDetails": { - "instanceType": "AzureToAzure", - "primaryNetworkId": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworks/', variables('vNetName'))]" - } - }, - "dependsOn": [ - "[variables('sourcevNetMapping')]", - "[variables('sourceFabricName')]", - "[variables('targetFabricName')]" - ] - }, - { - "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems", - "name": "drvaultas/asr-a2a-default-westeurope/asr-a2a-default-westeurope-container/e5ec70ea-098b-4ae8-a72f-c74e595a8f6e", - "apiVersion": "2016-08-10", - "properties": { - "policyId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationPolicies/24-hour-retention-policy", - "protectableItemId": "", - "providerSpecificDetails": { - "instanceType": "A2A", - "fabricObjectId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/KeyNoteWL/providers/Microsoft.Compute/virtualMachines/keynotewlVM0", - "recoveryResourceGroupId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/KeyNoteWL-asr", - "recoveryContainerId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-northeurope/replicationProtectionContainers/asr-a2a-default-northeurope-container", - "vmDisks": [ - { - "diskUri": "http://stw45gwvufbhhbe.blob.core.windows.net/vhds/osdisk0.vhd", - "primaryStagingAzureStorageAccountId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/keynotewl-asr/providers/Microsoft.Storage/storageAccounts/stw45gwvufbhhbecacheasr", - "recoveryAzureStorageAccountId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/keynotewl-asr/providers/Microsoft.Storage/storageAccounts/stw45gwvufbhhbeasr" - } - ] - } - }, - "dependsOn": [ - "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-westeurope/replicationProtectionContainers/asr-a2a-default-westeurope-container/replicationProtectionContainerMappings/westeurope-northeurope-24-hour-retention-policy", - "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-northeurope/replicationProtectionContainers/asr-a2a-default-northeurope-container/replicationProtectionContainerMappings/northeurope-westeurope-24-hour-retention-policy", - "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-westeurope/replicationNetworks/azureNetwork/replicationNetworkMappings/westeurope-northeurope-managedVnet", - "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-northeurope/replicationNetworks/azureNetwork/replicationNetworkMappings/northeurope-westeurope-managedVnet-asr" - ] - }, - { - "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems", - "name": "drvaultas/asr-a2a-default-westeurope/asr-a2a-default-westeurope-container/f30f328b-ab2a-4f0a-86e2-b2edd16e9c57", - "apiVersion": "2016-08-10", - "properties": { - "policyId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationPolicies/24-hour-retention-policy", - "protectableItemId": "", - "providerSpecificDetails": { - "instanceType": "A2A", - "fabricObjectId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/KeyNoteWL/providers/Microsoft.Compute/virtualMachines/keynotewlVM1", - "recoveryResourceGroupId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/KeyNoteWL-asr", - "recoveryContainerId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-northeurope/replicationProtectionContainers/asr-a2a-default-northeurope-container", - "vmDisks": [ - { - "diskUri": "http://stw45gwvufbhhbe.blob.core.windows.net/vhds/osdisk1.vhd", - "primaryStagingAzureStorageAccountId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/keynotewl-asr/providers/Microsoft.Storage/storageAccounts/stw45gwvufbhhbecacheasr", - "recoveryAzureStorageAccountId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/keynotewl-asr/providers/Microsoft.Storage/storageAccounts/stw45gwvufbhhbeasr" - } - ] - } - }, - "dependsOn": [ - "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-westeurope/replicationProtectionContainers/asr-a2a-default-westeurope-container/replicationProtectionContainerMappings/westeurope-northeurope-24-hour-retention-policy", - "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-northeurope/replicationProtectionContainers/asr-a2a-default-northeurope-container/replicationProtectionContainerMappings/northeurope-westeurope-24-hour-retention-policy", - "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-westeurope/replicationNetworks/azureNetwork/replicationNetworkMappings/westeurope-northeurope-managedVnet", - "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-northeurope/replicationNetworks/azureNetwork/replicationNetworkMappings/northeurope-westeurope-managedVnet-asr" - ] + ] + } + }, + "dependsOn": [ + "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-westeurope/replicationProtectionContainers/asr-a2a-default-westeurope-container/replicationProtectionContainerMappings/westeurope-northeurope-24-hour-retention-policy", + "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-northeurope/replicationProtectionContainers/asr-a2a-default-northeurope-container/replicationProtectionContainerMappings/northeurope-westeurope-24-hour-retention-policy", + "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-westeurope/replicationNetworks/azureNetwork/replicationNetworkMappings/westeurope-northeurope-managedVnet", + "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-northeurope/replicationNetworks/azureNetwork/replicationNetworkMappings/northeurope-westeurope-managedVnet-asr" + ] + }, + { + "type": "Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems", + "name": "drvaultas/asr-a2a-default-westeurope/asr-a2a-default-westeurope-container/f30f328b-ab2a-4f0a-86e2-b2edd16e9c57", + "apiVersion": "2016-08-10", + "properties": { + "policyId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationPolicies/24-hour-retention-policy", + "protectableItemId": "", + "providerSpecificDetails": { + "instanceType": "A2A", + "fabricObjectId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/KeyNoteWL/providers/Microsoft.Compute/virtualMachines/keynotewlVM1", + "recoveryResourceGroupId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/KeyNoteWL-asr", + "recoveryContainerId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-northeurope/replicationProtectionContainers/asr-a2a-default-northeurope-container", + "vmDisks": [ + { + "diskUri": "http://stw45gwvufbhhbe.blob.core.windows.net/vhds/osdisk1.vhd", + "primaryStagingAzureStorageAccountId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/keynotewl-asr/providers/Microsoft.Storage/storageAccounts/stw45gwvufbhhbecacheasr", + "recoveryAzureStorageAccountId": "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/keynotewl-asr/providers/Microsoft.Storage/storageAccounts/stw45gwvufbhhbeasr" + } + ] } - ] -} \ No newline at end of file + }, + "dependsOn": [ + "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-westeurope/replicationProtectionContainers/asr-a2a-default-westeurope-container/replicationProtectionContainerMappings/westeurope-northeurope-24-hour-retention-policy", + "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-northeurope/replicationProtectionContainers/asr-a2a-default-northeurope-container/replicationProtectionContainerMappings/northeurope-westeurope-24-hour-retention-policy", + "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-westeurope/replicationNetworks/azureNetwork/replicationNetworkMappings/westeurope-northeurope-managedVnet", + "/subscriptions/155c4768-b71c-4e4b-a990-97407f43edda/resourceGroups/drsetup/providers/Microsoft.RecoveryServices/vaults/drvaultas/replicationFabrics/asr-a2a-default-northeurope/replicationNetworks/azureNetwork/replicationNetworkMappings/northeurope-westeurope-managedVnet-asr" + ] + } + ] +} diff --git a/azmgmt-demo/nestedtemplates/managedLinuxBackup.json b/azmgmt-demo/nestedtemplates/managedLinuxBackup.json index 587fb43108b2..fcba7b066f01 100644 --- a/azmgmt-demo/nestedtemplates/managedLinuxBackup.json +++ b/azmgmt-demo/nestedtemplates/managedLinuxBackup.json @@ -1,54 +1,54 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "instanceCount": { - "type": "int" - }, - "vmNameSuffix": { - "type": "string", - "metadata": { - "description": "Name of Azure Virtual Machines" - } - }, - "vmRgName": { - "type": "string" - }, - "omsRecoveryVaultName": { - "type": "string", - "metadata": { - "description": "Recovery services vault name where the VMs will be backed up to. The default vaule is 'Backup-vault'." - } - }, - "omsRecoveryVaultRegion": { - "type": "string", - "metadata": { - "description": "Location of the Backup Vault" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "instanceCount": { + "type": "int" }, - "variables": { - "backupFabric": "Azure", - "backupPolicy": "DefaultPolicy", - "v2VmType": "Microsoft.Compute/virtualMachines", - "v2VmContainer": "iaasvmcontainer;iaasvmcontainerv2;", - "v2Vm": "vm;iaasvmcontainerv2;" + "vmNameSuffix": { + "type": "string", + "metadata": { + "description": "Name of Azure Virtual Machines" + } }, - "resources": [ - { - "name": "[concat(parameters('omsRecoveryVaultName'), '/', variables('backupFabric'), '/', variables('v2VmContainer'), concat(parameters('vmRgName'),';',parameters('vmNameSuffix'), 'VM',copyIndex()), '/', variables('v2Vm'), concat(parameters('vmRgName'),';',parameters('vmNameSuffix'),'VM',copyIndex()))]", - "apiVersion": "2016-12-01", - "location": "[parameters('omsRecoveryVaultRegion')]", - "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", - "copy": { - "name": "iaasBackupCopy", - "count": "[parameters('instanceCount')]" - }, - "properties": { - "protectedItemType": "[variables('v2VmType')]", - "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies',parameters('omsRecoveryVaultName'),variables('backupPolicy'))]", - "sourceResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('vmRgName'), '/providers/Microsoft.Compute/virtualMachines/', parameters('vmNameSuffix'), 'VM', copyIndex())]" - } - } - ] + "vmRgName": { + "type": "string" + }, + "omsRecoveryVaultName": { + "type": "string", + "metadata": { + "description": "Recovery services vault name where the VMs will be backed up to. The default vaule is 'Backup-vault'." + } + }, + "omsRecoveryVaultRegion": { + "type": "string", + "metadata": { + "description": "Location of the Backup Vault" + } + } + }, + "variables": { + "backupFabric": "Azure", + "backupPolicy": "DefaultPolicy", + "v2VmType": "Microsoft.Compute/virtualMachines", + "v2VmContainer": "iaasvmcontainer;iaasvmcontainerv2;", + "v2Vm": "vm;iaasvmcontainerv2;" + }, + "resources": [ + { + "name": "[concat(parameters('omsRecoveryVaultName'), '/', variables('backupFabric'), '/', variables('v2VmContainer'), concat(parameters('vmRgName'),';',parameters('vmNameSuffix'), 'VM',copyIndex()), '/', variables('v2Vm'), concat(parameters('vmRgName'),';',parameters('vmNameSuffix'),'VM',copyIndex()))]", + "apiVersion": "2016-12-01", + "location": "[parameters('omsRecoveryVaultRegion')]", + "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", + "copy": { + "name": "iaasBackupCopy", + "count": "[parameters('instanceCount')]" + }, + "properties": { + "protectedItemType": "[variables('v2VmType')]", + "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies',parameters('omsRecoveryVaultName'),variables('backupPolicy'))]", + "sourceResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('vmRgName'), '/providers/Microsoft.Compute/virtualMachines/', parameters('vmNameSuffix'), 'VM', copyIndex())]" + } + } + ] } diff --git a/azmgmt-demo/nestedtemplates/managedVms.json b/azmgmt-demo/nestedtemplates/managedVms.json index 752130582615..0887c901f873 100644 --- a/azmgmt-demo/nestedtemplates/managedVms.json +++ b/azmgmt-demo/nestedtemplates/managedVms.json @@ -1,408 +1,415 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "instanceCount": { - "type": "int", - "defaultValue": 2, - "maxValue": 10, - "metadata": { - "description": "Specify the number of VMs to create" - } - }, - "automationAccountName": { - "type": "string", - "metadata": { - "description": "Azure Automation account name" - } - }, - "vmNamePrefix": { - "type": "string", - "defaultValue": "VM", - "metadata": { - "description": "Assing a prefix for the VMs you will create" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "instanceCount": { + "type": "int", + "defaultValue": 2, + "maxValue": 10, + "metadata": { + "description": "Specify the number of VMs to create" + } + }, + "automationAccountName": { + "type": "string", + "metadata": { + "description": "Azure Automation account name" + } + }, + "vmNamePrefix": { + "type": "string", + "defaultValue": "VM", + "metadata": { + "description": "Assing a prefix for the VMs you will create" + } + }, + "platform": { + "type": "string", + "defaultValue": "WinSrv", + "allowedValues": [ + "WinSrv", + "Linux" + ], + "metadata": { + "description": "Select the OS type to deploy" + } + }, + "username": { + "type": "string", + "defaultValue": "azureadmin", + "metadata": { + "description": "User name for the OS." + } + }, + "pwdOrSsh": { + "type": "securestring", + "metadata": { + "description": "Provide pwd if WinSrv, SSH if Linux." + } + }, + "omsResourceGroup": { + "type": "string", + "metadata": { + "description": "Specify name of Resource Group containing the mgmt services" + } + }, + "omsWorkspaceName": { + "type": "string", + "metadata": { + "description": "Specify the name of your OMS workspace" + } + }, + "omsRecoveryVaultName": { + "type": "string", + "metadata": { + "description": "Name of Recovery Vault" + } + }, + "omsRecoveryVaultRegion": { + "type": "string", + "metadata": { + "description": "Recovery Vault region" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "availabilitySetName": "vmAvSet", + "vNetName": "managedVnet", + "vNetAddressPrefix": "192.168.0.0/16", + "subnetName": "subnet01", + "subnetAddressPrefix": "192.168.0.0/24", + "vNetId": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNetName'))]", + "subnetRef": "[concat(variables('vNetId'),'/subnets/', variables('subnetName'))]", + "windowsOffer": "WindowsServer", + "windowsSku": "2016-Datacenter", + "windowsPublisher": "MicrosoftWindowsServer", + "linuxOffer": "UbuntuServer", + "linuxSku": "12.04.5-LTS", + "linuxPublisher": "Canonical", + "windowsMgmtType": "MicrosoftMonitoringAgent", + "windowsMgmtVersion": "1.0", + "linuxMgmtType": "OmsAgentForLinux", + "linuxMgmtVersion": "1.4", + "modulesUrl": "[uri(deployment().properties.templateLink.uri, 'scripts/UpdateLCMforAAPull.zip')]", + "configurationFunction": "UpdateLCMforAAPull.ps1\\ConfigureLCMforAAPull", + "configurationMode": "ApplyAndMonitor", + "configurationModeFrequencyMins": 15, + "refreshFrequencyMins": 30, + "rebootNodeIfNeeded": true, + "actionAfterReboot": "ContinueConfiguration", + "allowModuleOverwrite": true, + "configName": "OMSSERVICE.localhost" + }, + "resources": [ + { + "apiVersion": "2017-06-01", + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2017-04-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(parameters('vmNamePrefix'), 'IP', copyIndex())]", + "location": "[parameters('location')]", + "copy": { + "name": "[concat(parameters('vmNamePrefix'), 'IP')]", + "count": "[parameters('instancecount')]" + }, + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[toLower(concat(parameters('vmNamePrefix'), 'VM', copyIndex()))]" + } + } + }, + { + "apiVersion": "2017-04-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('vNetName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vNetAddressPrefix')]" + ] }, - "platform": { - "type": "string", - "defaultValue": "WinSrv", - "allowedValues": [ - "WinSrv", - "Linux" - ], - "metadata": { - "description": "Select the OS type to deploy" + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "[variables('subnetAddressPrefix')]" } - }, - "username": { - "type": "string", - "defaultValue": "azureadmin", - "metadata": { - "description": "User name for the OS." + } + ] + } + }, + { + "apiVersion": "2017-04-01", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(parameters('vmNamePrefix'), 'nic', copyIndex())]", + "location": "[parameters('location')]", + "copy": { + "name": "[concat(parameters('vmNamePrefix'), 'nic')]", + "count": "[parameters('instanceCount')]" + }, + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/', parameters('vmNamePrefix'), 'IP', copyIndex())]", + "[concat('Microsoft.Network/virtualNetworks/', variables('vNetName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmNamePrefix'), 'IP', copyIndex()))]" + }, + "subnet": { + "id": "[variables('subnetRef')]" + } } + } + ] + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "apiVersion": "2017-03-30", + "name": "[variables('availabilitySetName')]", + "location": "[parameters('location')]", + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 3 + }, + "sku": { + "name": "Aligned" + } + }, + { + "apiVersion": "2017-03-30", + "type": "Microsoft.Compute/virtualMachines", + "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex())]", + "location": "[parameters('location')]", + "copy": { + "name": "[concat(parameters('vmNamePrefix'))]", + "count": "[parameters('instanceCount')]" + }, + "dependsOn": [ + "[concat('Microsoft.Network/networkinterfaces/', parameters('vmNamePrefix'), 'nic', copyIndex())]", + "[resourceId('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]" + ], + "properties": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]" }, - "pwdOrSsh": { - "type": "securestring", - "metadata": { - "description": "Provide pwd if WinSrv, SSH if Linux." - } + "hardwareprofile": { + "vmsize": "Standard_DS1_v2" }, - "omsResourceGroup": { - "type": "string", - "metadata": { - "description": "Specify name of Resource Group containing the mgmt services" - } + "osProfile": { + "computerName": "[concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex())]", + "adminusername": "[parameters('username')]", + "adminpassword": "[parameters('pwdOrSsh')]" }, - "omsWorkspaceName": { - "type": "string", - "metadata": { - "description": "Specify the name of your OMS workspace" - } + "storageProfile": { + "imageReference": { + "publisher": "[if(equals(parameters('platform'), 'WinSrv'), variables('windowsPublisher'), variables('linuxPublisher'))]", + "offer": "[if(equals(parameters('platform'), 'WinSrv'), variables('windowsOffer'), variables('linuxOffer'))]", + "version": "latest", + "sku": "[if(equals(parameters('platform'), 'WinSrv'), variables('windowsSku'), variables('linuxSku'))]" + }, + "osdisk": { + "name": "[concat(parameters('platform'), '-osDisk', copyIndex())]", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "caching": "ReadWrite" + } }, - "omsRecoveryVaultName": { - "type": "string", - "metadata": { - "description": "Name of Recovery Vault" + "networkprofile": { + "networkinterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkinterfaces', concat(parameters('vmNamePrefix'),'nic', copyIndex()))]" } + ] + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "apiVersion": "2017-03-30", + "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex(), '/OMS')]", + "location": "[parameters('location')]", + "copy": { + "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), 'OMS')]", + "count": "[parameters('instanceCount')]" + }, + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('vmNamePrefix'), parameters('platform'), copyIndex())]" + ], + "properties": { + "publisher": "Microsoft.EnterpriseCloud.Monitoring", + "type": "[if(equals(parameters('platform'), 'WinSrv'), variables('windowsMgmtType'), variables('linuxMgmtType'))]", + "typeHandlerVersion": "[if(equals(parameters('platform'), 'WinSrv'), variables('windowsMgmtVersion'), variables('linuxMgmtVersion'))]", + "autoUpgradeMinorVersion": true, + "settings": { + "workspaceId": "[reference(resourceId(parameters('omsResourceGroup'), 'Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')), '2015-11-01-preview').customerId]", + "azureResourceId": "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex()))]" }, - "omsRecoveryVaultRegion": { - "type": "string", - "metadata": { - "description": "Recovery Vault region" - } + "protectedSettings": { + "workspaceKey": "[listKeys(resourceId(parameters('omsResourceGroup'),'Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')), '2015-11-01-preview').primarySharedKey]" } + } }, - "variables": { - "availabilitySetName": "vmAvSet", - "vNetName": "managedVnet", - "vNetAddressPrefix": "192.168.0.0/16", - "subnetName": "subnet01", - "subnetAddressPrefix": "192.168.0.0/24", - "vNetId": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNetName'))]", - "subnetRef": "[concat(variables('vNetId'),'/subnets/', variables('subnetName'))]", - "windowsOffer": "WindowsServer", - "windowsSku": "2016-Datacenter", - "windowsPublisher": "MicrosoftWindowsServer", - "linuxOffer": "UbuntuServer", - "linuxSku": "12.04.5-LTS", - "linuxPublisher": "Canonical", - "windowsMgmtType": "MicrosoftMonitoringAgent", - "windowsMgmtVersion": "1.0", - "linuxMgmtType": "OmsAgentForLinux", - "linuxMgmtVersion": "1.4", - "modulesUrl": "[uri(deployment().properties.templateLink.uri, 'scripts/UpdateLCMforAAPull.zip')]", - "configurationFunction": "UpdateLCMforAAPull.ps1\\ConfigureLCMforAAPull", - "configurationMode": "ApplyAndMonitor", - "configurationModeFrequencyMins": 15, - "refreshFrequencyMins": 30, - "rebootNodeIfNeeded": true, - "actionAfterReboot": "ContinueConfiguration", - "allowModuleOverwrite": true, - "configName": "OMSSERVICE.localhost" + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex(), '/ServiceMap')]", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "copy": { + "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), 'ServiceMap')]", + "count": "[parameters('instanceCount')]" + }, + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('vmNamePrefix'), parameters('platform'), copyIndex(), '/extensions/', '/OMS')]" + ], + "properties": { + "publisher": "Microsoft.Azure.Monitoring.DependencyAgent", + "type": "[if(equals(parameters('platform'), 'WinSrv'), 'DependencyAgentWindows', 'DependencyAgentLinux')]", + "typeHandlerVersion": "9.1", + "autoUpgradeMinorVersion": true + } }, - "resources": [ - { - "apiVersion": "2017-06-01", - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard_LRS" + { + "condition": "[equals(parameters('platform'), 'WinSrv')]", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex(), '/DSC')]", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "copy": { + "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), 'DSC')]", + "count": "[parameters('instanceCount')]" + }, + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('vmNamePrefix'), parameters('platform'), copyIndex())]" + ], + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.19", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "Items": { + "registrationKeyPrivate": "[listKeys(resourceId(parameters('omsResourceGroup'), 'Microsoft.Automation/automationAccounts/', parameters('automationAccountName')), '2015-01-01-preview').Keys[0].value]" + } + }, + "settings": { + "ModulesUrl": "[variables('modulesUrl')]", + "SasToken": "", + "ConfigurationFunction": "[variables('configurationFunction')]", + "Properties": [ + { + "Name": "RegistrationKey", + "Value": { + "UserName": "PLACEHOLDER_DONOTUSE", + "Password": "PrivateSettingsRef:registrationKeyPrivate" + }, + "TypeName": "System.Management.Automation.PSCredential" }, - "kind": "Storage", - "properties": {} - }, - { - "apiVersion": "2017-04-01", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[concat(parameters('vmNamePrefix'), 'IP', copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "[concat(parameters('vmNamePrefix'), 'IP')]", - "count": "[parameters('instancecount')]" + { + "Name": "RegistrationUrl", + "Value": "[reference(resourceId(parameters('omsResourceGroup'), 'Microsoft.Automation/automationAccounts/', parameters('automationAccountName')), '2015-01-01-preview').registrationUrl]", + "TypeName": "System.String" }, - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[toLower(concat(parameters('vmNamePrefix'), 'VM', copyIndex()))]" - } - } - }, - { - "apiVersion": "2017-04-01", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('vNetName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('vNetAddressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetAddressPrefix')]" - } - } - ] - } - }, - { - "apiVersion": "2017-04-01", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(parameters('vmNamePrefix'), 'nic', copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "[concat(parameters('vmNamePrefix'), 'nic')]", - "count": "[parameters('instanceCount')]" + { + "Name": "NodeConfigurationName", + "Value": "[variables('configName')]", + "TypeName": "System.String" }, - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', parameters('vmNamePrefix'), 'IP', copyIndex())]", - "[concat('Microsoft.Network/virtualNetworks/', variables('vNetName'))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmNamePrefix'), 'IP', copyIndex()))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ] - } - }, - { - "type": "Microsoft.Compute/availabilitySets", - "apiVersion": "2017-03-30", - "name": "[variables('availabilitySetName')]", - "location": "[resourceGroup().location]", - "properties": { - "platformFaultDomainCount": 2, - "platformUpdateDomainCount": 3 + { + "Name": "ConfigurationMode", + "Value": "[variables('configurationMode')]", + "TypeName": "System.String" }, - "sku": { - "name": "Aligned" - } - }, - { - "apiVersion": "2017-03-30", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "[concat(parameters('vmNamePrefix'))]", - "count": "[parameters('instanceCount')]" + { + "Name": "ConfigurationModeFrequencyMins", + "Value": "[variables('configurationModeFrequencyMins')]", + "TypeName": "System.Int32" }, - "dependsOn": [ - "[concat('Microsoft.Network/networkinterfaces/', parameters('vmNamePrefix'), 'nic', copyIndex())]", - "[resourceId('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]" - ], - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]" - }, - "hardwareprofile": { - "vmsize": "Standard_DS1_v2" - }, - "osProfile": { - "computerName": "[concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex())]", - "adminusername": "[parameters('username')]", - "adminpassword": "[parameters('pwdOrSsh')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[if(equals(parameters('platform'), 'WinSrv'), variables('windowsPublisher'), variables('linuxPublisher'))]", - "offer": "[if(equals(parameters('platform'), 'WinSrv'), variables('windowsOffer'), variables('linuxOffer'))]", - "version": "latest", - "sku": "[if(equals(parameters('platform'), 'WinSrv'), variables('windowsSku'), variables('linuxSku'))]" - }, - "osdisk": { - "name": "[concat(parameters('platform'), '-osDisk', copyIndex())]", - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "Standard_LRS" - }, - "caching": "ReadWrite" - } - }, - "networkprofile": { - "networkinterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkinterfaces', concat(parameters('vmNamePrefix'),'nic', copyIndex()))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "apiVersion": "2017-03-30", - "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex(), '/OMS')]", - "location": "[resourceGroup().location]", - "copy": { - "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), 'OMS')]", - "count": "[parameters('instanceCount')]" + { + "Name": "RefreshFrequencyMins", + "Value": "[variables('refreshFrequencyMins')]", + "TypeName": "System.Int32" }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('vmNamePrefix'), parameters('platform'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.EnterpriseCloud.Monitoring", - "type": "[if(equals(parameters('platform'), 'WinSrv'), variables('windowsMgmtType'), variables('linuxMgmtType'))]", - "typeHandlerVersion": "[if(equals(parameters('platform'), 'WinSrv'), variables('windowsMgmtVersion'), variables('linuxMgmtVersion'))]", - "autoUpgradeMinorVersion": true, - "settings": { - "workspaceId": "[reference(resourceId(parameters('omsResourceGroup'), 'Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')), '2015-11-01-preview').customerId]", - "azureResourceId": "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex()))]" - }, - "protectedSettings": { - "workspaceKey": "[listKeys(resourceId(parameters('omsResourceGroup'),'Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')), '2015-11-01-preview').primarySharedKey]" - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex(), '/ServiceMap')]", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "copy": { - "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), 'ServiceMap')]", - "count": "[parameters('instanceCount')]" + { + "Name": "RebootNodeIfNeeded", + "Value": "[variables('rebootNodeIfNeeded')]", + "TypeName": "System.Boolean" }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('vmNamePrefix'), parameters('platform'), copyIndex(), '/extensions/', '/OMS')]" - ], - "properties": { - "publisher": "Microsoft.Azure.Monitoring.DependencyAgent", - "type": "[if(equals(parameters('platform'), 'WinSrv'), 'DependencyAgentWindows', 'DependencyAgentLinux')]", - "typeHandlerVersion": "9.1", - "autoUpgradeMinorVersion": true - } - }, - { - "condition": "[equals(parameters('platform'), 'WinSrv')]", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex(), '/DSC')]", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "copy": { - "name": "[concat(parameters('vmNamePrefix'), parameters('platform'), 'DSC')]", - "count": "[parameters('instanceCount')]" + { + "Name": "ActionAfterReboot", + "Value": "[variables('actionAfterReboot')]", + "TypeName": "System.String" }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('vmNamePrefix'), parameters('platform'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.Powershell", - "type": "DSC", - "typeHandlerVersion": "2.19", - "autoUpgradeMinorVersion": true, - "protectedSettings": { - "Items": { - "registrationKeyPrivate": "[listKeys(resourceId(parameters('omsResourceGroup'), 'Microsoft.Automation/automationAccounts/', parameters('automationAccountName')), '2015-01-01-preview').Keys[0].value]" - } - }, - "settings": { - "ModulesUrl": "[variables('modulesUrl')]", - "SasToken": "", - "ConfigurationFunction": "[variables('configurationFunction')]", - "Properties": [ - { - "Name": "RegistrationKey", - "Value": { - "UserName": "PLACEHOLDER_DONOTUSE", - "Password": "PrivateSettingsRef:registrationKeyPrivate" - }, - "TypeName": "System.Management.Automation.PSCredential" - }, - { - "Name": "RegistrationUrl", - "Value": "[reference(resourceId(parameters('omsResourceGroup'), 'Microsoft.Automation/automationAccounts/', parameters('automationAccountName')), '2015-01-01-preview').registrationUrl]", - "TypeName": "System.String" - }, - { - "Name": "NodeConfigurationName", - "Value": "[variables('configName')]", - "TypeName": "System.String" - }, - { - "Name": "ConfigurationMode", - "Value": "[variables('configurationMode')]", - "TypeName": "System.String" - }, - { - "Name": "ConfigurationModeFrequencyMins", - "Value": "[variables('configurationModeFrequencyMins')]", - "TypeName": "System.Int32" - }, - { - "Name": "RefreshFrequencyMins", - "Value": "[variables('refreshFrequencyMins')]", - "TypeName": "System.Int32" - }, - { - "Name": "RebootNodeIfNeeded", - "Value": "[variables('rebootNodeIfNeeded')]", - "TypeName": "System.Boolean" - }, - { - "Name": "ActionAfterReboot", - "Value": "[variables('actionAfterReboot')]", - "TypeName": "System.String" - }, - { - "Name": "AllowModuleOverwrite", - "Value": "[variables('allowModuleOverwrite')]", - "TypeName": "System.Boolean" - } - ] - } + { + "Name": "AllowModuleOverwrite", + "Value": "[variables('allowModuleOverwrite')]", + "TypeName": "System.Boolean" } + ] + } + } + }, + { + "apiVersion": "2017-05-10", + "type": "Microsoft.Resources/deployments", + "resourceGroup": "[parameters('omsResourceGroup')]", + "name": "enableBackup", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('vmNamePrefix'), parameters('platform'), '0', '/extensions/', 'OMS')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[uri(deployment().properties.templateLink.uri, 'managedVmsBackup.json')]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2017-05-10", - "type": "Microsoft.Resources/deployments", - "resourceGroup": "[parameters('omsResourceGroup')]", - "name": "enableBackup", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('vmNamePrefix'), parameters('platform'), '0', '/extensions/', 'OMS')]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[uri(deployment().properties.templateLink.uri, 'managedVmsBackup.json')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "instanceCount": { - "value": "[parameters('instanceCount')]" - }, - "vmNamePrefix": { - "value": "[parameters('vmNamePrefix')]" - }, - "vmRgName": { - "value": "[resourceGroup().name]" - }, - "omsRecoveryVaultName": { - "value": "[parameters('omsRecoveryVaultName')]" - }, - "omsRecoveryVaultRegion": { - "value": "[parameters('omsRecoveryVaultRegion')]" - }, - "platform": { - "value": "[parameters('platform')]" - } - } - } + "parameters": { + "instanceCount": { + "value": "[parameters('instanceCount')]" + }, + "vmNamePrefix": { + "value": "[parameters('vmNamePrefix')]" + }, + "vmRgName": { + "value": "[resourceGroup().name]" + }, + "omsRecoveryVaultName": { + "value": "[parameters('omsRecoveryVaultName')]" + }, + "omsRecoveryVaultRegion": { + "value": "[parameters('omsRecoveryVaultRegion')]" + }, + "platform": { + "value": "[parameters('platform')]" + } } - ], - "outputs": {} -} \ No newline at end of file + } + } + ], + "outputs": {} +} diff --git a/azmgmt-demo/nestedtemplates/managedVmsBackup.json b/azmgmt-demo/nestedtemplates/managedVmsBackup.json index 1a64b75a9f36..f86b39dbf242 100644 --- a/azmgmt-demo/nestedtemplates/managedVmsBackup.json +++ b/azmgmt-demo/nestedtemplates/managedVmsBackup.json @@ -1,64 +1,64 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "instanceCount": { - "type": "int" - }, - "vmNamePrefix": { - "type": "string", - "metadata": { - "description": "Name of Azure Virtual Machines" - } - }, - "vmRgName": { - "type": "string", - "metadata": { - "description": "Resource group containing the virtual machines." - } - }, - "omsRecoveryVaultName": { - "type": "string", - "metadata": { - "description": "Recovery services vault name where the VMs will be backed up to. The default vaule is 'Backup-vault'." - } - }, - "omsRecoveryVaultRegion": { - "type": "string", - "metadata": { - "description": "Location of the Backup Vault" - } - }, - "platform": { - "type": "string", - "metadata": { - "description": "Specify OS platform" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "instanceCount": { + "type": "int" }, - "variables": { - "backupFabric": "Azure", - "backupPolicy": "DefaultPolicy", - "v2VmType": "Microsoft.Compute/virtualMachines", - "v2VmContainer": "iaasvmcontainer;iaasvmcontainerv2;", - "v2Vm": "vm;iaasvmcontainerv2;" + "vmNamePrefix": { + "type": "string", + "metadata": { + "description": "Name of Azure Virtual Machines" + } }, - "resources": [ - { - "name": "[concat(parameters('omsRecoveryVaultName'), '/', variables('backupFabric'), '/', variables('v2VmContainer'), concat(parameters('vmRgName'),';',parameters('vmNamePrefix'), parameters('platform'),copyIndex()), '/', variables('v2Vm'), concat(parameters('vmRgName'),';',parameters('vmNamePrefix'), parameters('platform'), copyIndex()))]", - "apiVersion": "2016-12-01", - "location": "[parameters('omsRecoveryVaultRegion')]", - "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", - "copy": { - "name": "iaasBackupCopy", - "count": "[parameters('instanceCount')]" - }, - "properties": { - "protectedItemType": "[variables('v2VmType')]", - "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies',parameters('omsRecoveryVaultName'),variables('backupPolicy'))]", - "sourceResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('vmRgName'), '/providers/Microsoft.Compute/virtualMachines/', parameters('vmNamePrefix'), parameters('platform'), copyIndex())]" - } - } - ], - "outputs": {} -} \ No newline at end of file + "vmRgName": { + "type": "string", + "metadata": { + "description": "Resource group containing the virtual machines." + } + }, + "omsRecoveryVaultName": { + "type": "string", + "metadata": { + "description": "Recovery services vault name where the VMs will be backed up to. The default vaule is 'Backup-vault'." + } + }, + "omsRecoveryVaultRegion": { + "type": "string", + "metadata": { + "description": "Location of the Backup Vault" + } + }, + "platform": { + "type": "string", + "metadata": { + "description": "Specify OS platform" + } + } + }, + "variables": { + "backupFabric": "Azure", + "backupPolicy": "DefaultPolicy", + "v2VmType": "Microsoft.Compute/virtualMachines", + "v2VmContainer": "iaasvmcontainer;iaasvmcontainerv2;", + "v2Vm": "vm;iaasvmcontainerv2;" + }, + "resources": [ + { + "name": "[concat(parameters('omsRecoveryVaultName'), '/', variables('backupFabric'), '/', variables('v2VmContainer'), concat(parameters('vmRgName'),';',parameters('vmNamePrefix'), parameters('platform'),copyIndex()), '/', variables('v2Vm'), concat(parameters('vmRgName'),';',parameters('vmNamePrefix'), parameters('platform'), copyIndex()))]", + "apiVersion": "2016-12-01", + "location": "[parameters('omsRecoveryVaultRegion')]", + "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", + "copy": { + "name": "iaasBackupCopy", + "count": "[parameters('instanceCount')]" + }, + "properties": { + "protectedItemType": "[variables('v2VmType')]", + "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies',parameters('omsRecoveryVaultName'),variables('backupPolicy'))]", + "sourceResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('vmRgName'), '/providers/Microsoft.Compute/virtualMachines/', parameters('vmNamePrefix'), parameters('platform'), copyIndex())]" + } + } + ], + "outputs": {} +} diff --git a/azure-governance-operations-automation/azuredeploy.json b/azure-governance-operations-automation/azuredeploy.json index 5d6a3d5dc79f..79fda8f3ccce 100644 --- a/azure-governance-operations-automation/azuredeploy.json +++ b/azure-governance-operations-automation/azuredeploy.json @@ -31,7 +31,6 @@ "description": "Describes plan's instance count" } }, - "sqlAdministratorLogin": { "type": "string", "defaultValue": "cloudwiseuser", @@ -45,7 +44,6 @@ "description": "The password to use for the database server administrator." } }, - "omsWorkspaceName": { "type": "string", "defaultValue": "CloudWiseOMSWorkspace", @@ -86,7 +84,6 @@ "description": "Location of the OMS regions." } }, - "_artifactsLocation": { "type": "string", "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/azure-governance-operations-automation", @@ -100,13 +97,18 @@ "metadata": { "description": "Reserved for deploying using Visual Studio. Please keep it as an empty string" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "packageURI": "https://msignite2016stg.blob.core.windows.net/cloudwise/package.zip", - "WebAppDeployPackageFolder": "ISVDemoUsage", - "WebAppDeployPackageFileName": "package.zip", "hostingPlanName": "[concat('CloudWiseHostingplan-', uniqueString(resourceGroup().id))]", "webSiteName": "[concat('CloudWise', uniqueString(resourceGroup().id))]", "sqlserverName": "[concat('sqlcloudwise', uniqueString(resourceGroup().id))]", @@ -117,10 +119,8 @@ "sqlRequestedServiceObjectiveName": "Basic", "insightsName": "[concat(variables('webSiteName'),'insights')]", "omsWorkspaceName": "[concat(parameters('omsWorkspaceName'), uniqueString(resourceGroup().id, deployment().name))]", - "OMSWebAppsRunBookAndDashboardTemplateFolder": "nested/AutomationRunbooksOMSDashboard", "OMSWebAppsRunBookAndDashboardTemplateFileName": "OMSAutomationRunbooksDashboard.json", - "OMSCommonTemplateFolder": "nested/OMSCommon", "OMSCommonTemplateFileName": "OMSCommon.json", "quickstartTags": { @@ -132,7 +132,7 @@ { "name": "[variables('sqlserverName')]", "type": "Microsoft.Sql/servers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "SqlServer", "quickstartName": "[variables('quickstartTags').name]" @@ -146,7 +146,7 @@ { "name": "[variables('sqlDatabaseName')]", "type": "databases", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01-preview", "dependsOn": [ "[concat('Microsoft.Sql/servers/', variables('sqlServerName'))]" @@ -164,7 +164,7 @@ "apiVersion": "2015-08-01", "name": "[variables('hostingPlanName')]", "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "HostingPlan", "quickstartName": "[variables('quickstartTags').name]" @@ -181,7 +181,7 @@ "apiVersion": "2015-08-01", "name": "[variables('webSiteName')]", "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('hostingPlanName')]" ], @@ -209,7 +209,6 @@ }, "properties": { "netFrameworkVersion": "v4.6" - } }, { @@ -234,7 +233,7 @@ { "name": "MSDeploy", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-08-01", "dependsOn": [ "[concat('Microsoft.Web/sites/', variables('Websitename'))]" @@ -252,7 +251,7 @@ { "name": "[concat(variables('hostingPlanName'), '-', resourceGroup().name)]", "type": "Microsoft.Insights/autoscalesettings", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01", "dependsOn": [ "[concat('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]" @@ -319,7 +318,7 @@ { "name": "[concat('CPUHigh ', variables('hostingPlanName'))]", "type": "Microsoft.Insights/alertrules", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01", "dependsOn": [ "[concat('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]" @@ -354,7 +353,7 @@ { "name": "[concat('LongHttpQueue ', variables('hostingPlanName'))]", "type": "Microsoft.Insights/alertrules", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01", "dependsOn": [ "[concat('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]" @@ -389,7 +388,7 @@ { "name": "[concat('ServerErrors ', variables('insightsName'))]", "type": "Microsoft.Insights/alertrules", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01", "dependsOn": [ "[concat('Microsoft.Web/sites/', variables('webSiteName'))]" @@ -424,7 +423,7 @@ { "name": "[concat('ForbiddenRequests ', variables('insightsName'))]", "type": "Microsoft.Insights/alertrules", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01", "dependsOn": [ "[concat('Microsoft.Web/sites/', variables('webSiteName'))]" @@ -534,7 +533,9 @@ "_artifactsLocation": { "value": "[concat(parameters('_artifactsLocation'), '/', variables('OMSWebAppsRunBookAndDashboardTemplateFolder'))]" }, - "_artifactsLocationSasToken": { "value": "[parameters('_artifactsLocationSasToken')]" }, + "_artifactsLocationSasToken": { + "value": "[parameters('_artifactsLocationSasToken')]" + }, "quickstartTags": { "value": "[variables('quickstartTags')]" } diff --git a/azure-governance-operations-automation/nested/AutomationRunbooksOMSDashboard/OMSAutomationRunbooksDashboard.json b/azure-governance-operations-automation/nested/AutomationRunbooksOMSDashboard/OMSAutomationRunbooksDashboard.json index 5db574e89673..5b3976890929 100644 --- a/azure-governance-operations-automation/nested/AutomationRunbooksOMSDashboard/OMSAutomationRunbooksDashboard.json +++ b/azure-governance-operations-automation/nested/AutomationRunbooksOMSDashboard/OMSAutomationRunbooksDashboard.json @@ -61,9 +61,7 @@ } }, "variables": { - "laApiVersion": "2015-11-01-preview", "aaApiVersion": "2015-10-31", - "omsModuleName": "OMSIngestionAPI", "i-webrunbookDescription": "Authenticates to Azure and ingests all the WebApps metrics into an OMS wokrspace specified", "i-sqlrunbookDescription": "Authenticates to Azure and ingests all the SQL Database metrics into an OMS wokrspace specified", "s-runbookDescription": "Creates the schedules for the ingestion runbook to run every ten minutes on the hour", @@ -73,8 +71,6 @@ "webIngestionScriptUri": "[concat(parameters('_artifactsLocation'),'/scripts/webappazureIngestion.ps1')]", "sqlIngestionScriptUri": "[concat(parameters('_artifactsLocation'),'/scripts/sqlazureIngestion.ps1')]", "scheduleScriptUri": "[concat(parameters('_artifactsLocation'),'/scripts/scheduleIngestion.ps1')]", - "scheduleRunbookTemplateFileName": "[concat(parameters('_artifactsLocation'),'/deployRunbookOnSchedule.json')]", - "runonceJobSchedulerName": "runoncescheduleingestion", "sku": "Basic", "psModules": { "AzureRmProfile": { @@ -344,4 +340,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/azure-governance-operations-automation/nested/AutomationRunbooksOMSDashboard/deployRunbookOnSchedule.json b/azure-governance-operations-automation/nested/AutomationRunbooksOMSDashboard/deployRunbookOnSchedule.json index 3ec7280da330..97c4dddd2b7b 100644 --- a/azure-governance-operations-automation/nested/AutomationRunbooksOMSDashboard/deployRunbookOnSchedule.json +++ b/azure-governance-operations-automation/nested/AutomationRunbooksOMSDashboard/deployRunbookOnSchedule.json @@ -56,9 +56,7 @@ "type": "object" } }, - "variables": { - - }, + "variables": {}, "resources": [ { "name": "[concat(parameters('accountName'), '/', parameters('scheduleName'))]", @@ -73,7 +71,6 @@ "frequency": "[parameters('frequency')]" } }, - { "name": "[concat(parameters('accountName'), '/', parameters('jobScheduleGuid'))]", "type": "microsoft.automation/automationAccounts/jobSchedules", @@ -82,7 +79,7 @@ "[concat('Microsoft.Automation/automationAccounts/', parameters('accountName'), '/schedules/', parameters('scheduleName'))]" ], "tags": { - "quickstartName": "[parameters('quickstartTags').name]" + "quickstartName": "[parameters('quickstartTags').name]" }, "properties": { "schedule": { @@ -93,9 +90,6 @@ } } } - - ], - "outputs": { - } -} \ No newline at end of file + "outputs": {} +} diff --git a/azure-governance-operations-automation/nested/OMSCommon/OMSCommon.json b/azure-governance-operations-automation/nested/OMSCommon/OMSCommon.json index 31856ba95d2b..ce96a1cd17b2 100644 --- a/azure-governance-operations-automation/nested/OMSCommon/OMSCommon.json +++ b/azure-governance-operations-automation/nested/OMSCommon/OMSCommon.json @@ -32,9 +32,7 @@ "type": "object" } }, - "variables": { - - }, + "variables": {}, "resources": [ { "apiVersion": "2015-11-01-preview", @@ -42,7 +40,7 @@ "name": "[parameters('workspaceName')]", "location": "[parameters('location')]", "tags": { - "quickstartName": "[parameters('quickstartTags').name]" + "quickstartName": "[parameters('quickstartTags').name]" }, "properties": { "sku": { @@ -51,7 +49,6 @@ } } ], - "outputs": { "sharedKeyOutput": { "value": "[listKeys(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName')), '2015-03-20').primarySharedKey]", @@ -62,4 +59,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/azure-resource-optimization-toolkit/nestedtemplates/Automation.json b/azure-resource-optimization-toolkit/nestedtemplates/Automation.json index 19da846db16e..66f7531530b6 100644 --- a/azure-resource-optimization-toolkit/nestedtemplates/Automation.json +++ b/azure-resource-optimization-toolkit/nestedtemplates/Automation.json @@ -55,13 +55,14 @@ "metadata": { "description": "Internal OMS Log Analytics location Id" } + } }, "variables": { - "AzureRM.Profile": { - "name": "AzureRm.Profile", - "url": "https://devopsgallerystorage.blob.core.windows.net/packages/azurerm.profile.2.8.0.nupkg" - }, + "AzureRM.Profile": { + "name": "AzureRm.Profile", + "url": "https://devopsgallerystorage.blob.core.windows.net/packages/azurerm.profile.2.8.0.nupkg" + }, "psModules": [ { "name": "AzureRM.Compute", @@ -394,7 +395,7 @@ "tags": {}, "properties": { "description": "Starts the bootstrap runbooks", - "expiryTime": "9999-12-31T15:59:00-08:00", + "expiryTime": "9999-12-31T17:59:00-06:00", "isEnabled": true, "interval": null, "frequency": "OneTime" @@ -426,4 +427,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/barracuda-waf-iis/azuredeploy.json b/barracuda-waf-iis/azuredeploy.json index 2b0f44f5884a..0abd26664eea 100644 --- a/barracuda-waf-iis/azuredeploy.json +++ b/barracuda-waf-iis/azuredeploy.json @@ -1,654 +1,645 @@ { - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "adminUsername":{ - "type":"string", - "metadata":{ - "description":"Username for the virtual Machines" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username for the virtual Machines" + } + }, + "adminPassword": { + "type": "securestring", + "minLength": 12, + "metadata": { + "description": "Password for Barracuda WAF Admin Interface and Backend Web Servers(Min Length: 12)" + } + }, + "webVmCount": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "Number of backend Web servers to be deployed" + } + }, + "remoteAllowedCIDR": { + "type": "string", + "minLength": 7, + "defaultValue": "0.0.0.0/0", + "metadata": { + "description": "Enter Public IP CIDR to allow for accessing the deployment.Enter in 0.0.0.0/0 format. You can always modify these later in NSG Settings" + } + }, + "_artifactsLocation": { + "type": "string", + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/barracuda-waf-iis/", + "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.Leave blank if unsure" + }, + "defaultValue": "" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "bwafVmSize": "Standard_D2_v2", + "webVmSize": "Standard_D2_v2", + "storageAccountType": "Standard_GRS", + "bwafStorageAccountName": "[concat('bwafstorage',uniqueString(resourceGroup().id))]", + "webStorageAccountName": "[concat('webstorage',uniqueString(resourceGroup().id))]", + "diagStorageAccountName": "[concat('diagstorage',uniqueString(resourceGroup().id))]", + "virtualNetworkName": "bwaf-vnet", + "webNSGName": "web-NSG", + "bwafNSGName": "bwaf-NSG", + "bwafSubnetName": "bwaf-subnet", + "webSubnetName": "web-subnet", + "lbIPAddressName": "lb-pip", + "lbDnsLabel": "[concat('lbpip',uniqueString(resourceGroup().id))]", + "loadBalancerName": "web-rdp-lb", + "loadBalancerID": "[resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName'))]", + "loadBalancerIPID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('lbIPAddressName'))]", + "frontEndIPConfigID": "[concat(resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName')),'/frontendIPConfigurations/loadBalancerFrontEnd')]", + "bwafAvailSetName": "bwaf-as", + "bwafVmName": "bwaf-vm", + "bwafVmIPAddressName": "bwaf-pip", + "bwafVmDnsLabel": "[concat('bwafpip',uniqueString(resourceGroup().id))]", + "bwafVmNicName": "[concat(variables('bwafVmName'), '-nic')]", + "webAvailSetName": "web-as", + "webVmName": "web-vm", + "webVmNicName": "[concat(variables('webVmName'), '-nic')]", + "webVmSku": "2012-R2-Datacenter", + "webVmPublisher": "MicrosoftWindowsServer", + "webVmOffer": "WindowsServer", + "dscfilename": "webserverconfig.zip", + "webVmExtensionFunction": "webServerConfig.ps1\\WebServerConfig", + "vmStorageAccountContainerName": "vhds", + "OSDiskName": "OSDisk", + "barracudaNetworksTags": { + "type": "object", + "provider": "3285C15D-A16F-479C-8886-67042BCB03A9" + }, + "quickstartTags": { + "type": "object", + "name": "barracuda-waf-iis" + } + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('bwafStorageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store the BWAF VM disks", + "tags": { + "displayName": "BWAF VM Storage Account", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - "adminPassword":{ - "type":"securestring", - "minLength":12, - "metadata":{ - "description":"Password for Barracuda WAF Admin Interface and Backend Web Servers(Min Length: 12)" - } + "sku": { + "name": "[variables('storageAccountType')]" }, - "webVmCount":{ - "type":"int", - "defaultValue":2, - "metadata":{ - "description":"Number of backend Web servers to be deployed" - } + "kind": "Storage", + "properties": {} + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('webStorageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store the Web VM disks", + "tags": { + "displayName": "Web VM Storage Account", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - "remoteAllowedCIDR": { - "type": "string", - "minLength": 7, - "defaultValue": "0.0.0.0/0", - "metadata": { - "description": "Enter Public IP CIDR to allow for accessing the deployment.Enter in 0.0.0.0/0 format. You can always modify these later in NSG Settings" - } - }, - "_artifactsLocation":{ - "type":"string", - "defaultValue":"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/barracuda-waf-iis/", - "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." - } + "sku": { + "name": "[variables('storageAccountType')]" }, - "_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.Leave blank if unsure" - }, - "defaultValue":"" + "kind": "Storage", + "properties": {} + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('diagStorageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store VM diagnostics data", + "tags": { + "displayName": "Diagnostics Storage Account", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('bwafNSGName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": " NSG for BWAF subnet", + "tags": { + "displayName": "BWAF NSG", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" + }, + "properties": { + "securityRules": [ + { + "name": "HTTP-allow", + "properties": { + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "80", + "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", + "destinationAddressPrefix": "10.0.0.0/24", + "access": "Allow", + "priority": 110, + "direction": "Inbound" + } + }, + { + "name": "HTTPS-allow", + "properties": { + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", + "destinationAddressPrefix": "10.0.0.0/24", + "access": "Allow", + "priority": 120, + "direction": "Inbound" + } + }, + { + "name": "AdminPortal-allow", + "properties": { + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "8000", + "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", + "destinationAddressPrefix": "10.0.0.0/24", + "access": "Allow", + "priority": 130, + "direction": "Inbound" + } + } + ] } - }, - "variables":{ - "bwafVmSize":"Standard_D2_v2", - "webVmSize":"Standard_D2_v2", - "storageAccountType":"Standard_GRS", - "bwafStorageAccountName":"[concat('bwafstorage',uniqueString(resourceGroup().id))]", - "webStorageAccountName":"[concat('webstorage',uniqueString(resourceGroup().id))]", - "diagStorageAccountName":"[concat('diagstorage',uniqueString(resourceGroup().id))]", - "virtualNetworkName":"bwaf-vnet", - "webNSGName":"web-NSG", - "bwafNSGName":"bwaf-NSG", - "bwafSubnetName":"bwaf-subnet", - "webSubnetName":"web-subnet", - "lbIPAddressName":"lb-pip", - "lbDnsLabel":"[concat('lbpip',uniqueString(resourceGroup().id))]", - "loadBalancerName":"web-rdp-lb", - "loadBalancerID":"[resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName'))]", - "loadBalancerIPID":"[resourceId('Microsoft.Network/publicIPAddresses',variables('lbIPAddressName'))]", - "frontEndIPConfigID":"[concat(resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName')),'/frontendIPConfigurations/loadBalancerFrontEnd')]", - "bwafAvailSetName":"bwaf-as", - "bwafVmName":"bwaf-vm", - "bwafVmIPAddressName":"bwaf-pip", - "bwafVmDnsLabel":"[concat('bwafpip',uniqueString(resourceGroup().id))]", - "bwafVmNicName":"[concat(variables('bwafVmName'), '-nic')]", - "webAvailSetName":"web-as", - "webVmName":"web-vm", - "webVmNicName":"[concat(variables('webVmName'), '-nic')]", - "webVmSku":"2012-R2-Datacenter", - "webVmPublisher":"MicrosoftWindowsServer", - "webVmOffer":"WindowsServer", - "dscfilename":"webserverconfig.zip", - "webVmExtensionFunction":"webServerConfig.ps1\\WebServerConfig", - "vmStorageAccountContainerName":"vhds", - "OSDiskName":"OSDisk", - "barracudaNetworksTags": { - "type": "object", - "provider": "3285C15D-A16F-479C-8886-67042BCB03A9" + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('webNSGName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": " NSG for Web subnet", + "tags": { + "displayName": "Web NSG", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - "quickstartTags": { - "type": "object", - "name": "barracuda-waf-iis" + "properties": { + "securityRules": [ + { + "name": "RDP-allow", + "properties": { + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "3389", + "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", + "destinationAddressPrefix": "10.0.1.0/24", + "access": "Allow", + "priority": 110, + "direction": "Inbound" + } + } + ] } - }, - "resources":[ - { - "type":"Microsoft.Storage/storageAccounts", - "name":"[variables('bwafStorageAccountName')]", - "apiVersion":"2016-01-01", - "location":"[resourceGroup().location]", - "comments":"Storage account used to store the BWAF VM disks", - "tags":{ - "displayName":"BWAF VM Storage Account", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "sku":{ - "name":"[variables('storageAccountType')]" - }, - "kind":"Storage", - "properties":{ - - } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('bwafVmIPAddressName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": " Public IP used by the BWAF VM", + "tags": { + "displayName": "BWAF Public IP", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - { - "type":"Microsoft.Storage/storageAccounts", - "name":"[variables('webStorageAccountName')]", - "apiVersion":"2016-01-01", - "location":"[resourceGroup().location]", - "comments":"Storage account used to store the Web VM disks", - "tags":{ - "displayName":"Web VM Storage Account", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "sku":{ - "name":"[variables('storageAccountType')]" - }, - "kind":"Storage", - "properties":{ - - } + "properties": { + "publicIPAllocationMethod": "Static", + "idleTimeoutInMinutes": 4, + "dnsSettings": { + "domainNameLabel": "[variables('bwafVmDnsLabel')]" + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('lbIPAddressName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Public IP used by the Load Balancer for RDP into Web Servers", + "tags": { + "displayName": "LB Public IP", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - { - "type":"Microsoft.Storage/storageAccounts", - "name":"[variables('diagStorageAccountName')]", - "apiVersion":"2016-01-01", - "location":"[resourceGroup().location]", - "comments":"Storage account used to store VM diagnostics data", - "tags":{ - "displayName":"Diagnostics Storage Account", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "sku":{ - "name":"Standard_LRS" - }, - "kind":"Storage", - "properties":{ - - } + "properties": { + "publicIPAllocationMethod": "Static", + "idleTimeoutInMinutes": 4, + "dnsSettings": { + "domainNameLabel": "[variables('lbDnsLabel')]" + } + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Bwaf Virtual Network", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - { - "type":"Microsoft.Network/networkSecurityGroups", - "name":"[variables('bwafNSGName')]", - "apiVersion":"2016-03-30", - "location":"[resourceGroup().location]", - "comments":" NSG for BWAF subnet", - "tags":{ - "displayName":"BWAF NSG", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "properties":{ - "securityRules":[ - { - "name":"HTTP-allow", - "properties":{ - "protocol":"Tcp", - "sourcePortRange":"*", - "destinationPortRange":"80", - "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", - "destinationAddressPrefix":"10.0.0.0/24", - "access":"Allow", - "priority":110, - "direction":"Inbound" - } - }, - { - "name":"HTTPS-allow", - "properties":{ - "protocol":"Tcp", - "sourcePortRange":"*", - "destinationPortRange":"443", - "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", - "destinationAddressPrefix":"10.0.0.0/24", - "access":"Allow", - "priority":120, - "direction":"Inbound" - } - }, - { - "name":"AdminPortal-allow", - "properties":{ - "protocol":"Tcp", - "sourcePortRange":"*", - "destinationPortRange":"8000", - "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", - "destinationAddressPrefix":"10.0.0.0/24", - "access":"Allow", - "priority":130, - "direction":"Inbound" - } - } - ] - } + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', variables('webNSGName'))]", + "[concat('Microsoft.Network/networkSecurityGroups/', variables('bwafNSGName'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "subnets": [ + { + "name": "[variables('bwafSubnetName')]", + "properties": { + "addressPrefix": "10.0.0.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('bwafNSGName'))]" + } + } + }, + { + "name": "[variables('webSubnetName')]", + "properties": { + "addressPrefix": "10.0.1.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('webNSGName'))]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "name": "[variables('webAvailSetName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "This is the Availability Set for all Web VMs", + "tags": { + "displayName": "Web Avail Set", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - { - "type":"Microsoft.Network/networkSecurityGroups", - "name":"[variables('webNSGName')]", - "apiVersion":"2016-03-30", - "location":"[resourceGroup().location]", - "comments":" NSG for Web subnet", - "tags":{ - "displayName":"Web NSG", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "properties":{ - "securityRules":[ - { - "name":"RDP-allow", - "properties":{ - "protocol":"Tcp", - "sourcePortRange":"*", - "destinationPortRange":"3389", - "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", - "destinationAddressPrefix":"10.0.1.0/24", - "access":"Allow", - "priority":110, - "direction":"Inbound" - } - } - ] - } + "properties": {} + }, + { + "type": "Microsoft.Compute/availabilitySets", + "name": "[variables('bwafAvailSetName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "This is the Availability Set for BWAF VM", + "tags": { + "displayName": "BWAF Avail Set", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - { - "type":"Microsoft.Network/publicIPAddresses", - "name":"[variables('bwafVmIPAddressName')]", - "apiVersion":"2016-03-30", - "location":"[resourceGroup().location]", - "comments":" Public IP used by the BWAF VM", - "tags":{ - "displayName":"BWAF Public IP", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "properties":{ - "publicIPAllocationMethod":"Static", - "idleTimeoutInMinutes":4, - "dnsSettings":{ - "domainNameLabel":"[variables('bwafVmDnsLabel')]" - } - } + "properties": {} + }, + { + "type": "Microsoft.Network/loadBalancers", + "name": "[variables('loadBalancerName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "This Load Balancer is used to allow RDP access to Web VMs", + "tags": { + "displayName": "Web RDP Load Balancer", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - { - "type":"Microsoft.Network/publicIPAddresses", - "name":"[variables('lbIPAddressName')]", - "apiVersion":"2016-03-30", - "location":"[resourceGroup().location]", - "comments":"Public IP used by the Load Balancer for RDP into Web Servers", - "tags":{ - "displayName":"LB Public IP", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "properties":{ - "publicIPAllocationMethod":"Static", - "idleTimeoutInMinutes":4, - "dnsSettings":{ - "domainNameLabel":"[variables('lbDnsLabel')]" + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/', variables('lbIPAddressName'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "loadBalancerFrontEnd", + "properties": { + "publicIPAddress": { + "id": "[variables('loadBalancerIPID')]" + } } - } - }, - { - "type":"Microsoft.Network/virtualNetworks", - "name":"[variables('virtualNetworkName')]", - "apiVersion":"2016-03-30", - "location":"[resourceGroup().location]", - "comments":"Virtual network for overall solution", - "tags":{ - "displayName":"Bwaf Virtual Network", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "dependsOn":[ - "[concat('Microsoft.Network/networkSecurityGroups/', variables('webNSGName'))]", - "[concat('Microsoft.Network/networkSecurityGroups/', variables('bwafNSGName'))]" - ], - "properties":{ - "addressSpace":{ - "addressPrefixes":[ - "10.0.0.0/16" - ] - }, - "subnets":[ - { - "name":"[variables('bwafSubnetName')]", - "properties":{ - "addressPrefix":"10.0.0.0/24", - "networkSecurityGroup":{ - "id":"[resourceId('Microsoft.Network/networkSecurityGroups', variables('bwafNSGName'))]" - } - } - }, - { - "name":"[variables('webSubnetName')]", - "properties":{ - "addressPrefix":"10.0.1.0/24", - "networkSecurityGroup":{ - "id":"[resourceId('Microsoft.Network/networkSecurityGroups', variables('webNSGName'))]" - } - } - } - ] - } + } + ], + "backendAddressPools": [ + { + "name": "loadBalancerBackEnd" + } + ] + } + }, + { + "type": "Microsoft.Network/loadBalancers/inboundNatRules", + "name": "[concat(variables('loadBalancerName'), '/', 'RDPVM', copyIndex(1))]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "This resource adds all the NAT rules needed to allow RDP access to Web Servers VMs", + "tags": { + "displayName": "LB RDP NAT rules", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - { - "type":"Microsoft.Compute/availabilitySets", - "name":"[variables('webAvailSetName')]", - "apiVersion":"2015-06-15", - "location":"[resourceGroup().location]", - "comments":"This is the Availability Set for all Web VMs", - "tags":{ - "displayName":"Web Avail Set", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "properties":{ - - } + "dependsOn": [ + "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'))]" + ], + "copy": { + "name": "lbNatLoop", + "count": "[parameters('webvmCount')]" }, - { - "type":"Microsoft.Compute/availabilitySets", - "name":"[variables('bwafAvailSetName')]", - "apiVersion":"2015-06-15", - "location":"[resourceGroup().location]", - "comments":"This is the Availability Set for BWAF VM", - "tags":{ - "displayName":"BWAF Avail Set", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "properties":{ - - } + "properties": { + "frontendIPConfiguration": { + "id": "[variables('frontEndIPConfigID')]" + }, + "protocol": "Tcp", + "frontendPort": "[copyIndex(5001)]", + "backendPort": 3389, + "enableFloatingIP": false + } + }, + { + "name": "[concat(variables('webVmNicName'), copyindex(1))]", + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "NICs for Web Servers", + "tags": { + "displayName": "Web VM NICs", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - { - "type":"Microsoft.Network/loadBalancers", - "name":"[variables('loadBalancerName')]", - "apiVersion":"2015-06-15", - "location":"[resourceGroup().location]", - "comments":"This Load Balancer is used to allow RDP access to Web VMs", - "tags":{ - "displayName":"Web RDP Load Balancer", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "dependsOn":[ - "[concat('Microsoft.Network/publicIPAddresses/', variables('lbIPAddressName'))]" - ], - "properties":{ - "frontendIPConfigurations":[ - { - "name":"loadBalancerFrontEnd", - "properties":{ - "publicIPAddress":{ - "id":"[variables('loadBalancerIPID')]" - } - } - } - ], - "backendAddressPools":[ - { - "name":"loadBalancerBackEnd" - } - ] - } + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", + "[concat('Microsoft.Network/loadBalancers/',variables('loadBalancerName'),'/inboundNatRules/', 'RDPVM', copyIndex(1))]" + ], + "copy": { + "name": "WebnicLoop", + "count": "[parameters('webVmCount')]" }, - { - "type":"Microsoft.Network/loadBalancers/inboundNatRules", - "name":"[concat(variables('loadBalancerName'), '/', 'RDPVM', copyIndex(1))]", - "apiVersion":"2016-03-30", - "location":"[resourceGroup().location]", - "comments":"This resource adds all the NAT rules needed to allow RDP access to Web Servers VMs", - "tags":{ - "displayName":"LB RDP NAT rules", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "dependsOn":[ - "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'))]" - ], - "copy":{ - "name":"lbNatLoop", - "count":"[parameters('webvmCount')]" - }, - "properties":{ - "frontendIPConfiguration":{ - "id":"[variables('frontEndIPConfigID')]" - }, - "protocol":"Tcp", - "frontendPort":"[copyIndex(5001)]", - "backendPort":3389, - "enableFloatingIP":false - } + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), '/subnets/', variables('webSubnetName'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[concat(variables('loadBalancerID'), '/backendAddressPools/LoadBalancerBackend')]" + } + ], + "loadBalancerInboundNatRules": [ + { + "id": "[concat(variables('loadBalancerID'),'/inboundNatRules/RDPVM',copyIndex(1))]" + } + ] + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('bwafVmNicName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "NIC for BWAF VM", + "tags": { + "displayName": "BWAF VM NIC", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - { - "name":"[concat(variables('webVmNicName'), copyindex(1))]", - "type":"Microsoft.Network/networkInterfaces", - "apiVersion":"2016-03-30", - "location":"[resourceGroup().location]", - "comments":"NICs for Web Servers", - "tags":{ - "displayName":"Web VM NICs", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "dependsOn":[ - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", - "[concat('Microsoft.Network/loadBalancers/',variables('loadBalancerName'),'/inboundNatRules/', 'RDPVM', copyIndex(1))]" - ], - "copy":{ - "name":"WebnicLoop", - "count":"[parameters('webVmCount')]" - }, - "properties":{ - "ipConfigurations":[ - { - "name":"ipconfig1", - "properties":{ - "privateIPAllocationMethod":"Dynamic", - "subnet":{ - "id":"[concat(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), '/subnets/', variables('webSubnetName'))]" - }, - "loadBalancerBackendAddressPools":[ - { - "id":"[concat(variables('loadBalancerID'), '/backendAddressPools/LoadBalancerBackend')]" - } - ], - "loadBalancerInboundNatRules":[ - { - "id":"[concat(variables('loadBalancerID'),'/inboundNatRules/RDPVM',copyIndex(1))]" - } - ] - } - } - ] - } + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", + "[concat(resourceId('Microsoft.Network/publicIPAddresses', variables('bwafVmIPAddressName')))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[concat(resourceId('Microsoft.Network/publicIPAddresses', variables('bwafVmIPAddressName')))]" + }, + "subnet": { + "id": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), '/subnets/', variables('bwafSubnetName'))]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "name": "[concat(variables('webVmName'), copyindex(1))]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": " Web Server VMs", + "tags": { + "displayName": "Web VMs", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - { - "type":"Microsoft.Network/networkInterfaces", - "name":"[variables('bwafVmNicName')]", - "apiVersion":"2016-03-30", - "location":"[resourceGroup().location]", - "comments":"NIC for BWAF VM", - "tags":{ - "displayName":"BWAF VM NIC", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "dependsOn":[ - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", - "[concat(resourceId('Microsoft.Network/publicIPAddresses', variables('bwafVmIPAddressName')))]" - ], - "properties":{ - "ipConfigurations":[ - { - "name":"ipconfig1", - "properties":{ - "privateIPAllocationMethod":"Dynamic", - "publicIPAddress":{ - "id":"[concat(resourceId('Microsoft.Network/publicIPAddresses', variables('bwafVmIPAddressName')))]" - }, - "subnet":{ - "id":"[concat(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), '/subnets/', variables('bwafSubnetName'))]" - } - } - } - ] - } + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('webStorageAccountName'))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('webVmNicName'), copyindex(1))]", + "[concat('Microsoft.Compute/availabilitySets/', variables('webAvailSetName'))]" + ], + "copy": { + "name": "webSrvMachineLoop", + "count": "[parameters('webVmCount')]" }, - { - "type":"Microsoft.Compute/virtualMachines", - "name":"[concat(variables('webVmName'), copyindex(1))]", - "apiVersion":"2015-06-15", - "location":"[resourceGroup().location]", - "comments":" Web Server VMs", - "tags":{ - "displayName":"Web VMs", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "dependsOn":[ - "[concat('Microsoft.Storage/storageAccounts/', variables('webStorageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('webVmNicName'), copyindex(1))]", - "[concat('Microsoft.Compute/availabilitySets/', variables('webAvailSetName'))]" - ], - "copy":{ - "name":"webSrvMachineLoop", - "count":"[parameters('webVmCount')]" - }, - "properties":{ - "availabilitySet":{ - "id":"[resourceId('Microsoft.Compute/availabilitySets',variables('webAvailSetName'))]" + "properties": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('webAvailSetName'))]" + }, + "hardwareProfile": { + "vmSize": "[variables('webVmSize')]" + }, + "osProfile": { + "computerName": "[concat('webserver',copyindex(1))]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[variables('webVmPublisher')]", + "offer": "[variables('webVmOffer')]", + "sku": "[variables('webVmSku')]", + "version": "latest" + }, + "osDisk": { + "name": "[variables('webVmName')]", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('webStorageAccountName')),'2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/', variables('webVmName'),copyIndex(1),'-',variables('OSDiskName'),'.vhd')]" }, - "hardwareProfile":{ - "vmSize":"[variables('webVmSize')]" - }, - "osProfile":{ - "computerName":"[concat('webserver',copyindex(1))]", - "adminUsername":"[parameters('adminUsername')]", - "adminPassword":"[parameters('adminPassword')]" - }, - "storageProfile":{ - "imageReference":{ - "publisher":"[variables('webVmPublisher')]", - "offer":"[variables('webVmOffer')]", - "sku":"[variables('webVmSku')]", - "version":"latest" - }, - "osDisk":{ - "name":"[variables('webVmName')]", - "vhd":{ - "uri":"[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('webStorageAccountName')),'2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/', variables('webVmName'),copyIndex(1),'-',variables('OSDiskName'),'.vhd')]" - }, - "caching":"ReadWrite", - "createOption":"FromImage" - } - }, - "networkProfile":{ - "networkInterfaces":[ - { - "id":"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('webVmNicName'), copyindex(1)))]" - } - ] - }, - "diagnosticsProfile":{ - "bootDiagnostics":{ - "enabled":"true", - "storageUri":"[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('diagStorageAccountName'))).primaryEndpoints.blob]" - } - } - }, - "resources":[ + "caching": "ReadWrite", + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkInterfaces": [ { - "type":"Microsoft.Compute/virtualMachines/extensions", - "name":"[concat(variables('webVmName'), copyindex(1),'/',concat(variables('webVmName'), copyindex(1),'-web-dsc'))]", - "apiVersion":"2015-06-15", - "location":"[resourceGroup().location]", - "comments":"This VM Extension loops to setup IIS in each Web VMs using DSC", - "tags":{ - "displayName":"Web VM Extensions", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('barracudaNetworksTags').provider]" - }, - "dependsOn":[ - "[concat('Microsoft.Compute/virtualMachines/', variables('webVmName'), copyindex(1))]" - ], - "properties":{ - "publisher":"Microsoft.Powershell", - "type":"DSC", - "typeHandlerVersion":"2.19", - "autoUpgradeMinorVersion":true, - "settings":{ - "modulesUrl":"[concat(parameters('_artifactsLocation'),'scripts/',variables('dscfilename'),parameters('_artifactsLocationSasToken'))]", - "configurationFunction":"[variables('webVmExtensionFunction')]", - "wmfVersion":"4.0", - "Properties":{ - - } - }, - "protectedSettings":{ - - } - } + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('webVmNicName'), copyindex(1)))]" } - ] + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('diagStorageAccountName'))).primaryEndpoints.blob]" + } + } }, - { - "type":"Microsoft.Compute/virtualMachines", - "name":"[variables('bwafVmName')]", - "apiVersion":"2015-06-15", - "location":"[resourceGroup().location]", - "comments":"This is the Barracuda WAF VM", - "tags":{ - "displayName":"BWAF VM", - "quickstartName": "[variables('quickstartTags').name]", + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('webVmName'), copyindex(1),'/',concat(variables('webVmName'), copyindex(1),'-web-dsc'))]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "This VM Extension loops to setup IIS in each Web VMs using DSC", + "tags": { + "displayName": "Web VM Extensions", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('barracudaNetworksTags').provider]" - }, - "dependsOn":[ - "[concat('Microsoft.Storage/storageAccounts/', variables('bwafStorageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('bwafVmNicName'))]", - "[concat('Microsoft.Compute/availabilitySets/', variables('bwafAvailSetName'))]" - ], - "plan":{ - "name":"hourly", - "publisher":"barracudanetworks", - "product":"waf" - }, - "properties":{ - "osProfile":{ - "computerName":"bwafserver", - "adminUsername":"[parameters('adminUsername')]", - "adminPassword":"[parameters('adminPassword')]" - }, - "hardwareProfile":{ - "vmSize":"[variables('bwafVmSize')]" - }, - "storageProfile":{ - "imageReference":{ - "publisher":"barracudanetworks", - "offer":"waf", - "sku":"hourly", - "version":"latest" - }, - "osDisk":{ - "createOption":"FromImage", - "name":"[variables('bwafVmName')]", - "vhd":{ - "uri":"[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('bwafStorageAccountName')),'2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/', variables('bwafVmName'),'-',variables('OSDiskName'),'.vhd')]" - } - }, - "dataDisks":[ - - ] + }, + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('webVmName'), copyindex(1))]" + ], + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.19", + "autoUpgradeMinorVersion": true, + "settings": { + "modulesUrl": "[concat(parameters('_artifactsLocation'),'scripts/',variables('dscfilename'),parameters('_artifactsLocationSasToken'))]", + "configurationFunction": "[variables('webVmExtensionFunction')]", + "wmfVersion": "4.0", + "Properties": {} }, - "networkProfile":{ - "networkInterfaces":[ - { - "id":"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('bwafVmNicName')))]" - } - ] - }, - "availabilitySet":{ - "id":"[resourceId('Microsoft.Compute/availabilitySets',variables('bwafAvailSetName'))]" - } - } - } - ], - "outputs":{ - "loadBalancerIP":{ - "value":"[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('lbIPAddressName'))).ipAddress]", - "type":"string" - }, - "bwafIP":{ - "value":"[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('bwafVmIPAddressName'))).ipAddress]", - "type":"string" + "protectedSettings": {} + } + } + ] + }, + { + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('bwafVmName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "comments": "This is the Barracuda WAF VM", + "tags": { + "displayName": "BWAF VM", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('barracudaNetworksTags').provider]" }, - "loadBalancerFqdn":{ - "value":"[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('lbIPAddressName'))).dnsSettings.fqdn]", - "type":"string" + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('bwafStorageAccountName'))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('bwafVmNicName'))]", + "[concat('Microsoft.Compute/availabilitySets/', variables('bwafAvailSetName'))]" + ], + "plan": { + "name": "hourly", + "publisher": "barracudanetworks", + "product": "waf" }, - "bwafFqdn":{ - "value":"[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('bwafVmIPAddressName'))).dnsSettings.fqdn]", - "type":"string" + "properties": { + "osProfile": { + "computerName": "bwafserver", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "hardwareProfile": { + "vmSize": "[variables('bwafVmSize')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "barracudanetworks", + "offer": "waf", + "sku": "hourly", + "version": "latest" + }, + "osDisk": { + "createOption": "FromImage", + "name": "[variables('bwafVmName')]", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('bwafStorageAccountName')),'2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/', variables('bwafVmName'),'-',variables('OSDiskName'),'.vhd')]" + } + }, + "dataDisks": [] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('bwafVmNicName')))]" + } + ] + }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('bwafAvailSetName'))]" + } } - } + } + ], + "outputs": { + "loadBalancerIP": { + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('lbIPAddressName'))).ipAddress]", + "type": "string" + }, + "bwafIP": { + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('bwafVmIPAddressName'))).ipAddress]", + "type": "string" + }, + "loadBalancerFqdn": { + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('lbIPAddressName'))).dnsSettings.fqdn]", + "type": "string" + }, + "bwafFqdn": { + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('bwafVmIPAddressName'))).dnsSettings.fqdn]", + "type": "string" + } + } } diff --git a/bitcore-centos-vm/azuredeploy.json b/bitcore-centos-vm/azuredeploy.json index 58f0ea1a45f8..1234ee37b7ec 100644 --- a/bitcore-centos-vm/azuredeploy.json +++ b/bitcore-centos-vm/azuredeploy.json @@ -42,6 +42,13 @@ "metadata": { "description": "Size of each data disk in GB" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -70,7 +77,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -79,7 +86,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -91,7 +98,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -112,7 +119,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -138,7 +145,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -192,7 +199,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -210,4 +217,4 @@ } } ] -} \ No newline at end of file +} diff --git a/blockchain/azuredeploy.json b/blockchain/azuredeploy.json index 68525f587bd2..c39a22fecf21 100644 --- a/blockchain/azuredeploy.json +++ b/blockchain/azuredeploy.json @@ -75,6 +75,13 @@ "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": { @@ -92,34 +99,16 @@ "vmStorageAccountContainerName": "vhds", "vmName": "[parameters('vmDnsPrefix')]", "virtualNetworkName": "VNET", - "apiVersion": "2015-06-15", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "storageAccountName": "[concat(uniquestring(resourceGroup().id, 'block'))]", - "commandToExecuteemercoin": "[concat('sh ', parameters('blockchainSoftware'), '.sh ', '\"', parameters('adminUsername'), '\" \"', parameters('adminPassword'), '\"')]", - "commandToExecutestratis": "[concat('sh ', parameters('blockchainSoftware'), '.sh From_Source', parameters('adminUsername'))]", - "commandToExecutesyscoin": "[concat('sh ', parameters('blockchainSoftware'), '.sh From_Source', parameters('adminUsername'))]", - "commandToExecuteviacoin": "[concat('sh ', parameters('blockchainSoftware'), '.sh From_Source')]", - "commandToExecutebitswift": "[concat('sh ', parameters('blockchainSoftware'), '.sh From_Source')]", - "commandToExecuteblocknet": "[concat('sh ', parameters('blockchainSoftware'), '.sh From_Source')]", - "commandToExecuteinflux": "[concat('sh ', parameters('blockchainSoftware'), '.sh From_Source')]", - "commandToExecutebitshares": "[concat('sh ', parameters('blockchainSoftware'), '.sh From_Source')]", - "commandToExecutedigibyte": "[concat('sh ', parameters('blockchainSoftware'), '.sh From_Source')]", - "commandToExecutevcash": "[concat('sh ', parameters('blockchainSoftware'), '.sh From_Source')]", - "commandToExecutebloqenterprise": "[concat('sh ', parameters('blockchainSoftware'), '.sh Download_Binaries')]", - "commandToExecutemonero": "[concat('sh ', parameters('blockchainSoftware'), '.sh Download_Binaries')]", - "commandToExecutejumbucks": "[concat('sh ', parameters('blockchainSoftware'), '.sh From_Source ', parameters('adminUsername'))]", - "commandToExecuteokcash": "[concat('sh ', parameters('blockchainSoftware'), '.sh From_Source ', parameters('adminUsername'))]", - "commandToExecuteshadow": "[concat('sh ', parameters('blockchainSoftware'), '.sh From_Source ', parameters('adminUsername'))]", - "commandToExecutemultichain": "[concat('sh ', parameters('blockchainSoftware'), '.sh ', parameters('adminUsername'))]", - "commandToExecutenxt": "[concat('sh ', parameters('blockchainSoftware'), '.sh false false')]" + "storageAccountName": "[concat(uniquestring(resourceGroup().id, 'block'))]" }, "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -128,7 +117,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -140,7 +129,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -161,7 +150,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -187,7 +176,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -230,7 +219,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -250,4 +239,4 @@ } } ] -} \ No newline at end of file +} diff --git a/bootstorm-vm-boot-time/azuredeploy.json b/bootstorm-vm-boot-time/azuredeploy.json index df2b289d8b86..8cc25d21c258 100644 --- a/bootstorm-vm-boot-time/azuredeploy.json +++ b/bootstorm-vm-boot-time/azuredeploy.json @@ -26,17 +26,20 @@ "metadata": { "description": "Number of VMs to create." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-06-15", - "apiVersionCRP": "2015-06-15", - "apiVersionSRP": "2015-06-15", - "apiVersionNRP": "2015-05-01-preview", "imagePublisher": "MicrosoftWindowsServer", "imageOffer": "WindowsServer", "addressPrefix": "10.0.0.0/16", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "subnetName": "[concat('vsn', resourceGroup().name)]", "subnetPrefix": "10.0.0.0/24", "storageAccountType": "Standard_LRS", @@ -321,4 +324,4 @@ } } ] -} \ No newline at end of file +} diff --git a/bosh-setup/azuredeploy.json b/bosh-setup/azuredeploy.json index a7c3947e54c5..f38a395a4ef9 100644 --- a/bosh-setup/azuredeploy.json +++ b/bosh-setup/azuredeploy.json @@ -174,6 +174,13 @@ "metadata": { "description": "The flag allowing to deploy Cloud Foundry automatically or not" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -181,7 +188,6 @@ "storageAccountType": "Standard_LRS", "vmStorageAccountContainerName": "vhds", "storageid": "[resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccountName'))]", - "virtualNetworkName": "boshvnet-crp", "virtualNetworkAddressSpace": "10.0.0.0/16", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", @@ -196,14 +202,12 @@ "cfPublicIPAddressName": "[concat(parameters('vmName'), '-cf')]", "loadBalancerName": "cf-lb", "loadBalancerTemplate": "[concat('nestedtemplates/load-balancer-availability-zones-', parameters('useAvailabilityZones'), '.json')]", - "vmSize": "Standard_D1_v2", "nicName": "[parameters('vmName')]", "devboxPrivateIPAddress": "10.0.0.100", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "sshKeyPath": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]", - "baseUriAzureCloud": "[parameters('_artifactsLocation')]", "filesToDownloadShared": [ "[uri(variables('baseUriAzureCloud'), 'scripts/setup_env.sh')]", @@ -258,14 +262,12 @@ "[uri(variables('baseUriAzureChinaCloud'), 'cf-cli/cf-cli-installer_6.34.1_x86-64.deb')]" ], "filesToDownload": "[variables(concat('filesToDownload', parameters('environment')))]", - "coreUriAzureCloud": "core.windows.net", "coreUriAzureChinaCloud": "core.chinacloudapi.cn", "coreUriAzureUSGovernment": "core.usgovcloudapi.net", "coreUriAzureGermanCloud": "core.cloudapi.de", "coreUriAzureStack": "[parameters('azureStackDomain')]", "coreUri": "[variables(concat('coreUri', parameters('environment')))]", - "environmentAzure": { "serviceHostBase": "[variables('coreUri')]", "boshCliUrl": "https://s3.amazonaws.com/bosh-cli-artifacts/bosh-cli-2.0.48-linux-amd64", @@ -287,11 +289,9 @@ "stemcellSha1": "4118e681d7be33054fcb7b313ccb1fa96a281739" }, "environment": "[variables(concat('environment', parameters('environment')))]", - "credentialsPassword": "[base64(parameters('clientSecret'))]", "credentialsCertificate": "[parameters('certificate')]", "credentials": "[variables(concat('credentials', parameters('servicePrincipalType')))]", - "customScriptPropertiesAzureCloud": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", @@ -324,7 +324,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('boshNetworkSecurityGroup')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -390,7 +390,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('devboxNetworkSecurityGroup')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -414,7 +414,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('cfNetworkSecurityGroup')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -480,7 +480,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('defaultStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -489,7 +489,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('vmName'), '-devbox')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -501,7 +501,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -528,7 +528,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', concat(parameters('vmName'), '-devbox'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", @@ -631,7 +631,7 @@ "apiversion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]", "Microsoft.Resources/deployments/generate-customdata" @@ -685,7 +685,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/CustomScript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Resources/deployments/create-load-balancer", "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" diff --git a/centos-2nics-lb-cluster/azuredeploy.json b/centos-2nics-lb-cluster/azuredeploy.json index ea10c82db5fc..e2aaa6d1a15a 100644 --- a/centos-2nics-lb-cluster/azuredeploy.json +++ b/centos-2nics-lb-cluster/azuredeploy.json @@ -66,6 +66,13 @@ "metadata": { "description": "DNS name for Load Balancer IP" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -98,7 +105,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -107,14 +114,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -141,7 +148,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -153,7 +160,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nic1', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[parameters('numberOfInstances')]" @@ -190,7 +197,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nic2', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[parameters('numberOfInstances')]" @@ -216,7 +223,7 @@ "apiVersion": "2015-05-01-preview", "name": "[variables('lbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" ], @@ -408,7 +415,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat('myvm', copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineLoop", "count": "[parameters('numberOfInstances')]" @@ -469,7 +476,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('myvm', copyIndex(), '/extension')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineLoop", "count": "[parameters('numberOfInstances')]" diff --git a/centos-singularity/azuredeploy.json b/centos-singularity/azuredeploy.json index a53d18a1d72b..385cae8f3cce 100644 --- a/centos-singularity/azuredeploy.json +++ b/centos-singularity/azuredeploy.json @@ -66,6 +66,13 @@ "metadata": { "description": "The SAS Token required to access _artifactsLocation; this is stored on GitHub by default, so no SAS token is required" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -84,13 +91,13 @@ "storageAccountType": "Standard_LRS", "virtualNetworkName": "MyVNET", "vmName": "MySingularityVM" - }, + }, "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, @@ -101,7 +108,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -113,7 +120,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -134,7 +141,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -160,7 +167,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -210,19 +217,19 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '/InstallSingularity')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" + "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], "tags": { - "displayName": "InstallSingularity" + "displayName": "InstallSingularity" }, "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "[concat(parameters('_artifactsLocation'), '/', variables('scriptFolder'), '/', variables('scriptFileName'), parameters('_artifactsLocationSasToken'))]" @@ -242,4 +249,4 @@ "value": "[concat('ssh ', parameters('adminUsername'), '@', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]" } } -} \ No newline at end of file +} diff --git a/chef-automate-ha/azuredeploy.json b/chef-automate-ha/azuredeploy.json index c839d3960d52..1ba399dbae62 100644 --- a/chef-automate-ha/azuredeploy.json +++ b/chef-automate-ha/azuredeploy.json @@ -117,6 +117,13 @@ "metadata": { "description": "password" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -128,7 +135,7 @@ "replicationPasswordValue": "[concat('chv-',substring(variables('prefix'),0,11),'-rpp')]", "clusterTokenValue": "[concat('chv-',substring(variables('prefix'),0,12),'-ctt')]", "clusterNameValue": "[concat('chef-',substring(variables('prefix'),0,8))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "objectId": "[parameters('objectId')]", "vaultSku": "[parameters('vaultSku')]", "dbPassword": "dbPassword", @@ -140,7 +147,7 @@ }, "computeSettings": { "count": 7, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "computeApiVersion": "2016-04-30-preview", "adminUsername": "[parameters('adminUsername')]", "sshKeyData": "[parameters('sshKeyData')]", @@ -184,13 +191,13 @@ "keyvaultId": "[concat(subscription().id,'/resourceGroups/',resourceGroup().name, '/providers/Microsoft.KeyVault/vaults/', variables('keyvaultSettings').keyVaultName)]" }, "storageSettings": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "diagStorageAccName": "[concat('diagstr',substring(variables('prefix') ,0 ,5))]", "diagStorageAccountType": "Standard_LRS", "storageApiVersion": "2015-06-15" }, "networkSettings": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "networkApiVersion": "2015-06-15", "leaderNicName": "be-nic0", "followerNicName1": "be-nic1", @@ -545,4 +552,4 @@ "value": "[reference('publicIPAddressesResource').outputs.chefAutomatefqdn.value]" } } -} \ No newline at end of file +} diff --git a/chef-automate-ha/nested/fe-be-virtualmachines-with-extensions.json b/chef-automate-ha/nested/fe-be-virtualmachines-with-extensions.json index 024319c22f51..cbc90a969465 100644 --- a/chef-automate-ha/nested/fe-be-virtualmachines-with-extensions.json +++ b/chef-automate-ha/nested/fe-be-virtualmachines-with-extensions.json @@ -1,643 +1,650 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "computeSettings": { - "type": "object" - }, - "networkSettings": { - "type": "object" - }, - "keyvaultSettings": { - "type": "object" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "computeSettings": { + "type": "object" }, - "variables": { - "provider": "[toUpper('33194f91-eb5f-4110-827a-e95f640a9e46')]" + "networkSettings": { + "type": "object" }, - "resources": [ - { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').leaderComputerName]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').leaderComputerName]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "keyData": "[parameters('computeSettings').sshKeyData]", - "path": "[parameters('computeSettings').sshKeyPath]" - } - ] - } - }, - "customData": "[parameters('computeSettings').leaderCustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'0')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'0'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').leaderNicName)]" - } - ] - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]" - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ + "keyvaultSettings": { + "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "provider": "[toUpper('33194f91-eb5f-4110-827a-e95f640a9e46')]" + }, + "resources": [ + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').leaderComputerName]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').leaderComputerName]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ { - "name": "[parameters('computeSettings').leaderExtensionName]", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').leaderComputerName)]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]" - } - } + "keyData": "[parameters('computeSettings').sshKeyData]", + "path": "[parameters('computeSettings').sshKeyPath]" } - ], - "tags": { - "provider": "[variables('provider')]" + ] + } + }, + "customData": "[parameters('computeSettings').leaderCustomData]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'0')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'0'))]" + } + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').leaderNicName)]" } + ] }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').followerComputerName1]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').followerComputerName1]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "keyData": "[parameters('computeSettings').sshKeyData]", - "path": "[parameters('computeSettings').sshKeyPath]" - } - ] - } - }, - "customData": "[parameters('computeSettings').followerCustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'1')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'1'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').followerNicName1)]" - } - ] - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]" - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ + "name": "[parameters('computeSettings').leaderExtensionName]", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').leaderComputerName)]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]" + } + } + } + ], + "tags": { + "provider": "[variables('provider')]" + } + }, + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').followerComputerName1]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').followerComputerName1]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ { - "name": "[parameters('computeSettings').followerExtensionName1]", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').followerComputerName1)]", - "[concat('Microsoft.Compute/virtualMachines/',parameters('computeSettings').leaderComputerName,'/extensions/', parameters('computeSettings').leaderExtensionName)]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]" - } - } + "keyData": "[parameters('computeSettings').sshKeyData]", + "path": "[parameters('computeSettings').sshKeyPath]" } - ], - "tags": { - "provider": "[variables('provider')]" + ] } + }, + "customData": "[parameters('computeSettings').followerCustomData]" }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'1')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'1'))]" + } + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').followerNicName1)]" + } + ] + }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').followerComputerName2]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').followerComputerName2]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "keyData": "[parameters('computeSettings').sshKeyData]", - "path": "[parameters('computeSettings').sshKeyPath]" - } - ] - } - }, - "customData": "[parameters('computeSettings').followerCustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'2')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'2'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').followerNicName2)]" - } - ] - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]" - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ + "name": "[parameters('computeSettings').followerExtensionName1]", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').followerComputerName1)]", + "[concat('Microsoft.Compute/virtualMachines/',parameters('computeSettings').leaderComputerName,'/extensions/', parameters('computeSettings').leaderExtensionName)]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]" + } + } + } + ], + "tags": { + "provider": "[variables('provider')]" + } + }, + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').followerComputerName2]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').followerComputerName2]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ { - "name": "[parameters('computeSettings').followerExtensionName2]", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').followerComputerName2)]", - "[concat('Microsoft.Compute/virtualMachines/',parameters('computeSettings').followerComputerName1,'/extensions/', parameters('computeSettings').followerExtensionName1)]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]" - } - } + "keyData": "[parameters('computeSettings').sshKeyData]", + "path": "[parameters('computeSettings').sshKeyPath]" } - ], - "tags": { - "provider": "[variables('provider')]" + ] + } + }, + "customData": "[parameters('computeSettings').followerCustomData]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'2')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'2'))]" + } } + ] }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').followerNicName2)]" + } + ] + }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').feComputerName0]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').feComputerName0]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "keyData": "[parameters('computeSettings').sshKeyData]", - "path": "[parameters('computeSettings').sshKeyPath]" - } - ] - } - }, - "customData": "[parameters('computeSettings').fe0CustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'3')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'3'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName0)]" - } - ] - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]" - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ + "name": "[parameters('computeSettings').followerExtensionName2]", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').followerComputerName2)]", + "[concat('Microsoft.Compute/virtualMachines/',parameters('computeSettings').followerComputerName1,'/extensions/', parameters('computeSettings').followerExtensionName1)]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]" + } + } + } + ], + "tags": { + "provider": "[variables('provider')]" + } + }, + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').feComputerName0]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').feComputerName0]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ { - "name": "[parameters('computeSettings').feVmExtensionName0]", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName0)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').leaderComputerName, parameters('computeSettings').leaderExtensionName)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').followerComputerName1, parameters('computeSettings').followerExtensionName1)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').followerComputerName2, parameters('computeSettings').followerExtensionName2)]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').appID, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" - } - } + "keyData": "[parameters('computeSettings').sshKeyData]", + "path": "[parameters('computeSettings').sshKeyPath]" } - ], - "tags": { - "provider": "[variables('provider')]" + ] } + }, + "customData": "[parameters('computeSettings').fe0CustomData]" }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'3')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'3'))]" + } + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName0)]" + } + ] + }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').feComputerName1]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').feComputerName1]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "keyData": "[parameters('computeSettings').sshKeyData]", - "path": "[parameters('computeSettings').sshKeyPath]" - } - ] - } - }, - "customData": "[parameters('computeSettings').feCustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'4')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'4'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName1)]" - } - ] - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]" - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ + "name": "[parameters('computeSettings').feVmExtensionName0]", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName0)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').leaderComputerName, parameters('computeSettings').leaderExtensionName)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').followerComputerName1, parameters('computeSettings').followerExtensionName1)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').followerComputerName2, parameters('computeSettings').followerExtensionName2)]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').appID, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" + } + } + } + ], + "tags": { + "provider": "[variables('provider')]" + } + }, + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').feComputerName1]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').feComputerName1]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ { - "name": "[parameters('computeSettings').feVmExtensionName1]", - "type": "extensions", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName1)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0, parameters('computeSettings').feVmExtensionName0)]" - ], - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').appID, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" - } - } + "keyData": "[parameters('computeSettings').sshKeyData]", + "path": "[parameters('computeSettings').sshKeyPath]" } - ], - "tags": { - "provider": "[variables('provider')]" + ] } + }, + "customData": "[parameters('computeSettings').feCustomData]" }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'4')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'4'))]" + } + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName1)]" + } + ] + }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').feComputerName2]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').feComputerName2]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "keyData": "[parameters('computeSettings').sshKeyData]", - "path": "[parameters('computeSettings').sshKeyPath]" - } - ] - } - }, - "customData": "[parameters('computeSettings').feCustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'5')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'5'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName2)]" - } - ] - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]" - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ + "name": "[parameters('computeSettings').feVmExtensionName1]", + "type": "extensions", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName1)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0, parameters('computeSettings').feVmExtensionName0)]" + ], + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').appID, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" + } + } + } + ], + "tags": { + "provider": "[variables('provider')]" + } + }, + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').feComputerName2]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').feComputerName2]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ { - "name": "[parameters('computeSettings').feVmExtensionName2]", - "type": "extensions", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName2)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0,parameters('computeSettings').feVmExtensionName0)]" - ], - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').appID, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" - } - } + "keyData": "[parameters('computeSettings').sshKeyData]", + "path": "[parameters('computeSettings').sshKeyPath]" } - ], - "tags": { - "provider": "[variables('provider')]" + ] + } + }, + "customData": "[parameters('computeSettings').feCustomData]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'5')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'5'))]" + } + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName2)]" } + ] }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').autoComputerName]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').autoComputerName]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "keyData": "[parameters('computeSettings').sshKeyData]", - "path": "[parameters('computeSettings').sshKeyPath]" - } - ] - } - }, - "customData": "[parameters('computeSettings').automateCustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'6')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'6'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').chefAutoNicName)]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ + "name": "[parameters('computeSettings').feVmExtensionName2]", + "type": "extensions", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName2)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0,parameters('computeSettings').feVmExtensionName0)]" + ], + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').appID, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" + } + } + } + ], + "tags": { + "provider": "[variables('provider')]" + } + }, + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').autoComputerName]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').autoComputerName]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ { - "name": "[parameters('computeSettings').chefAutoExtenName]", - "type": "extensions", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').autoComputerName)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0,parameters('computeSettings').feVmExtensionName0)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName1,parameters('computeSettings').feVmExtensionName1)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName2,parameters('computeSettings').feVmExtensionName2)]" - ], - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/delivery/chef-automate-install.sh', ' ', parameters('keyvaultSettings').appID, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" - } - } + "keyData": "[parameters('computeSettings').sshKeyData]", + "path": "[parameters('computeSettings').sshKeyPath]" } - ], - "tags": { - "provider": "[variables('provider')]" + ] + } + }, + "customData": "[parameters('computeSettings').automateCustomData]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'6')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'6'))]" + } + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').chefAutoNicName)]" + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ + { + "name": "[parameters('computeSettings').chefAutoExtenName]", + "type": "extensions", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').autoComputerName)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0,parameters('computeSettings').feVmExtensionName0)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName1,parameters('computeSettings').feVmExtensionName1)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName2,parameters('computeSettings').feVmExtensionName2)]" + ], + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/delivery/chef-automate-install.sh', ' ', parameters('keyvaultSettings').appID, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" } + } } - ] -} \ No newline at end of file + ], + "tags": { + "provider": "[variables('provider')]" + } + } + ] +} diff --git a/chef-automate-ha/nested/fe-be-virtualmachines-with-extensions1.json b/chef-automate-ha/nested/fe-be-virtualmachines-with-extensions1.json index b706a3d45f32..16a7d67220da 100644 --- a/chef-automate-ha/nested/fe-be-virtualmachines-with-extensions1.json +++ b/chef-automate-ha/nested/fe-be-virtualmachines-with-extensions1.json @@ -1,570 +1,577 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "computeSettings": { - "type": "object" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "computeSettings": { + "type": "object" + }, + "networkSettings": { + "type": "object" + }, + "keyvaultSettings": { + "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "provider": "[toUpper('33194f91-eb5f-4110-827a-e95f640a9e46')]" + }, + "resources": [ + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').leaderComputerName]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').leaderComputerName]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "adminPassword": "[parameters('computeSettings').adminPassword]", + "customData": "[parameters('computeSettings').leaderCustomData]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'0')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'0'))]" + } + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').leaderNicName)]" + } + ] }, - "networkSettings": { - "type": "object" + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]" }, - "keyvaultSettings": { - "type": "object" + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } } - }, - "variables": { - "provider": "[toUpper('33194f91-eb5f-4110-827a-e95f640a9e46')]" - }, - "resources": [ + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').leaderComputerName]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').leaderComputerName]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "adminPassword": "[parameters('computeSettings').adminPassword]", - "customData": "[parameters('computeSettings').leaderCustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'0')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'0'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').leaderNicName)]" - } - ] - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]" - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ - { - "name": "[parameters('computeSettings').leaderExtensionName]", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').leaderComputerName)]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]" - } - } - } - ], - "tags": { - "provider": "[variables('provider')]" + "name": "[parameters('computeSettings').leaderExtensionName]", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').leaderComputerName)]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]" + } + } + } + ], + "tags": { + "provider": "[variables('provider')]" + } + }, + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').followerComputerName1]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').followerComputerName1]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "adminPassword": "[parameters('computeSettings').adminPassword]", + "customData": "[parameters('computeSettings').followerCustomData]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'1')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'1'))]" + } + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').followerNicName1)]" } + ] + }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]" }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').followerComputerName1]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').followerComputerName1]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "adminPassword": "[parameters('computeSettings').adminPassword]", - "customData": "[parameters('computeSettings').followerCustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'1')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'1'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').followerNicName1)]" - } - ] - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]" - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ - { - "name": "[parameters('computeSettings').followerExtensionName1]", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').followerComputerName1)]", - "[concat('Microsoft.Compute/virtualMachines/',parameters('computeSettings').leaderComputerName,'/extensions/', parameters('computeSettings').leaderExtensionName)]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]" - } - } - } - ], - "tags": { - "provider": "[variables('provider')]" + "name": "[parameters('computeSettings').followerExtensionName1]", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').followerComputerName1)]", + "[concat('Microsoft.Compute/virtualMachines/',parameters('computeSettings').leaderComputerName,'/extensions/', parameters('computeSettings').leaderExtensionName)]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]" + } + } + } + ], + "tags": { + "provider": "[variables('provider')]" + } + }, + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').followerComputerName2]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').followerComputerName2]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "adminPassword": "[parameters('computeSettings').adminPassword]", + "customData": "[parameters('computeSettings').followerCustomData]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'2')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'2'))]" + } } + ] }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').followerNicName2)]" + } + ] + }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').followerComputerName2]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').followerComputerName2]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "adminPassword": "[parameters('computeSettings').adminPassword]", - "customData": "[parameters('computeSettings').followerCustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'2')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'2'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').followerNicName2)]" - } - ] - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]" - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ - { - "name": "[parameters('computeSettings').followerExtensionName2]", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').followerComputerName2)]", - "[concat('Microsoft.Compute/virtualMachines/',parameters('computeSettings').followerComputerName1,'/extensions/', parameters('computeSettings').followerExtensionName1)]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]" - } - } - } - ], - "tags": { - "provider": "[variables('provider')]" + "name": "[parameters('computeSettings').followerExtensionName2]", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').followerComputerName2)]", + "[concat('Microsoft.Compute/virtualMachines/',parameters('computeSettings').followerComputerName1,'/extensions/', parameters('computeSettings').followerExtensionName1)]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]" + } + } + } + ], + "tags": { + "provider": "[variables('provider')]" + } + }, + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').feComputerName0]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').feComputerName0]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "adminPassword": "[parameters('computeSettings').adminPassword]", + "customData": "[parameters('computeSettings').fe0CustomData]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'3')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'3'))]" + } + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName0)]" } + ] + }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]" }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').feComputerName0]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').feComputerName0]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "adminPassword": "[parameters('computeSettings').adminPassword]", - "customData": "[parameters('computeSettings').fe0CustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'3')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'3'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName0)]" - } - ] - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]" - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ - { - "name": "[parameters('computeSettings').feVmExtensionName0]", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName0)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').leaderComputerName, parameters('computeSettings').leaderExtensionName)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').followerComputerName1, parameters('computeSettings').followerExtensionName1)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').followerComputerName2, parameters('computeSettings').followerExtensionName2)]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').adminPassword, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').servicePrinciple, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" - } - } - } - ] + "name": "[parameters('computeSettings').feVmExtensionName0]", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName0)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').leaderComputerName, parameters('computeSettings').leaderExtensionName)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').followerComputerName1, parameters('computeSettings').followerExtensionName1)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').followerComputerName2, parameters('computeSettings').followerExtensionName2)]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').adminPassword, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').servicePrinciple, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" + } + } + } + ] + }, + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').feComputerName1]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" }, + "osProfile": { + "computerName": "[parameters('computeSettings').feComputerName1]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "adminPassword": "[parameters('computeSettings').adminPassword]", + "customData": "[parameters('computeSettings').feCustomData]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'4')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'4'))]" + } + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName1)]" + } + ] + }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').feComputerName1]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').feComputerName1]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "adminPassword": "[parameters('computeSettings').adminPassword]", - "customData": "[parameters('computeSettings').feCustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'4')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'4'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName1)]" - } - ] - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]" - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ - { - "name": "[parameters('computeSettings').feVmExtensionName1]", - "type": "extensions", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName1)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0, parameters('computeSettings').feVmExtensionName0)]" - ], - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').adminPassword, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').servicePrinciple, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" - } - } - } - ], - "tags": { - "provider": "[variables('provider')]" + "name": "[parameters('computeSettings').feVmExtensionName1]", + "type": "extensions", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName1)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0, parameters('computeSettings').feVmExtensionName0)]" + ], + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').adminPassword, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').servicePrinciple, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" + } + } + } + ], + "tags": { + "provider": "[variables('provider')]" + } + }, + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').feComputerName2]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').feComputerName2]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "adminPassword": "[parameters('computeSettings').adminPassword]", + "customData": "[parameters('computeSettings').feCustomData]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'5')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'5'))]" + } } + ] }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName2)]" + } + ] + }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').feComputerName2]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').feComputerName2]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "adminPassword": "[parameters('computeSettings').adminPassword]", - "customData": "[parameters('computeSettings').feCustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'5')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'5'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName2)]" - } - ] - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]" - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ - { - "name": "[parameters('computeSettings').feVmExtensionName2]", - "type": "extensions", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName2)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0,parameters('computeSettings').feVmExtensionName0)]" - ], - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').adminPassword, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').servicePrinciple, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" - } - } - } - ], - "tags": { - "provider": "[variables('provider')]" + "name": "[parameters('computeSettings').feVmExtensionName2]", + "type": "extensions", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName2)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0,parameters('computeSettings').feVmExtensionName0)]" + ], + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').adminPassword, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').servicePrinciple, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" } + } + } + ], + "tags": { + "provider": "[variables('provider')]" + } + }, + { + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').autoComputerName]", + "location": "[parameters('location')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').vmSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').autoComputerName]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "adminPassword": "[parameters('computeSettings').adminPassword]", + "customData": "[parameters('computeSettings').automateCustomData]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').ubuntuOSVersion]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage" + }, + "dataDisks": [ + { + "name": "[concat(parameters('computeSettings').managedDiskName,'6')]", + "lun": 0, + "caching": "None", + "createOption": "Attach", + "managedDisk": { + "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'6'))]" + } + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').chefAutoNicName)]" + } + ] }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" + } + } + }, + "resources": [ { - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').autoComputerName]", - "location": "[resourceGroup().location]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').vmSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').autoComputerName]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "adminPassword": "[parameters('computeSettings').adminPassword]", - "customData": "[parameters('computeSettings').automateCustomData]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').ubuntuOSVersion]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "name": "[concat(parameters('computeSettings').managedDiskName,'6')]", - "lun": 0, - "caching": "None", - "createOption": "Attach", - "managedDisk": { - "id": "[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'6'))]" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').chefAutoNicName)]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]" - } - } - }, - "resources": [ - { - "name": "[parameters('computeSettings').chefAutoExtenName]", - "type": "extensions", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').autoComputerName)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0,parameters('computeSettings').feVmExtensionName0)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName1,parameters('computeSettings').feVmExtensionName1)]", - "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName2,parameters('computeSettings').feVmExtensionName2)]" - ], - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('bash /etc/delivery/chef-automate-install.sh', ' ', parameters('keyvaultSettings').servicePrinciple, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" - } - } - } - ], - "tags": { - "provider": "[variables('provider')]" + "name": "[parameters('computeSettings').chefAutoExtenName]", + "type": "extensions", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').autoComputerName)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0,parameters('computeSettings').feVmExtensionName0)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName1,parameters('computeSettings').feVmExtensionName1)]", + "[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName2,parameters('computeSettings').feVmExtensionName2)]" + ], + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('bash /etc/delivery/chef-automate-install.sh', ' ', parameters('keyvaultSettings').servicePrinciple, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]" } + } } - ] + ], + "tags": { + "provider": "[variables('provider')]" + } + } + ] } diff --git a/chef-json-parameters-linux-vm/azuredeploy.json b/chef-json-parameters-linux-vm/azuredeploy.json index 0b4176934236..381a5fd948b6 100644 --- a/chef-json-parameters-linux-vm/azuredeploy.json +++ b/chef-json-parameters-linux-vm/azuredeploy.json @@ -22,7 +22,12 @@ }, "osType": { "type": "string", - "allowedValues": ["Ubuntu-14.04.2-LTS", "Ubuntu-12.04.5-LTS", "Centos-7.1", "Centos-7"], + "allowedValues": [ + "Ubuntu-14.04.2-LTS", + "Ubuntu-12.04.5-LTS", + "Centos-7.1", + "Centos-7" + ], "defaultValue": "Ubuntu-14.04.2-LTS", "metadata": { "description": "The type of the operating system you want to deploy." @@ -68,9 +73,12 @@ }, "validation_key_format": { "type": "string", - "allowedValues": ["plaintext", "base64encoded"], + "allowedValues": [ + "plaintext", + "base64encoded" + ], "defaultValue": "plaintext", - "metadata" : { + "metadata": { "description": "Format in which Validation Key is given. e.g. plaintext, base64encoded" } }, @@ -108,6 +116,13 @@ "metadata": { "description": "Daemon option is only for Windows. Allowed values: none/service/task" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -117,22 +132,22 @@ "offer": "UbuntuServer", "publisher": "Canonical" }, - "Ubuntu-12.04.5-LTS": { + "Ubuntu-12.04.5-LTS": { "sku": "12.04.5-LTS", "offer": "UbuntuServer", "publisher": "Canonical" }, - "Centos-7.1": { + "Centos-7.1": { "sku": "7.1", "offer": "CentOS", "publisher": "OpenLogic" }, - "Centos-7": { + "Centos-7": { "sku": "7", "offer": "CentOS", "publisher": "OpenLogic" } - }, + }, "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnet1Ref": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]", "vmExtensionName": "LinuxChefExtension", @@ -156,7 +171,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -165,7 +180,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -177,7 +192,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -204,7 +219,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -230,7 +245,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -273,7 +288,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('vmExtensionName'))]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -296,7 +311,7 @@ }, "protectedSettings": { "validation_key": "[parameters('validation_key')]", - "secret" : "[parameters('secret')]" + "secret": "[parameters('secret')]" } } } diff --git a/cisco-csr-1000v-4-nic/azuredeploy.json b/cisco-csr-1000v-4-nic/azuredeploy.json index 0fb1896ed99b..49eb48238dc7 100644 --- a/cisco-csr-1000v-4-nic/azuredeploy.json +++ b/cisco-csr-1000v-4-nic/azuredeploy.json @@ -1,491 +1,498 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "metadata": { - "description": "Username for the Virtual Machine." - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the Virtual Machine." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "imagePublisher": "cisco", + "imageOffer": "cisco-csr-1000v", + "imageSKU": "csr-azure-byol", + "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", + "publicIPAddressName": "publicIP", + "dnsPrefix": "[concat('csr-', uniqueString(resourceGroup().id))]", + "vmName": "CSR", + "vmSize": "Standard_D3_v2", + "vnetName": "CSR_Network", + "subnet1Name": "Subnet-1", + "subnet2Name": "Subnet-2", + "subnet3Name": "Subnet-3", + "subnet4Name": "Subnet-4", + "subnet1Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('Subnet1Name'))]", + "subnet2Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('Subnet2Name'))]", + "subnet3Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('Subnet3Name'))]", + "subnet4Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('Subnet4Name'))]", + "addressPrefix": "10.1.0.0/16", + "subnet1Prefix": "10.1.0.0/24", + "subnet2Prefix": "10.1.1.0/24", + "subnet3Prefix": "10.1.2.0/24", + "subnet4Prefix": "10.1.3.0/24", + "subnet1StartAddress": "10.1.0.4", + "subnet2StartAddress": "10.1.1.4", + "subnet3StartAddress": "10.1.2.4", + "subnet4StartAddress": "10.1.3.4", + "nsgname": "[concat(variables('vmName'),'-SSH-SecurityGroup')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[variables('dnsPrefix')]" + } + } + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('vnetName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." + "subnets": [ + { + "name": "[variables('subnet1Name')]", + "properties": { + "addressPrefix": "[variables('subnet1Prefix')]" } - } + }, + { + "name": "[variables('subnet2Name')]", + "properties": { + "addressPrefix": "[variables('subnet2Prefix')]" + } + }, + { + "name": "[variables('subnet3Name')]", + "properties": { + "addressPrefix": "[variables('subnet3Prefix')]" + } + }, + { + "name": "[variables('subnet4Name')]", + "properties": { + "addressPrefix": "[variables('subnet4Prefix')]" + } + } + ] + } }, - "variables": { - "imagePublisher": "cisco", - "imageOffer": "cisco-csr-1000v", - "imageSKU": "csr-azure-byol", - "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", - "publicIPAddressName": "publicIP", - "dnsPrefix": "[concat('csr-', uniqueString(resourceGroup().id))]", - "vmName": "CSR", - "vmSize": "Standard_D3_v2", - "vnetName": "CSR_Network", - "subnet1Name": "Subnet-1", - "subnet2Name": "Subnet-2", - "subnet3Name": "Subnet-3", - "subnet4Name": "Subnet-4", - "subnet1Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('Subnet1Name'))]", - "subnet2Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('Subnet2Name'))]", - "subnet3Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('Subnet3Name'))]", - "subnet4Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('Subnet4Name'))]", - "addressPrefix": "10.1.0.0/16", - "subnet1Prefix": "10.1.0.0/24", - "subnet2Prefix": "10.1.1.0/24", - "subnet3Prefix": "10.1.2.0/24", - "subnet4Prefix": "10.1.3.0/24", - "subnet1StartAddress": "10.1.0.4", - "subnet2StartAddress": "10.1.1.4", - "subnet3StartAddress": "10.1.2.4", - "subnet4StartAddress": "10.1.3.4", - "nsgname": "[concat(variables('vmName'),'-SSH-SecurityGroup')]" + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('nsgName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "SSH-Rule", + "properties": { + "description": "Allow SSH", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" + } + }, + { + "name": "UDP-Rule1", + "properties": { + "description": "Allow UDP", + "protocol": "Udp", + "sourcePortRange": "*", + "destinationPortRange": "500", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 101, + "direction": "Inbound" + } + }, + { + "name": "UDP-Rule2", + "properties": { + "description": "Allow UDP", + "protocol": "Udp", + "sourcePortRange": "*", + "destinationPortRange": "4500", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 102, + "direction": "Inbound" + } + } + ] + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": {} - }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + { + "type": "Microsoft.Network/routeTables", + "name": "[concat(variables('subnet1Name'),'-CSR-RouteTable')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "routes": [ + { + "name": "Route-Subnet2-To-CSR", "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('dnsPrefix')]" - } + "addressPrefix": "[variables('subnet2Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet1StartAddress')]" } - }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('vnetName')]", - "location": "[resourceGroup().location]", + }, + { + "name": "Route-Subnet3-To-CSR", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnet1Name')]", - "properties": { - "addressPrefix": "[variables('subnet1Prefix')]" - } - }, - { - "name": "[variables('subnet2Name')]", - "properties": { - "addressPrefix": "[variables('subnet2Prefix')]" - } - }, - { - "name": "[variables('subnet3Name')]", - "properties": { - "addressPrefix": "[variables('subnet3Prefix')]" - } - }, - { - "name": "[variables('subnet4Name')]", - "properties": { - "addressPrefix": "[variables('subnet4Prefix')]" - } - } - ] + "addressPrefix": "[variables('subnet3Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet1StartAddress')]" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + }, + { + "name": "Route-Subnet4-To-CSR", "properties": { - "securityRules": [ - { - "name": "SSH-Rule", - "properties": { - "description": "Allow SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 100, - "direction": "Inbound" - } - }, - { - "name": "UDP-Rule1", - "properties": { - "description": "Allow UDP", - "protocol": "Udp", - "sourcePortRange": "*", - "destinationPortRange": "500", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 101, - "direction": "Inbound" - } - }, - { - "name": "UDP-Rule2", - "properties": { - "description": "Allow UDP", - "protocol": "Udp", - "sourcePortRange": "*", - "destinationPortRange": "4500", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 102, - "direction": "Inbound" - } - } - ] + "addressPrefix": "[variables('subnet4Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet1StartAddress')]" } - }, - { - "type": "Microsoft.Network/routeTables", - "name": "[concat(variables('subnet1Name'),'-CSR-RouteTable')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "name": "[concat(variables('subnet2Name'),'-CSR-RouteTable')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "routes": [ + { + "name": "Route-Subnet1-To-CSR", "properties": { - "routes": [ - { - "name": "Route-Subnet2-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet2Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet1StartAddress')]" - } - }, - { - "name": "Route-Subnet3-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet3Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet1StartAddress')]" - } - }, - { - "name": "Route-Subnet4-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet4Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet1StartAddress')]" - } - } - ] + "addressPrefix": "[variables('subnet1Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet2StartAddress')]" } - }, - { - "type": "Microsoft.Network/routeTables", - "name": "[concat(variables('subnet2Name'),'-CSR-RouteTable')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + }, + { + "name": "Route-Subnet3-To-CSR", "properties": { - "routes": [ - { - "name": "Route-Subnet1-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet1Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet2StartAddress')]" - } - }, - { - "name": "Route-Subnet3-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet3Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet2StartAddress')]" - } - }, - { - "name": "Route-Subnet4-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet4Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet2StartAddress')]" - } - } - ] + "addressPrefix": "[variables('subnet3Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet2StartAddress')]" } - }, - { - "type": "Microsoft.Network/routeTables", - "name": "[concat(variables('subnet3Name'),'-CSR-RouteTable')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + }, + { + "name": "Route-Subnet4-To-CSR", "properties": { - "routes": [ - { - "name": "Route-Subnet1-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet1Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet3StartAddress')]" - } - }, - { - "name": "Route-Subnet2-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet2Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet3StartAddress')]" - } - }, - { - "name": "Route-Subnet4-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet4Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet3StartAddress')]" - } - } - ] + "addressPrefix": "[variables('subnet4Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet2StartAddress')]" } - }, - { - "type": "Microsoft.Network/routeTables", - "name": "[concat(variables('subnet4Name'),'-CSR-RouteTable')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "name": "[concat(variables('subnet3Name'),'-CSR-RouteTable')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "routes": [ + { + "name": "Route-Subnet1-To-CSR", "properties": { - "routes": [ - { - "name": "Route-Subnet1-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet1Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet4StartAddress')]" - } - }, - { - "name": "Route-Subnet2-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet2Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet4StartAddress')]" - } - }, - { - "name": "Route-Subnet3-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet3Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet4StartAddress')]" - } - }, - { - "name": "Default-Route-To-CSR", - "properties": { - "addressPrefix": "0.0.0.0/0", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet4StartAddress')]" - } - } - ] + "addressPrefix": "[variables('subnet1Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet3StartAddress')]" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmName'),'-Nic0')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", - "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" - ], + }, + { + "name": "Route-Subnet2-To-CSR", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[variables('subnet1StartAddress')]", - "subnet": { - "id": "[variables('subnet1Ref')]" - }, - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgname'))]" - } - } - } - ], - "enableIPForwarding": true + "addressPrefix": "[variables('subnet2Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet3StartAddress')]" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmName'),'-Nic1')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]" - ], + }, + { + "name": "Route-Subnet4-To-CSR", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[variables('subnet2StartAddress')]", - "subnet": { - "id": "[variables('subnet2Ref')]" - } - } - } - ], - "enableIPForwarding": true + "addressPrefix": "[variables('subnet4Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet3StartAddress')]" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmName'),'-Nic2')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]" - ], + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "name": "[concat(variables('subnet4Name'),'-CSR-RouteTable')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "routes": [ + { + "name": "Route-Subnet1-To-CSR", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[variables('subnet3StartAddress')]", - "subnet": { - "id": "[variables('subnet3Ref')]" - } - } - } - ], - "enableIPForwarding": true + "addressPrefix": "[variables('subnet1Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet4StartAddress')]" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmName'),'-Nic3')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]" - ], + }, + { + "name": "Route-Subnet2-To-CSR", + "properties": { + "addressPrefix": "[variables('subnet2Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet4StartAddress')]" + } + }, + { + "name": "Route-Subnet3-To-CSR", + "properties": { + "addressPrefix": "[variables('subnet3Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet4StartAddress')]" + } + }, + { + "name": "Default-Route-To-CSR", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet4StartAddress')]" + } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmName'),'-Nic0')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", + "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[variables('subnet4StartAddress')]", - "subnet": { - "id": "[variables('subnet4Ref')]" - } - } - } - ], - "enableIPForwarding": true + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('subnet1StartAddress')]", + "subnet": { + "id": "[variables('subnet1Ref')]" + }, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgname'))]" + } } + } + ], + "enableIPForwarding": true + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmName'),'-Nic1')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('subnet2StartAddress')]", + "subnet": { + "id": "[variables('subnet2Ref')]" + } + } + } + ], + "enableIPForwarding": true + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmName'),'-Nic2')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('subnet3StartAddress')]", + "subnet": { + "id": "[variables('subnet3Ref')]" + } + } + } + ], + "enableIPForwarding": true + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmName'),'-Nic3')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('subnet4StartAddress')]", + "subnet": { + "id": "[variables('subnet4Ref')]" + } + } + } + ], + "enableIPForwarding": true + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "location": "[parameters('location')]", + "plan": { + "name": "csr-azure-byol", + "publisher": "cisco", + "product": "cisco-csr-1000v" + }, + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic0'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic1'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic2'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic3'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[variables('vmSize')]" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "plan": { - "name": "csr-azure-byol", - "publisher": "cisco", - "product": "cisco-csr-1000v" + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[variables('imageSKU')]", + "version": "latest" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob, 'vhds/osdisk.vhd')]" }, - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic0'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic1'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic2'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic3'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[variables('imageSKU')]", - "version": "latest" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob, 'vhds/osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "properties": { - "primary": true - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic0'))]" - }, - { - "properties": { - "primary": false - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic1'))]" - }, - { - "properties": { - "primary": false - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic2'))]" - }, - { - "properties": { - "primary": false - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic3'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob]" - } - } + "caching": "ReadWrite", + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "properties": { + "primary": true + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic0'))]" + }, + { + "properties": { + "primary": false + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic1'))]" + }, + { + "properties": { + "primary": false + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic2'))]" + }, + { + "properties": { + "primary": false + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic3'))]" } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob]" + } } - ], - "outputs": { - "hostname": { - "type": "string", - "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" - } + } + } + ], + "outputs": { + "hostname": { + "type": "string", + "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" } -} \ No newline at end of file + } +} diff --git a/cisco-csr-1000v-existing-vnet-4-nic/azuredeploy.json b/cisco-csr-1000v-existing-vnet-4-nic/azuredeploy.json index 0f7e262555df..cfe2a6492802 100644 --- a/cisco-csr-1000v-existing-vnet-4-nic/azuredeploy.json +++ b/cisco-csr-1000v-existing-vnet-4-nic/azuredeploy.json @@ -1,467 +1,474 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "metadata": { - "description": "Username for the Virtual Machine." + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the Virtual Machine." + } + }, + "virtualNetworkResourceGroupName": { + "type": "string", + "metadata": { + "description": "Name of the resource group that contains the existing virutal network." + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "Name of the existing virutal network the router will be deployed to." + } + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "Name of the first subnet." + } + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "Name of the second subnet." + } + }, + "subnet3Name": { + "type": "string", + "metadata": { + "description": "Name of the third subnet." + } + }, + "subnet4Name": { + "type": "string", + "metadata": { + "description": "Name of the fourth subnet." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "imagePublisher": "cisco", + "imageOffer": "cisco-csr-1000v", + "imageSKU": "csr-azure-byol", + "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", + "publicIPAddressName": "publicIP", + "dnsPrefix": "[concat('csr-', uniqueString(resourceGroup().id))]", + "vmName": "CSR", + "vmSize": "Standard_D3_v2", + "subnet1ResourceId": "[resourceId(parameters('virtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]", + "subnet2ResourceId": "[resourceId(parameters('virtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet2Name'))]", + "subnet3ResourceId": "[resourceId(parameters('virtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet3Name'))]", + "subnet4ResourceId": "[resourceId(parameters('virtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet4Name'))]", + "nsgname": "[concat(variables('vmName'),'-SSH-SecurityGroup')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[variables('dnsPrefix')]" + } + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('nsgName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "SSH-Rule", + "properties": { + "description": "Allow SSH", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." + }, + { + "name": "UDP-Rule1", + "properties": { + "description": "Allow UDP", + "protocol": "Udp", + "sourcePortRange": "*", + "destinationPortRange": "500", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 101, + "direction": "Inbound" } - }, - "virtualNetworkResourceGroupName": { - "type": "string", - "metadata": { - "description": "Name of the resource group that contains the existing virutal network." + }, + { + "name": "UDP-Rule2", + "properties": { + "description": "Allow UDP", + "protocol": "Udp", + "sourcePortRange": "*", + "destinationPortRange": "4500", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 102, + "direction": "Inbound" } - }, - "virtualNetworkName": { - "type": "string", - "metadata": { - "description": "Name of the existing virutal network the router will be deployed to." + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "name": "[concat(parameters('subnet1Name'),'-CSR-RouteTable')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "routes": [ + { + "name": "Route-Subnet2-To-CSR", + "properties": { + "addressPrefix": "[reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - "subnet1Name": { - "type": "string", - "metadata": { - "description": "Name of the first subnet." + }, + { + "name": "Route-Subnet3-To-CSR", + "properties": { + "addressPrefix": "[reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - "subnet2Name": { - "type": "string", - "metadata": { - "description": "Name of the second subnet." + }, + { + "name": "Route-Subnet4-To-CSR", + "properties": { + "addressPrefix": "[reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - "subnet3Name": { - "type": "string", - "metadata": { - "description": "Name of the third subnet." + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "name": "[concat(parameters('subnet2Name'),'-CSR-RouteTable')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "routes": [ + { + "name": "Route-Subnet1-To-CSR", + "properties": { + "addressPrefix": "[reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - "subnet4Name": { - "type": "string", - "metadata": { - "description": "Name of the fourth subnet." + }, + { + "name": "Route-Subnet3-To-CSR", + "properties": { + "addressPrefix": "[reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - } - }, - "variables": { - "imagePublisher": "cisco", - "imageOffer": "cisco-csr-1000v", - "imageSKU": "csr-azure-byol", - "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", - "publicIPAddressName": "publicIP", - "dnsPrefix": "[concat('csr-', uniqueString(resourceGroup().id))]", - "vmName": "CSR", - "vmSize": "Standard_D3_v2", - "subnet1ResourceId": "[resourceId(parameters('virtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]", - "subnet2ResourceId": "[resourceId(parameters('virtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet2Name'))]", - "subnet3ResourceId": "[resourceId(parameters('virtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet3Name'))]", - "subnet4ResourceId": "[resourceId(parameters('virtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet4Name'))]", - "nsgname": "[concat(variables('vmName'),'-SSH-SecurityGroup')]" + }, + { + "name": "Route-Subnet4-To-CSR", + "properties": { + "addressPrefix": "[reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" + } + } + ] + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": {} - }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + { + "type": "Microsoft.Network/routeTables", + "name": "[concat(parameters('subnet3Name'),'-CSR-RouteTable')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "routes": [ + { + "name": "Route-Subnet1-To-CSR", "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('dnsPrefix')]" - } + "addressPrefix": "[reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + }, + { + "name": "Route-Subnet2-To-CSR", "properties": { - "securityRules": [ - { - "name": "SSH-Rule", - "properties": { - "description": "Allow SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 100, - "direction": "Inbound" - } - }, - { - "name": "UDP-Rule1", - "properties": { - "description": "Allow UDP", - "protocol": "Udp", - "sourcePortRange": "*", - "destinationPortRange": "500", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 101, - "direction": "Inbound" - } - }, - { - "name": "UDP-Rule2", - "properties": { - "description": "Allow UDP", - "protocol": "Udp", - "sourcePortRange": "*", - "destinationPortRange": "4500", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 102, - "direction": "Inbound" - } - } - ] + "addressPrefix": "[reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - { - "type": "Microsoft.Network/routeTables", - "name": "[concat(parameters('subnet1Name'),'-CSR-RouteTable')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + }, + { + "name": "Route-Subnet4-To-CSR", "properties": { - "routes": [ - { - "name": "Route-Subnet2-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - }, - { - "name": "Route-Subnet3-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - }, - { - "name": "Route-Subnet4-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - } - ] + "addressPrefix": "[reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - { - "type": "Microsoft.Network/routeTables", - "name": "[concat(parameters('subnet2Name'),'-CSR-RouteTable')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "name": "[concat(parameters('subnet4Name'),'-CSR-RouteTable')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "routes": [ + { + "name": "Route-Subnet1-To-CSR", "properties": { - "routes": [ - { - "name": "Route-Subnet1-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - }, - { - "name": "Route-Subnet3-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - }, - { - "name": "Route-Subnet4-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - } - ] + "addressPrefix": "[reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - { - "type": "Microsoft.Network/routeTables", - "name": "[concat(parameters('subnet3Name'),'-CSR-RouteTable')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + }, + { + "name": "Route-Subnet2-To-CSR", "properties": { - "routes": [ - { - "name": "Route-Subnet1-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - }, - { - "name": "Route-Subnet2-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - }, - { - "name": "Route-Subnet4-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - } - ] + "addressPrefix": "[reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - { - "type": "Microsoft.Network/routeTables", - "name": "[concat(parameters('subnet4Name'),'-CSR-RouteTable')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + }, + { + "name": "Route-Subnet3-To-CSR", "properties": { - "routes": [ - { - "name": "Route-Subnet1-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - }, - { - "name": "Route-Subnet2-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - }, - { - "name": "Route-Subnet3-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - }, - { - "name": "Default-Route-To-CSR", - "properties": { - "addressPrefix": "0.0.0.0/0", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - } - ] + "addressPrefix": "[reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmName'),'-Nic0')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" - ], + }, + { + "name": "Default-Route-To-CSR", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[string(take(split(replace(reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]", - "subnet": { - "id": "[variables('subnet1ResourceId')]" - }, - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgname'))]" - } - } - } - ], - "enableIPForwarding": true + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmName'),'-Nic1')]", - "location": "[resourceGroup().location]", - "dependsOn": [ ], + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmName'),'-Nic0')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]", - "subnet": { - "id": "[variables('subnet2ResourceId')]" - } - } - } - ], - "enableIPForwarding": true + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[string(take(split(replace(reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]", + "subnet": { + "id": "[variables('subnet1ResourceId')]" + }, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgname'))]" + } } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmName'),'-Nic2')]", - "location": "[resourceGroup().location]", - "dependsOn": [ ], + } + ], + "enableIPForwarding": true + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmName'),'-Nic1')]", + "location": "[parameters('location')]", + "dependsOn": [], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[string(take(split(replace(reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]", - "subnet": { - "id": "[variables('subnet3ResourceId')]" - } - } - } - ], - "enableIPForwarding": true + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]", + "subnet": { + "id": "[variables('subnet2ResourceId')]" + } } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmName'),'-Nic3')]", - "location": "[resourceGroup().location]", - "dependsOn": [ ], + } + ], + "enableIPForwarding": true + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmName'),'-Nic2')]", + "location": "[parameters('location')]", + "dependsOn": [], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[string(take(split(replace(reference(variables('subnet3ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]", + "subnet": { + "id": "[variables('subnet3ResourceId')]" + } + } + } + ], + "enableIPForwarding": true + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmName'),'-Nic3')]", + "location": "[parameters('location')]", + "dependsOn": [], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[string(take(split(replace(reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]", - "subnet": { - "id": "[variables('subnet4ResourceId')]" - } - } - } - ], - "enableIPForwarding": true + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[string(take(split(replace(reference(variables('subnet4ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]", + "subnet": { + "id": "[variables('subnet4ResourceId')]" + } } + } + ], + "enableIPForwarding": true + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "location": "[parameters('location')]", + "plan": { + "name": "csr-azure-byol", + "publisher": "cisco", + "product": "cisco-csr-1000v" + }, + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic0'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic1'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic2'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic3'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[variables('vmSize')]" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "plan": { - "name": "csr-azure-byol", - "publisher": "cisco", - "product": "cisco-csr-1000v" + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[variables('imageSKU')]", + "version": "latest" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob, 'vhds/osdisk.vhd')]" }, - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic0'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic1'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic2'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic3'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[variables('imageSKU')]", - "version": "latest" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob, 'vhds/osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "properties": { - "primary": true - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic0'))]" - }, - { - "properties": { - "primary": false - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic1'))]" - }, - { - "properties": { - "primary": false - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic2'))]" - }, - { - "properties": { - "primary": false - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic3'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob]" - } - } + "caching": "ReadWrite", + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "properties": { + "primary": true + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic0'))]" + }, + { + "properties": { + "primary": false + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic1'))]" + }, + { + "properties": { + "primary": false + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic2'))]" + }, + { + "properties": { + "primary": false + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic3'))]" } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob]" + } } - ], - "outputs": { - "hostname": { - "type": "string", - "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" - } + } + } + ], + "outputs": { + "hostname": { + "type": "string", + "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" } -} \ No newline at end of file + } +} diff --git a/cisco-csr-1000v-existing-vnet/azuredeploy.json b/cisco-csr-1000v-existing-vnet/azuredeploy.json index 28c6a1ee4c5e..416ec002e2cd 100644 --- a/cisco-csr-1000v-existing-vnet/azuredeploy.json +++ b/cisco-csr-1000v-existing-vnet/azuredeploy.json @@ -1,295 +1,302 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "metadata": { - "description": "Username for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "virtualNetworkResourceGroupName": { - "type": "string", - "metadata": { - "description": "Name of the resource group that contains the existing virutal network." - } - }, - "virtualNetworkName": { - "type": "string", - "metadata": { - "description": "Name of the existing virutal network the router will be deployed to." + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the Virtual Machine." + } + }, + "virtualNetworkResourceGroupName": { + "type": "string", + "metadata": { + "description": "Name of the resource group that contains the existing virutal network." + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "Name of the existing virutal network the router will be deployed to." + } + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "Name of the first subnet." + } + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "Name of the second subnet." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "imagePublisher": "cisco", + "imageOffer": "cisco-csr-1000v", + "imageSKU": "csr-azure-byol", + "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", + "publicIPAddressName": "publicIP", + "dnsPrefix": "[concat('csr-', uniqueString(resourceGroup().id))]", + "vmName": "CSR", + "vmSize": "Standard_D2_V2", + "subnet1ResourceId": "[resourceId(parameters('virtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]", + "subnet2ResourceId": "[resourceId(parameters('virtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet2Name'))]", + "nsgname": "[concat(variables('vmName'),'-SSH-SecurityGroup')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[variables('dnsPrefix')]" + } + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('nsgName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "SSH-Rule", + "properties": { + "description": "Allow SSH", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" } - }, - "subnet1Name": { - "type": "string", - "metadata": { - "description": "Name of the first subnet." + }, + { + "name": "UDP-Rule1", + "properties": { + "description": "Allow UDP", + "protocol": "Udp", + "sourcePortRange": "*", + "destinationPortRange": "500", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 101, + "direction": "Inbound" } - }, - "subnet2Name": { - "type": "string", - "metadata": { - "description": "Name of the second subnet." + }, + { + "name": "UDP-Rule2", + "properties": { + "description": "Allow UDP", + "protocol": "Udp", + "sourcePortRange": "*", + "destinationPortRange": "4500", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 102, + "direction": "Inbound" } - } - }, - "variables": { - "imagePublisher": "cisco", - "imageOffer": "cisco-csr-1000v", - "imageSKU": "csr-azure-byol", - "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", - "publicIPAddressName": "publicIP", - "dnsPrefix": "[concat('csr-', uniqueString(resourceGroup().id))]", - "vmName": "CSR", - "vmSize": "Standard_D2_V2", - "subnet1ResourceId": "[resourceId(parameters('virtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]", - "subnet2ResourceId": "[resourceId(parameters('virtualNetworkResourceGroupName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet2Name'))]", - "nsgname": "[concat(variables('vmName'),'-SSH-SecurityGroup')]" + } + ] + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": {} - }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + { + "type": "Microsoft.Network/routeTables", + "name": "[concat(parameters('subnet1Name'),'-CSR-RouteTable')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "routes": [ + { + "name": "Route-Subnet2-To-CSR", "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('dnsPrefix')]" - } + "addressPrefix": "[reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "name": "[concat(parameters('subnet2Name'),'-CSR-RouteTable')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "routes": [ + { + "name": "Route-Subnet1-To-CSR", "properties": { - "securityRules": [ - { - "name": "SSH-Rule", - "properties": { - "description": "Allow SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 100, - "direction": "Inbound" - } - }, - { - "name": "UDP-Rule1", - "properties": { - "description": "Allow UDP", - "protocol": "Udp", - "sourcePortRange": "*", - "destinationPortRange": "500", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 101, - "direction": "Inbound" - } - }, - { - "name": "UDP-Rule2", - "properties": { - "description": "Allow UDP", - "protocol": "Udp", - "sourcePortRange": "*", - "destinationPortRange": "4500", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 102, - "direction": "Inbound" - } - } - ] + "addressPrefix": "[reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - { - "type": "Microsoft.Network/routeTables", - "name": "[concat(parameters('subnet1Name'),'-CSR-RouteTable')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + }, + { + "name": "Default-Route-To-CSR", "properties": { - "routes": [ - { - "name": "Route-Subnet2-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - } - ] + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" } - }, - { - "type": "Microsoft.Network/routeTables", - "name": "[concat(parameters('subnet2Name'),'-CSR-RouteTable')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmName'),'-Nic0')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "routes": [ - { - "name": "Route-Subnet1-To-CSR", - "properties": { - "addressPrefix": "[reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - }, - { - "name": "Default-Route-To-CSR", - "properties": { - "addressPrefix": "0.0.0.0/0", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]" - } - } - ] + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[string(take(split(replace(reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]", + "subnet": { + "id": "[variables('subnet1ResourceId')]" + }, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgname'))]" + } } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmName'),'-Nic0')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" - ], + } + ], + "enableIPForwarding": true + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmName'),'-Nic1')]", + "location": "[parameters('location')]", + "dependsOn": [], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[string(take(split(replace(reference(variables('subnet1ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]", - "subnet": { - "id": "[variables('subnet1ResourceId')]" - }, - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgname'))]" - } - } - } - ], - "enableIPForwarding": true + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]", + "subnet": { + "id": "[variables('subnet2ResourceId')]" + } } + } + ], + "enableIPForwarding": true + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "location": "[parameters('location')]", + "plan": { + "name": "csr-azure-byol", + "publisher": "cisco", + "product": "cisco-csr-1000v" + }, + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic0'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic1'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[variables('vmSize')]" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmName'),'-Nic1')]", - "location": "[resourceGroup().location]", - "dependsOn": [ ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[string(take(split(replace(reference(variables('subnet2ResourceId'), '2015-06-15').addressPrefix, '0/', '4/'), '/'), 1)[0])]", - "subnet": { - "id": "[variables('subnet2ResourceId')]" - } - } - } - ], - "enableIPForwarding": true - } + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "plan": { - "name": "csr-azure-byol", - "publisher": "cisco", - "product": "cisco-csr-1000v" + "storageProfile": { + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[variables('imageSKU')]", + "version": "latest" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob, 'vhds/osdisk.vhd')]" }, - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic0'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic1'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[variables('imageSKU')]", - "version": "latest" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob, 'vhds/osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "properties": { - "primary": true - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic0'))]" - }, - { - "properties": { - "primary": false - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic1'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob]" - } - } + "caching": "ReadWrite", + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "properties": { + "primary": true + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic0'))]" + }, + { + "properties": { + "primary": false + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic1'))]" } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob]" + } } - ], - "outputs": { - "hostname": { - "type": "string", - "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" - } + } + } + ], + "outputs": { + "hostname": { + "type": "string", + "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" } -} \ No newline at end of file + } +} diff --git a/cisco-csr-1000v/azuredeploy.json b/cisco-csr-1000v/azuredeploy.json index e85703f693d9..17b93a039bfb 100644 --- a/cisco-csr-1000v/azuredeploy.json +++ b/cisco-csr-1000v/azuredeploy.json @@ -1,309 +1,316 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "metadata": { - "description": "Username for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username for the Virtual Machine." + } }, - "variables": { - "imagePublisher": "cisco", - "imageOffer": "cisco-csr-1000v", - "imageSKU": "csr-azure-byol", - "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", - "publicIPAddressName": "publicIP", - "dnsPrefix": "[concat('csr-', uniqueString(resourceGroup().id))]", - "vmName": "CSR", - "vmSize": "Standard_D2_V2", - "vnetName": "CSR_Network", - "subnet1Name": "Subnet-1", - "subnet2Name": "Subnet-2", - "subnet1Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('Subnet1Name'))]", - "subnet2Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('Subnet2Name'))]", - "addressPrefix": "10.1.0.0/16", - "subnet1Prefix": "10.1.0.0/24", - "subnet2Prefix": "10.1.1.0/24", - "subnet1StartAddress": "10.1.0.4", - "subnet2StartAddress": "10.1.1.4", - "nsgname": "[concat(variables('vmName'),'-SSH-SecurityGroup')]" + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the Virtual Machine." + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": {} + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "imagePublisher": "cisco", + "imageOffer": "cisco-csr-1000v", + "imageSKU": "csr-azure-byol", + "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", + "publicIPAddressName": "publicIP", + "dnsPrefix": "[concat('csr-', uniqueString(resourceGroup().id))]", + "vmName": "CSR", + "vmSize": "Standard_D2_V2", + "vnetName": "CSR_Network", + "subnet1Name": "Subnet-1", + "subnet2Name": "Subnet-2", + "subnet1Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('Subnet1Name'))]", + "subnet2Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('Subnet2Name'))]", + "addressPrefix": "10.1.0.0/16", + "subnet1Prefix": "10.1.0.0/24", + "subnet2Prefix": "10.1.1.0/24", + "subnet1StartAddress": "10.1.0.4", + "subnet2StartAddress": "10.1.1.4", + "nsgname": "[concat(variables('vmName'),'-SSH-SecurityGroup')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[variables('dnsPrefix')]" + } + } + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('vnetName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "subnets": [ + { + "name": "[variables('subnet1Name')]", "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('dnsPrefix')]" - } + "addressPrefix": "[variables('subnet1Prefix')]" } - }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('vnetName')]", - "location": "[resourceGroup().location]", + }, + { + "name": "[variables('subnet2Name')]", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnet1Name')]", - "properties": { - "addressPrefix": "[variables('subnet1Prefix')]" - } - }, - { - "name": "[variables('subnet2Name')]", - "properties": { - "addressPrefix": "[variables('subnet2Prefix')]" - } - } - ] + "addressPrefix": "[variables('subnet2Prefix')]" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('nsgName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "SSH-Rule", "properties": { - "securityRules": [ - { - "name": "SSH-Rule", - "properties": { - "description": "Allow SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 100, - "direction": "Inbound" - } - }, - { - "name": "UDP-Rule1", - "properties": { - "description": "Allow UDP", - "protocol": "Udp", - "sourcePortRange": "*", - "destinationPortRange": "500", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 101, - "direction": "Inbound" - } - }, - { - "name": "UDP-Rule2", - "properties": { - "description": "Allow UDP", - "protocol": "Udp", - "sourcePortRange": "*", - "destinationPortRange": "4500", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 102, - "direction": "Inbound" - } - } - ] + "description": "Allow SSH", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" } - }, - { - "type": "Microsoft.Network/routeTables", - "name": "[concat(variables('subnet1Name'),'-CSR-RouteTable')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + }, + { + "name": "UDP-Rule1", "properties": { - "routes": [ - { - "name": "Route-Subnet2-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet2Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet1StartAddress')]" - } - } - ] + "description": "Allow UDP", + "protocol": "Udp", + "sourcePortRange": "*", + "destinationPortRange": "500", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 101, + "direction": "Inbound" } - }, - { - "type": "Microsoft.Network/routeTables", - "name": "[concat(variables('subnet2Name'),'-CSR-RouteTable')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + }, + { + "name": "UDP-Rule2", "properties": { - "routes": [ - { - "name": "Route-Subnet1-To-CSR", - "properties": { - "addressPrefix": "[variables('subnet1Prefix')]", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet2StartAddress')]" - } - }, - { - "name": "Default-Route-To-CSR", - "properties": { - "addressPrefix": "0.0.0.0/0", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[variables('subnet2StartAddress')]" - } - } - ] + "description": "Allow UDP", + "protocol": "Udp", + "sourcePortRange": "*", + "destinationPortRange": "4500", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 102, + "direction": "Inbound" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmName'),'-Nic0')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", - "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" - ], + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "name": "[concat(variables('subnet1Name'),'-CSR-RouteTable')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "routes": [ + { + "name": "Route-Subnet2-To-CSR", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[variables('subnet1StartAddress')]", - "subnet": { - "id": "[variables('subnet1Ref')]" - }, - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgname'))]" - } - } - } - ], - "enableIPForwarding": true + "addressPrefix": "[variables('subnet2Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet1StartAddress')]" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmName'),'-Nic1')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]" - ], + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "name": "[concat(variables('subnet2Name'),'-CSR-RouteTable')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "routes": [ + { + "name": "Route-Subnet1-To-CSR", + "properties": { + "addressPrefix": "[variables('subnet1Prefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet2StartAddress')]" + } + }, + { + "name": "Default-Route-To-CSR", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[variables('subnet2StartAddress')]" + } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmName'),'-Nic0')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", + "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('subnet1StartAddress')]", + "subnet": { + "id": "[variables('subnet1Ref')]" + }, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgname'))]" + } + } + } + ], + "enableIPForwarding": true + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('vmName'),'-Nic1')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[variables('subnet2StartAddress')]", - "subnet": { - "id": "[variables('subnet2Ref')]" - } - } - } - ], - "enableIPForwarding": true + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('subnet2StartAddress')]", + "subnet": { + "id": "[variables('subnet2Ref')]" + } } + } + ], + "enableIPForwarding": true + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "location": "[parameters('location')]", + "plan": { + "name": "csr-azure-byol", + "publisher": "cisco", + "product": "cisco-csr-1000v" + }, + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic0'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic1'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[variables('vmSize')]" + }, + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "plan": { - "name": "csr-azure-byol", - "publisher": "cisco", - "product": "cisco-csr-1000v" + "storageProfile": { + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[variables('imageSKU')]", + "version": "latest" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob, 'vhds/osdisk.vhd')]" }, - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic0'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('vmName'), '-Nic1'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[variables('imageSKU')]", - "version": "latest" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob, 'vhds/osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "properties": { - "primary": true - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic0'))]" - }, - { - "properties": { - "primary": false - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic1'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob]" - } - } + "caching": "ReadWrite", + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "properties": { + "primary": true + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic0'))]" + }, + { + "properties": { + "primary": false + }, + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmName'),'-Nic1'))]" } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob]" + } } - ], - "outputs": { - "hostname": { - "type": "string", - "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" - } + } + } + ], + "outputs": { + "hostname": { + "type": "string", + "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" } -} \ No newline at end of file + } +} diff --git a/cloudbeesjenkins-dockerdatacenter/nested/storage.json b/cloudbeesjenkins-dockerdatacenter/nested/storage.json index 68eb9c92a211..829197a045e2 100755 --- a/cloudbeesjenkins-dockerdatacenter/nested/storage.json +++ b/cloudbeesjenkins-dockerdatacenter/nested/storage.json @@ -22,7 +22,7 @@ }, "location": { "type": "string", - "defaultValue": "westus", + "defaultValue": "[resourceGroup().location]", "metadata": { "description": "Storage Account Deployment Location" } @@ -79,4 +79,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-director-on-centos/director-node-and-shared-resources.json b/cloudera-director-on-centos/director-node-and-shared-resources.json index 1a90bb4c61a7..673f9426f482 100755 --- a/cloudera-director-on-centos/director-node-and-shared-resources.json +++ b/cloudera-director-on-centos/director-node-and-shared-resources.json @@ -3,10 +3,10 @@ "contentVersion": "1.0.0.1", "parameters": { "vnetID": { - "type":"string" + "type": "string" }, - "version":{ - "type":"object" + "version": { + "type": "object" }, "dnsNamePrefix": { "type": "string" @@ -31,6 +31,13 @@ }, "clusterParameters": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -41,37 +48,37 @@ "storageAccountName": "[concat(parameters('storageAccount').prefix, 'dir')]", "storageAccountContainerName": "vhds", "dirSecurityGroupName": "[concat(parameters('dnsNamePrefix'), '-dir-sg')]", - "masterAsName":"asmaster", - "workerAsName":"asworker", - "edgeAsName":"asedge" + "masterAsName": "asmaster", + "workerAsName": "asworker", + "edgeAsName": "asedge" }, "resources": [ { "apiVersion": "[parameters('version').resourceAPIVersion]", "type": "Microsoft.Compute/availabilitySets", "name": "[variables('masterAsName')]", - "location": "[resourceGroup().location]", - "properties": { } + "location": "[parameters('location')]", + "properties": {} }, { "apiVersion": "[parameters('version').resourceAPIVersion]", "type": "Microsoft.Compute/availabilitySets", "name": "[variables('workerAsName')]", - "location": "[resourceGroup().location]", - "properties": { } + "location": "[parameters('location')]", + "properties": {} }, { "apiVersion": "[parameters('version').resourceAPIVersion]", "type": "Microsoft.Compute/availabilitySets", "name": "[variables('edgeAsName')]", - "location": "[resourceGroup().location]", - "properties": { } + "location": "[parameters('location')]", + "properties": {} }, { "apiVersion": "[parameters('version').resourceAPIVersion]", "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('networkSpec').virtualNetworkName,'-nsg')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -95,7 +102,7 @@ "apiVersion": "[parameters('version').resourceAPIVersion]", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('dirSecurityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -119,7 +126,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "[parameters('version').resourceAPIVersion]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccount').type]" } @@ -128,7 +135,7 @@ "apiVersion": "[parameters('version').resourceAPIVersion]", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -140,7 +147,7 @@ "apiVersion": "[parameters('version').resourceAPIVersion]", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('dirSecurityGroupName'))]" @@ -175,7 +182,7 @@ "publisher": "cloudera", "product": "cloudera-centos-6" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]", "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" @@ -233,7 +240,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '/bootstrapServer')]", "apiVersion": "[parameters('version').resourceAPIVersion]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -253,7 +260,7 @@ "[concat(parameters('scriptsUri'), '/scripts/director_user_passwd.py')]" ] }, - "protectedSettings":{ + "protectedSettings": { "commandToExecute": "[concat('sh initialize-director-server.sh ', variables('singleQuote'), parameters('vmSpec').adminUsername, variables('singleQuote'), ' ', variables('singleQuote'), parameters('dnsNameSuffix'), variables('singleQuote'), ' ', variables('singleQuote'), parameters('networkSpec').directorServerIPAddress, variables('singleQuote'), ' ', variables('singleQuote'), parameters('vmSpec').dbUsername, variables('singleQuote'), ' ', variables('singleQuote'), parameters('vmSpec').dbPassword, variables('singleQuote'), ' ', variables('singleQuote'), parameters('userInfo').company, variables('singleQuote'), ' ', variables('singleQuote'), parameters('userInfo').emailAddress, variables('singleQuote'), ' ', variables('singleQuote'), parameters('userInfo').businessPhone, variables('singleQuote'), ' ', variables('singleQuote'), parameters('userInfo').firstName, variables('singleQuote'), ' ', variables('singleQuote'), parameters('userInfo').lastName, variables('singleQuote'), ' ', variables('singleQuote'), parameters('userInfo').jobRole, variables('singleQuote'), ' ', variables('singleQuote'), parameters('userInfo').jobFunction, variables('singleQuote'), ' ', variables('singleQuote'), parameters('clusterParameters').dirUsername, variables('singleQuote'), ' ', variables('singleQuote'), parameters('clusterParameters').dirPassword, variables('singleQuote'))]" } } diff --git a/cloudera-director-on-centos/prepare-conf-launch-cluster.json b/cloudera-director-on-centos/prepare-conf-launch-cluster.json index 5fe11c65791e..0fbe329efa21 100755 --- a/cloudera-director-on-centos/prepare-conf-launch-cluster.json +++ b/cloudera-director-on-centos/prepare-conf-launch-cluster.json @@ -2,17 +2,24 @@ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.1", "parameters": { - "version":{ - "type":"object" + "version": { + "type": "object" }, - "vmName":{ - "type":"string" + "vmName": { + "type": "string" }, - "scriptsUri":{ - "type":"string" + "scriptsUri": { + "type": "string" }, - "clusterParameters":{ - "type":"secureObject" + "clusterParameters": { + "type": "secureObject" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -23,7 +30,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/bootstrapServer')]", "apiVersion": "[parameters('version').resourceAPIVersion]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", diff --git a/cloudera-director-on-centos/shared-resources-new-vnet.json b/cloudera-director-on-centos/shared-resources-new-vnet.json index c544eb2824e4..9705fffd00de 100755 --- a/cloudera-director-on-centos/shared-resources-new-vnet.json +++ b/cloudera-director-on-centos/shared-resources-new-vnet.json @@ -2,11 +2,18 @@ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.1", "parameters": { - "version":{ - "type":"object" + "version": { + "type": "object" }, "networkSpec": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -14,7 +21,7 @@ "apiVersion": "[parameters('version').resourceAPIVersion]", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSpec').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ diff --git a/cloudera-director-on-centos/update-new-vnet-dns.json b/cloudera-director-on-centos/update-new-vnet-dns.json index d75529179bf9..947a7d26f8a0 100755 --- a/cloudera-director-on-centos/update-new-vnet-dns.json +++ b/cloudera-director-on-centos/update-new-vnet-dns.json @@ -2,11 +2,18 @@ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.1", "parameters": { - "version":{ - "type":"object" + "version": { + "type": "object" }, "networkSpec": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -15,7 +22,7 @@ "apiVersion": "[parameters('version').resourceAPIVersion]", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSpec').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "dhcpOptions": { "dnsServers": [ diff --git a/cloudera-on-centos/data-node-ds13.json b/cloudera-on-centos/data-node-ds13.json index fee9ea294094..2da387dde10c 100755 --- a/cloudera-on-centos/data-node-ds13.json +++ b/cloudera-on-centos/data-node-ds13.json @@ -28,6 +28,13 @@ }, "clusterSpec": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -44,7 +51,7 @@ { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -67,7 +74,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[concat(uniquestring(concat(copyIndex(), 'dn', resourceGroup().id)), variables('storageAccountName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "storageAccountLoop", "count": "[parameters('vmCount')]" @@ -79,7 +86,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "publicIPLoop", "count": "[parameters('vmCount')]" @@ -94,7 +101,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'), copyIndex())]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('securityGroupName'))]" @@ -132,7 +139,7 @@ "publisher": "cloudera", "product": "cloudera-centos-6" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "dataNodeNicLoop", "count": "[parameters('vmCount')]" @@ -240,7 +247,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyIndex(), '/prepareDisks')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "dataNodeNicLoop", "count": "[parameters('vmCount')]" @@ -263,4 +270,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-on-centos/data-node-ds14.json b/cloudera-on-centos/data-node-ds14.json index d1c64d17e9ef..2ebdfeca7d8b 100755 --- a/cloudera-on-centos/data-node-ds14.json +++ b/cloudera-on-centos/data-node-ds14.json @@ -28,6 +28,13 @@ }, "clusterSpec": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -44,7 +51,7 @@ { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -67,7 +74,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[concat(uniquestring(concat(copyIndex(), 'dn', resourceGroup().id)), variables('storageAccountName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "storageAccountLoop", "count": "[parameters('vmCount')]" @@ -79,7 +86,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "publicIPLoop", "count": "[parameters('vmCount')]" @@ -94,7 +101,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'), copyIndex())]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('securityGroupName'))]" @@ -132,7 +139,7 @@ "publisher": "cloudera", "product": "cloudera-centos-6" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "dataNodeNicLoop", "count": "[parameters('vmCount')]" @@ -285,7 +292,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyIndex(), '/prepareDisks')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "dataNodeNicLoop", "count": "[parameters('vmCount')]" @@ -308,4 +315,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-on-centos/master-node.json b/cloudera-on-centos/master-node.json index c7805e50ae6d..c8ca88ead516 100755 --- a/cloudera-on-centos/master-node.json +++ b/cloudera-on-centos/master-node.json @@ -28,6 +28,13 @@ }, "clusterSpec": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -44,7 +51,7 @@ { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -67,7 +74,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[concat(uniquestring(concat(copyIndex(), 'mn', resourceGroup().id)), variables('storageAccountName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "storageAccountLoop", "count": "[parameters('vmCount')]" @@ -79,7 +86,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "publicIPLoop", "count": "[parameters('vmCount')]" @@ -94,7 +101,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'), copyIndex())]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('securityGroupName'))]" @@ -128,7 +135,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyIndex())]", "plan": "[parameters('vmSpec').imageInfo.plan]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "masterNodeNicLoop", "count": "[parameters('vmCount')]" @@ -213,7 +220,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyIndex(), '/prepareDisks')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nameNodeNicLoop", "count": "[parameters('vmCount')]" @@ -242,4 +249,4 @@ "value": "[reference(concat(variables('publicIPAddressName'), '0')).dnsSettings.fqdn]" } } -} \ No newline at end of file +} diff --git a/cloudera-on-centos/setup-cloudera.json b/cloudera-on-centos/setup-cloudera.json index 6770d72b666c..01be1b8e2891 100755 --- a/cloudera-on-centos/setup-cloudera.json +++ b/cloudera-on-centos/setup-cloudera.json @@ -52,6 +52,13 @@ }, "installCDH": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -63,7 +70,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('dnsNamePrefix'), '-mn0', '/prepareDisks')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", @@ -83,4 +90,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-on-centos/shared-resources-existing-vnet.json b/cloudera-on-centos/shared-resources-existing-vnet.json index c6d769612950..8013d0ab4b26 100755 --- a/cloudera-on-centos/shared-resources-existing-vnet.json +++ b/cloudera-on-centos/shared-resources-existing-vnet.json @@ -13,6 +13,13 @@ }, "dataNodeASName": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -20,19 +27,19 @@ { "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('masterNodeASName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('dataNodeASName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('networkSpec').virtualNetworkName, '-sg')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -53,4 +60,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-on-centos/shared-resources-new-vnet.json b/cloudera-on-centos/shared-resources-new-vnet.json index 938b51c89ded..603e77a36645 100755 --- a/cloudera-on-centos/shared-resources-new-vnet.json +++ b/cloudera-on-centos/shared-resources-new-vnet.json @@ -13,6 +13,13 @@ }, "dataNodeASName": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -20,19 +27,19 @@ { "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('masterNodeASName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('dataNodeASName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('networkSpec').virtualNetworkName, '-sg')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -58,7 +65,7 @@ "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSpec').virtualNetworkName, '-sg')]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -79,4 +86,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-on-centos/vm-10-datadisks.json b/cloudera-on-centos/vm-10-datadisks.json index 0949accd7695..21d395e3dfe6 100755 --- a/cloudera-on-centos/vm-10-datadisks.json +++ b/cloudera-on-centos/vm-10-datadisks.json @@ -28,6 +28,13 @@ }, "clusterSpec": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -44,7 +51,7 @@ { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -67,7 +74,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[concat(uniquestring(concat(copyIndex(), 'dn', resourceGroup().id)), variables('storageAccountName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "storageAccountLoop", "count": "[parameters('vmCount')]" @@ -79,7 +86,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "publicIPLoop", "count": "[parameters('vmCount')]" @@ -94,7 +101,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'), copyIndex())]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('securityGroupName'))]" @@ -128,7 +135,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyIndex())]", "plan": "[parameters('vmSpec').imageInfo.plan]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "dataNodeNicLoop", "count": "[parameters('vmCount')]" @@ -276,7 +283,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyIndex(), '/prepareDisks')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "dataNodeNicLoop", "count": "[parameters('vmCount')]" @@ -299,4 +306,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-on-centos/vm-5-datadisks.json b/cloudera-on-centos/vm-5-datadisks.json index f5f8b05dc9e2..2f06d51d6cf1 100755 --- a/cloudera-on-centos/vm-5-datadisks.json +++ b/cloudera-on-centos/vm-5-datadisks.json @@ -28,6 +28,13 @@ }, "clusterSpec": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -44,7 +51,7 @@ { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -67,7 +74,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[concat(uniquestring(concat(copyIndex(), 'dn', resourceGroup().id)), variables('storageAccountName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "storageAccountLoop", "count": "[parameters('vmCount')]" @@ -79,7 +86,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "publicIPLoop", "count": "[parameters('vmCount')]" @@ -94,7 +101,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'), copyIndex())]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('securityGroupName'))]" @@ -128,7 +135,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyIndex())]", "plan": "[parameters('vmSpec').imageInfo.plan]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "dataNodeNicLoop", "count": "[parameters('vmCount')]" @@ -231,7 +238,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyIndex(), '/prepareDisks')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "dataNodeNicLoop", "count": "[parameters('vmCount')]" @@ -254,4 +261,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-tableau/nested/data-node-ds13.json b/cloudera-tableau/nested/data-node-ds13.json index a7c9f11e2ad2..e773caba6ad5 100644 --- a/cloudera-tableau/nested/data-node-ds13.json +++ b/cloudera-tableau/nested/data-node-ds13.json @@ -37,6 +37,13 @@ }, "quickstartTags": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -52,7 +59,7 @@ { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Shared Resources Network Security Group Rules", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -276,7 +283,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[concat(copyIndex(), variables('storageAccountName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Data Node storage account configurations", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -293,7 +300,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Data Node Public IP Address configuration", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -313,7 +320,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Data Node network interface configuration", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -356,7 +363,7 @@ "publisher": "cloudera", "product": "cloudera-centos-6" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Data Node virtual machines configurations", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -485,7 +492,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyIndex(), '/prepareDisks')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Data Node VM Extensions and scripts to configure the Cloudera cluster", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -513,4 +520,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-tableau/nested/data-node-ds14.json b/cloudera-tableau/nested/data-node-ds14.json index d64e91761cc4..d7bbdf1e4d31 100644 --- a/cloudera-tableau/nested/data-node-ds14.json +++ b/cloudera-tableau/nested/data-node-ds14.json @@ -37,6 +37,13 @@ }, "quickstartTags": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -52,7 +59,7 @@ { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Shared Resources Network Security Group Rules", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -276,7 +283,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[concat(copyIndex(), variables('storageAccountName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Master Node storage account configurations", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -293,7 +300,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Master Node Public IP Address configuration", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -313,7 +320,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Master Node network interface configuration", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -360,7 +367,7 @@ "publisher": "cloudera", "product": "cloudera-centos-6" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Master Node virtual machines configurations", "copy": { "name": "dataNodeNicLoop", @@ -530,7 +537,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyIndex(), '/prepareDisks')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Master Node VM Extensions and scripts to configure the Cloudera cluster", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -558,4 +565,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-tableau/nested/master-node.json b/cloudera-tableau/nested/master-node.json index 138b44da0f16..7a7f639cb43b 100644 --- a/cloudera-tableau/nested/master-node.json +++ b/cloudera-tableau/nested/master-node.json @@ -37,6 +37,13 @@ }, "quickstartTags": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -52,7 +59,7 @@ { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Shared Resources Network Security Group Rules", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -276,7 +283,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[concat(copyIndex(), variables('storageAccountName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Master Node storage account configurations", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -293,7 +300,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Master Node Public IP Address configuration", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -313,7 +320,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Master Node network interface configuration", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -351,7 +358,7 @@ { "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Master Node virtual machines configurations", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -446,7 +453,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyIndex(), '/prepareDisks')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Master Node VM Extensions and scripts to configure the Cloudera cluster", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -480,4 +487,4 @@ "value": "[reference(concat(variables('publicIPAddressName'), '0')).dnsSettings.fqdn]" } } -} \ No newline at end of file +} diff --git a/cloudera-tableau/nested/setup-cloudera.json b/cloudera-tableau/nested/setup-cloudera.json index fd7e9aa4637c..4e69d0e33146 100644 --- a/cloudera-tableau/nested/setup-cloudera.json +++ b/cloudera-tableau/nested/setup-cloudera.json @@ -61,6 +61,13 @@ }, "quickstartTags": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -71,7 +78,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('dnsNamePrefix'), '-mn0', '/prepareDisks')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Cloudera Setup extensions that run to configure the Cloudera cluster environment", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -96,4 +103,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-tableau/nested/shared-resources-existing-vnet.json b/cloudera-tableau/nested/shared-resources-existing-vnet.json index d936a67c1732..aa3ccd59ca22 100644 --- a/cloudera-tableau/nested/shared-resources-existing-vnet.json +++ b/cloudera-tableau/nested/shared-resources-existing-vnet.json @@ -25,6 +25,13 @@ }, "quickstartTags": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -32,7 +39,7 @@ { "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('masterNodeASName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Master Node Name", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -43,7 +50,7 @@ { "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('dataNodeASName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Data Node Name", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -54,7 +61,7 @@ { "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('tableauASName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Tableau Server Name", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -65,7 +72,7 @@ { "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('networkSpec').virtualNetworkName, '-sg')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Shared Resources Network Security Group Rules", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -287,4 +294,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-tableau/nested/shared-resources-new-vnet.json b/cloudera-tableau/nested/shared-resources-new-vnet.json index ea45ae63cf20..437457b978cb 100644 --- a/cloudera-tableau/nested/shared-resources-new-vnet.json +++ b/cloudera-tableau/nested/shared-resources-new-vnet.json @@ -25,6 +25,13 @@ }, "quickstartTags": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -32,7 +39,7 @@ { "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('masterNodeASName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Master Node Name", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -43,7 +50,7 @@ { "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('dataNodeASName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Data Node Name", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -54,7 +61,7 @@ { "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('tableauASName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Tableau Server Name", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -65,7 +72,7 @@ { "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('networkSpec').virtualNetworkName, '-sg')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Provides Network Security Group rules", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -306,7 +313,7 @@ "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSpec').virtualNetworkName, '-sg')]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Shared Resources Virtual Network configuration", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -341,4 +348,4 @@ } } ] -} \ No newline at end of file +} diff --git a/cloudera-tableau/nested/tableau-server.json b/cloudera-tableau/nested/tableau-server.json index 586502e7c67e..6199897a8478 100644 --- a/cloudera-tableau/nested/tableau-server.json +++ b/cloudera-tableau/nested/tableau-server.json @@ -55,6 +55,13 @@ }, "quickstartTags": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -76,7 +83,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Utilizes the Cloudera master storage account", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -90,7 +97,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Tableau Server Public IP Address", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -104,7 +111,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Tableau Server nic name", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -134,7 +141,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Tableau Server VM", "tags": { "quickstartName": "[parameters('quickstartTags').name]", @@ -195,4 +202,4 @@ } } ] -} \ No newline at end of file +} diff --git a/concourse-ci/azuredeploy.json b/concourse-ci/azuredeploy.json index 04f954b2b265..2926264af634 100644 --- a/concourse-ci/azuredeploy.json +++ b/concourse-ci/azuredeploy.json @@ -43,7 +43,7 @@ }, "environment": { "type": "string", - "defaultValue" : "AzureCloud", + "defaultValue": "AzureCloud", "allowedValues": [ "AzureCloud" ], @@ -90,6 +90,13 @@ "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." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -97,7 +104,6 @@ "storageAccountType": "Standard_RAGRS", "vmStorageAccountContainerName": "vhds", "storageid": "[resourceId('Microsoft.Storage/storageAccounts', variables('defaultStorageAccountName'))]", - "virtualNetworkName": "vnet", "virtualNetworkAddressSpace": "10.0.0.0/16", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", @@ -111,7 +117,6 @@ "concourseNetworkSecurityGroup": "nsg-concourse", "concourseDbRoleName": "admin", "concourseDbRolePassword": "admin", - "vmSize": "Standard_D1", "nicName": "[parameters('vmName')]", "devboxPrivateIPAddress": "10.0.0.100", @@ -119,7 +124,6 @@ "imageOffer": "UbuntuServer", "ubuntuOSVersion": "14.04.3-LTS", "sshKeyPath": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]", - "baseUriAzureCloud": "[parameters('_artifactsLocation')]", "filesToDownloadAzureCloud": [ "[uri(variables('baseUriAzureCloud'), 'scripts/setup_env')]", @@ -133,7 +137,6 @@ "[uri(variables('baseUriAzureCloud'), 'manifests/concourse.yml')]" ], "filesToDownload": "[variables(concat('filesToDownload', parameters('environment')))]", - "environmentAzureCloud": { "serviceHostBase": "core.windows.net", "boshReleaseUrl": "https://bosh.io/d/github.com/cloudfoundry/bosh?v=260.3", @@ -147,7 +150,6 @@ "gardenReleaseUrl": "https://github.com/concourse/concourse/releases/download/v2.6.0/garden-runc-1.0.4.tgz" }, "environment": "[variables(concat('environment', parameters('environment')))]", - "keepUnreachableVMs": "false" }, "resources": [ @@ -155,7 +157,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('boshNetworkSecurityGroup')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -221,7 +223,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('devboxNetworkSecurityGroup')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -245,7 +247,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('concourseNetworkSecurityGroup')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -353,7 +355,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('defaultStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -362,7 +364,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('vmName'),'-devbox')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -374,7 +376,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('vmName'), '-bosh')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "static" } @@ -383,7 +385,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('vmName'), '-concourse')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "static" } @@ -392,7 +394,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -419,7 +421,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', concat(parameters('vmName'), '-devbox'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", @@ -504,7 +506,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Resources/deployments/generate-customdata" ], @@ -557,7 +559,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/initdevbox')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], diff --git a/consul-on-ubuntu/azuredeploy.json b/consul-on-ubuntu/azuredeploy.json index 0bc10ea16176..2985395aa553 100644 --- a/consul-on-ubuntu/azuredeploy.json +++ b/consul-on-ubuntu/azuredeploy.json @@ -47,6 +47,13 @@ "metadata": { "description": "The name of your existing infrastructure in Atlas (username/infraName)" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -54,11 +61,9 @@ "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetIDRef'))]", "subnet1Name": "Subnet-1", "customScriptFilePath": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/consul-on-ubuntu/install-consul.sh", - "vmStorageAccountContainerName": "vhds", "addressPrefix": "10.0.0.0/16", "subnet1Ref": "[concat(variables('vnetID'),'/subnets/', variables('subnet1Name'))]", "numberOfInstances": 3, - "apiVersion": "2015-06-15", "customScriptCommandToExecute": "bash install-consul.sh", "subnet1Prefix": "10.0.0.0/24", "publicIPAddressType": "Dynamic", @@ -73,14 +78,14 @@ "accountType": "Standard_LRS" }, "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "name": "[variables('storageAccountName')]" }, { "name": "[concat('publicIP', copyindex())]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "count": "[variables('numberOfInstances')]", "name": "ipLoop" @@ -93,7 +98,7 @@ { "properties": {}, "type": "Microsoft.Compute/availabilitySets", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "name": "[concat(parameters('appPrefix'),'_AS')]" }, @@ -117,14 +122,14 @@ ] }, "type": "Microsoft.Network/networkSecurityGroups", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "name": "[concat(parameters('appPrefix'),'_SG')]" }, { "name": "[concat(parameters('appPrefix'),'_VNET')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', parameters('appPrefix'),'_SG')]" ], @@ -148,7 +153,7 @@ { "name": "[concat(parameters('appPrefix'),'_LB')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('appPrefix'),'_VNET')]" ], @@ -205,7 +210,7 @@ { "name": "[concat(parameters('appPrefix'),'_nic1', copyindex())]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', 'publicIP', copyindex())]", "[concat('Microsoft.Network/virtualNetworks/', parameters('appPrefix'),'_VNET')]", @@ -244,7 +249,7 @@ { "name": "[concat(parameters('appPrefix'), '_vm', copyIndex())]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('appPrefix'),'_nic1', copyIndex())]", "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", @@ -298,7 +303,7 @@ { "name": "[concat(parameters('appPrefix'), '_vm', copyIndex(), '/extension')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('appPrefix'), '_vm', copyIndex())]" ], @@ -323,4 +328,4 @@ } } ] -} \ No newline at end of file +} diff --git a/coreos-with-fleet-multivm/azuredeploy.json b/coreos-with-fleet-multivm/azuredeploy.json index 486edebef5e6..c5941380e8a8 100644 --- a/coreos-with-fleet-multivm/azuredeploy.json +++ b/coreos-with-fleet-multivm/azuredeploy.json @@ -47,6 +47,13 @@ "metadata": { "description": "discoveryUrl for etcd2 cluster" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -59,7 +66,6 @@ "subnet1Ref": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]", "vmNamePrefix": "coreos", "imageSku": "Stable", - "vmStorageAccountContainerName": "vhds", "storageAccountType": "Standard_LRS", "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", "unitFile": "[concat('#cloud-config\n\ncoreos:\n etcd2:\n discovery: ', parameters('discoveryUrl'),'\n advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001\n initial-advertise-peer-urls: http://$private_ipv4:2380\n listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001\n listen-peer-urls: http://$private_ipv4:2380\n units:\n - name: etcd2.service\n command: start\n - name: fleet.service\n command: start')]" @@ -68,7 +74,7 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "properties": { "accountType": "[variables('storageAccountType')]" @@ -81,7 +87,7 @@ "name": "ipLoop", "count": "[parameters('numberOfNodes')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]" @@ -90,7 +96,7 @@ { "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "properties": { "addressSpace": { @@ -115,7 +121,7 @@ "name": "nicLoop", "count": "[parameters('numberOfNodes')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', 'publicIP', copyindex())]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -145,7 +151,7 @@ "name": "vmLoop", "count": "[parameters('numberOfNodes')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', 'nic', copyindex())]" diff --git a/coscale-dev-env/azuredeploy.json b/coscale-dev-env/azuredeploy.json index ed0c4c91fe25..b7eba4a181e2 100644 --- a/coscale-dev-env/azuredeploy.json +++ b/coscale-dev-env/azuredeploy.json @@ -26,14 +26,21 @@ "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." }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/coscale-dev-env/" + }, + "_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." }, - "_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": "" + "defaultValue": "" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." } + } }, "variables": { "newStorageAccountName": "[concat(uniquestring(resourceGroup().id), 'stg')]", @@ -57,7 +64,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Premium_LRS" } @@ -66,7 +73,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Static", "dnsSettings": { @@ -78,7 +85,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -99,7 +106,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSecurityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -148,7 +155,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", @@ -178,7 +185,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -243,7 +250,7 @@ "type": "extensions", "name": "[concat(variables('vmName'),'-install')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/create-hpc-cluster-custom-image/azuredeploy.json b/create-hpc-cluster-custom-image/azuredeploy.json index b174d3fd6e44..605f6c1ea7df 100644 --- a/create-hpc-cluster-custom-image/azuredeploy.json +++ b/create-hpc-cluster-custom-image/azuredeploy.json @@ -188,6 +188,13 @@ "metadata": { "description": "Optional URL of a public available PowerShell script you want to run on the compute nodes after they are configured. The script will be run as the Local System account. You can also specify arguments for the script, for example 'http://www.contoso.com/mycnpostscript.ps1 -Arg1 arg1 -Arg2 arg2'." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -197,7 +204,6 @@ "hnStorageAccountId": "[resourceId('Microsoft.Storage/storageAccounts',variables('hnStorageAccountName'))]", "storageAccountType": "Standard_LRS", "publicIPAddressName": "[concat(parameters('clusterName'), '-PublicIP-HN')]", - "computeNodeImageOsPlatform": "Windows", "addressPrefix": "10.0.0.0/16", "subnet1Name": "Subnet-1", "subnet1Prefix": "10.0.0.0/22", @@ -230,7 +236,7 @@ "cnRDMAState": "[variables('cnRDMACapable')]", "computeNodeCustomData": "[base64(concat('HPCClusterName=', parameters('clusterName'), '\r\nImageCategory=public\r\nImageName=UserCustomedImage\r\nVMSize=', parameters('computeNodeVMSize')))]", "adminBase64Password": "[base64(parameters('adminPassword'))]", - "iaasInfoArg": "[concat('-SubscriptionId ', subscription().subscriptionId, ' -VNet ', variables('virtualNetworkName'), ' -Subnet ', variables('subnet1Name'), ' -Location \"', resourceGroup().location, '\" -ResourceGroup ', resourceGroup().name)]", + "iaasInfoArg": "[concat('-SubscriptionId ', subscription().subscriptionId, ' -VNet ', variables('virtualNetworkName'), ' -Subnet ', variables('subnet1Name'), ' -Location \"', parameters('location'), '\" -ResourceGroup ', resourceGroup().name)]", "headNodeCommandStr": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File PrepareHN.ps1 -DomainFQDN ', parameters('privateDomainName'), ' -AdminUserName ', parameters('adminUsername'), ' -AdminBase64Password \"', variables('adminBase64Password'), '\" -CNSize ', parameters('computeNodeVMSize'), ' -PostConfigScript \"', base64(trim(parameters('headNodePostConfigScript'))), '\" ', variables('iaasInfoArg'))]", "hnStorageConnStrPrefix": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('hnStorageAccountName'), ';AccountKey=')]", "artifactsBaseUrl": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/create-hpc-cluster-custom-image", @@ -241,7 +247,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('hnStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -250,7 +256,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -300,7 +306,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicNameHN')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "Microsoft.Resources/deployments/setupClusterPublicIP" @@ -437,7 +443,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('clusterName'),'/configureHeadNode')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Resources/deployments/updateVNetDNS" ], @@ -528,4 +534,4 @@ "value": "[reference('setupClusterPublicIP').outputs.fqdn.value]" } } -} \ No newline at end of file +} diff --git a/create-hpc-cluster-custom-image/customnode-rdma-disabled.json b/create-hpc-cluster-custom-image/customnode-rdma-disabled.json index 9d00dba2a219..813e58bbc7cd 100644 --- a/create-hpc-cluster-custom-image/customnode-rdma-disabled.json +++ b/create-hpc-cluster-custom-image/customnode-rdma-disabled.json @@ -85,6 +85,13 @@ "metadata": { "description": "Optional URL of a public available PowerShell script you want to run on the compute nodes after they are configured. You can also specify arguments for the script, for example 'http://www.consto.com/mypostscript.ps1 -Arg1 arg1 -Arg2 arg2'." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -94,7 +101,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -112,7 +119,7 @@ { "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]" ], @@ -156,7 +163,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/configureComputeNode')]", "apiVersion": "[parameters('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -189,4 +196,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/create-hpc-cluster-custom-image/customnode-rdma-enabled.json b/create-hpc-cluster-custom-image/customnode-rdma-enabled.json index 5cca593a7460..178fd1e58acc 100644 --- a/create-hpc-cluster-custom-image/customnode-rdma-enabled.json +++ b/create-hpc-cluster-custom-image/customnode-rdma-enabled.json @@ -85,6 +85,13 @@ "metadata": { "description": "Optional URL of a public available PowerShell script you want to run on the compute nodes after they are configured. You can also specify arguments for the script, for example 'http://www.consto.com/mypostscript.ps1 -Arg1 arg1 -Arg2 arg2'." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -94,7 +101,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -112,7 +119,7 @@ { "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]" ], @@ -156,7 +163,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/installRDMADriver')]", "apiVersion": "[parameters('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -171,7 +178,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/configureComputeNode')]", "apiVersion": "[parameters('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]", "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'), '/extensions/installRDMADriver')]" @@ -205,4 +212,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/create-hpc-cluster-linux-cn/azuredeploy.json b/create-hpc-cluster-linux-cn/azuredeploy.json index 44da707c1177..1023700a7066 100644 --- a/create-hpc-cluster-linux-cn/azuredeploy.json +++ b/create-hpc-cluster-linux-cn/azuredeploy.json @@ -101,7 +101,7 @@ "type": "string", "defaultValue": "IaaSLnxCN-", "minLength": 1, - "maxLength": 12, + "maxLength": 12, "metadata": { "description": "The name prefix of the compute nodes. It must be no more than 12 characters, begin with a letter, and contain only letters, numbers and hyphens. For example, if 'IaaSCN-' is specified, the compute node names will be 'IaaSCN-000', 'IaaSCN-001', ..." } @@ -110,7 +110,7 @@ "type": "int", "defaultValue": 2, "minValue": 1, - "maxValue": 500, + "maxValue": 500, "metadata": { "description": "The number of the compute nodes" } @@ -196,6 +196,13 @@ "metadata": { "description": "Optional URL of a public available PowerShell script you want to run on the head node after it is configured. The script will be run as the Local System account. You can also specify arguments for the script, for example 'http://www.contoso.com/myhnpostscript.ps1 -Arg1 arg1 -Arg2 arg2'." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -385,4 +392,4 @@ "value": "[reference('mainTemplate').outputs.clusterDNSName.value]" } } -} \ No newline at end of file +} diff --git a/create-hpc-cluster/azuredeploy.json b/create-hpc-cluster/azuredeploy.json index 098d6b5d88d9..e65f1c48a9b2 100644 --- a/create-hpc-cluster/azuredeploy.json +++ b/create-hpc-cluster/azuredeploy.json @@ -86,7 +86,7 @@ "type": "string", "defaultValue": "IaaSCN-", "minLength": 1, - "maxLength": 12, + "maxLength": 12, "metadata": { "description": "The name prefix of the compute nodes. It must be no more than 12 characters, begin with a letter, and contain only letters, numbers and hyphens. For example, if 'IaaSCN-' is specified, the compute node names will be 'IaaSCN-000', 'IaaSCN-001', ..." } @@ -95,7 +95,7 @@ "type": "int", "defaultValue": 2, "minValue": 1, - "maxValue": 500, + "maxValue": 500, "metadata": { "description": "The number of the compute nodes" } @@ -193,6 +193,13 @@ "metadata": { "description": "Optional URL of a public available PowerShell script you want to run on the compute nodes after they are configured. The script will be run as the Local System account. You can also specify arguments for the script, for example 'http://www.contoso.com/mycnpostscript.ps1 -Arg1 arg1 -Arg2 arg2'." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { diff --git a/create-hpc-cluster/headnode-rdma-disabled.json b/create-hpc-cluster/headnode-rdma-disabled.json index 13302b498a7f..8f5b07b78fda 100644 --- a/create-hpc-cluster/headnode-rdma-disabled.json +++ b/create-hpc-cluster/headnode-rdma-disabled.json @@ -61,13 +61,20 @@ "metadata": { "description": "The fully qualified domain name (FQDN) for the private domain forest which will be created by this template, for example 'hpc.local'." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "hardwareProfile": { "vmSize": "[parameters('vmSize')]" @@ -118,7 +125,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/promoteDomainController')]", "apiVersion": "[parameters('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -150,4 +157,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/create-hpc-cluster/headnode-rdma-enabled.json b/create-hpc-cluster/headnode-rdma-enabled.json index 5e82f72a8e2f..359b069b7369 100644 --- a/create-hpc-cluster/headnode-rdma-enabled.json +++ b/create-hpc-cluster/headnode-rdma-enabled.json @@ -61,13 +61,20 @@ "metadata": { "description": "The fully qualified domain name (FQDN) for the private domain forest which will be created by this template, for example 'hpc.local'." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('availabilitySetName'))]" @@ -121,7 +128,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/installRDMADriver')]", "apiVersion": "[parameters('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -135,7 +142,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/promoteDomainController')]", "apiVersion": "[parameters('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]", "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'),'/extensions/installRDMADriver')]" @@ -168,4 +175,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/create-hpc-cluster/linuxnode.json b/create-hpc-cluster/linuxnode.json index 2408fc7e0bd6..140edebb162b 100644 --- a/create-hpc-cluster/linuxnode.json +++ b/create-hpc-cluster/linuxnode.json @@ -110,6 +110,13 @@ "metadata": { "description": "Not used currently." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -119,7 +126,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -137,7 +144,7 @@ { "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]" ], @@ -186,7 +193,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/installHPCNodeAgent')]", "apiVersion": "[parameters('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -203,4 +210,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/create-hpc-cluster/mainTemplate.json b/create-hpc-cluster/mainTemplate.json index ff2109966b3b..34f2d642dacd 100644 --- a/create-hpc-cluster/mainTemplate.json +++ b/create-hpc-cluster/mainTemplate.json @@ -172,6 +172,13 @@ "description": "Base URL for Marketplace", "artifactsBaseUrl": "" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -222,7 +229,7 @@ "computeNodeTemplateUrl": "[concat(parameters('artifactsBaseUrl'), '/', variables('curCNOSPlatformRelated').template)]", "computeNodeCustomData": "[base64(concat('HPCClusterName=', parameters('clusterName'), '\r\nImageCategory=public\r\nImageName=', parameters('computeNodeImageOffer'), '-', parameters('computeNodeImageSku'), '\r\nVMSize=', parameters('computeNodeVMSize')))]", "adminBase64Password": "[base64(parameters('adminPassword'))]", - "iaasInfoArg": "[concat('-SubscriptionId ', subscription().subscriptionId, ' -VNet ', parameters('virtualNetworkName'), ' -Subnet ', variables('subnet1Name'), ' -Location \"', resourceGroup().location, '\" -ResourceGroup ', resourceGroup().name)]", + "iaasInfoArg": "[concat('-SubscriptionId ', subscription().subscriptionId, ' -VNet ', parameters('virtualNetworkName'), ' -Subnet ', variables('subnet1Name'), ' -Location \"', parameters('location'), '\" -ResourceGroup ', resourceGroup().name)]", "headNodeCommandStr": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File PrepareHN.ps1 -DomainFQDN ', parameters('privateDomainName'), ' -AdminUserName ', parameters('adminUsername'), ' -AdminBase64Password \"', variables('adminBase64Password'), '\" -CNSize ', parameters('computeNodeVMSize'), ' -PostConfigScript \"', base64(trim(parameters('headNodePostConfigScript'))), '\" ', variables('iaasInfoArg'))]", "hnStorageConnStrPrefix": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('hnStorageAccountName'), ';AccountKey=')]" }, @@ -231,7 +238,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('hnStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -240,7 +247,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -290,7 +297,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicNameHN')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", "Microsoft.Resources/deployments/setupClusterPublicIP" @@ -427,7 +434,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('clusterName'),'/configureHeadNode')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Resources/deployments/updateVNetDNS" ], @@ -451,7 +458,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[concat(parameters('storageAccountNamePrefix'), padLeft(string(copyIndex(variables('cnStorageAccountStartIndex'))), variables('storageAccountIndexWidth'), '0'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Resources/deployments/createHeadNode" ], @@ -547,4 +554,4 @@ "value": "[reference('setupClusterPublicIP').outputs.fqdn.value]" } } -} \ No newline at end of file +} diff --git a/create-hpc-cluster/publicip-existing.json b/create-hpc-cluster/publicip-existing.json index 3c838f5e8a3a..31b28c4839e4 100644 --- a/create-hpc-cluster/publicip-existing.json +++ b/create-hpc-cluster/publicip-existing.json @@ -19,12 +19,19 @@ }, "publicIpRGName": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "publicIpId": "[resourceId(parameters('publicIpRGName'), 'Microsoft.Network/publicIPAddresses', parameters('publicIPAddressName'))]" }, - "resources": [ ], + "resources": [], "outputs": { "resourceId": { "type": "string", @@ -35,4 +42,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/create-hpc-cluster/publicip-new.json b/create-hpc-cluster/publicip-new.json index 365547de4689..1a47053b4671 100644 --- a/create-hpc-cluster/publicip-new.json +++ b/create-hpc-cluster/publicip-new.json @@ -19,6 +19,13 @@ }, "publicIpRGName": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -28,7 +35,7 @@ { "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]", "dnsSettings": { @@ -47,4 +54,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/create-hpc-cluster/vnet-with-dns-server.json b/create-hpc-cluster/vnet-with-dns-server.json index e579ea6f8b74..54bacaccb3f0 100644 --- a/create-hpc-cluster/vnet-with-dns-server.json +++ b/create-hpc-cluster/vnet-with-dns-server.json @@ -39,13 +39,20 @@ "metadata": { "description": "The DNS address(es) of the DNS Server(s) used by the VNET" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ { "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -66,4 +73,4 @@ } } ] -} \ No newline at end of file +} diff --git a/create-hpc-cluster/windowsnode-rdma-disabled.json b/create-hpc-cluster/windowsnode-rdma-disabled.json index c0a62ff9377f..25da516d6da4 100644 --- a/create-hpc-cluster/windowsnode-rdma-disabled.json +++ b/create-hpc-cluster/windowsnode-rdma-disabled.json @@ -110,6 +110,13 @@ "metadata": { "description": "Optional URL of a public available PowerShell script you want to run on the compute nodes after they are configured. You can also specify arguments for the script, for example 'http://www.consto.com/mypostscript.ps1 -Arg1 arg1 -Arg2 arg2'." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -119,7 +126,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -137,7 +144,7 @@ { "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]" ], @@ -183,7 +190,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/configureComputeNode')]", "apiVersion": "[parameters('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -216,4 +223,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/create-hpc-cluster/windowsnode-rdma-enabled.json b/create-hpc-cluster/windowsnode-rdma-enabled.json index 26c2643a541e..632d18415225 100644 --- a/create-hpc-cluster/windowsnode-rdma-enabled.json +++ b/create-hpc-cluster/windowsnode-rdma-enabled.json @@ -110,6 +110,13 @@ "metadata": { "description": "Optional URL of a public available PowerShell script you want to run on the compute nodes after they are configured. You can also specify arguments for the script, for example 'http://www.consto.com/mypostscript.ps1 -Arg1 arg1 -Arg2 arg2'." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -119,7 +126,7 @@ { "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -137,7 +144,7 @@ { "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]" ], @@ -183,7 +190,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/installRDMADriver')]", "apiVersion": "[parameters('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -198,7 +205,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/configureComputeNode')]", "apiVersion": "[parameters('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]", "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'), '/extensions/installRDMADriver')]" @@ -232,4 +239,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/custom-private-dns/azuredeploy.json b/custom-private-dns/azuredeploy.json index 588deb55f099..37a3fb3e1164 100644 --- a/custom-private-dns/azuredeploy.json +++ b/custom-private-dns/azuredeploy.json @@ -2,280 +2,291 @@ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { - "dnsZoneName": { - "type" : "string", - "defaultValue": "private.local", - "metadata" : { - "description": "The private DNS suffix and zone name." - } - }, - "newStorageAccountName": { - "type": "string", - "metadata": { - "description": "The name of the new storage account created to store the VMs disks" - } + "dnsZoneName": { + "type": "string", + "defaultValue": "private.local", + "metadata": { + "description": "The private DNS suffix and zone name." + } + }, + "newStorageAccountName": { + "type": "string", + "metadata": { + "description": "The name of the new storage account created to store the VMs disks" + } }, "adminUsername": { - "type": "string", - "metadata": { - "description": "The name of the Administrator of the new VM and Domain" - }, - "defaultValue": "adAdministrator" + "type": "string", + "metadata": { + "description": "The name of the Administrator of the new VM and Domain" + }, + "defaultValue": "adAdministrator" }, "adminPassword": { - "type": "securestring", - "metadata": { - "description": "The password for the Administrator account of the new VM and Domain" - } - }, - "serverPublicDnsName": { - "type": "string", - "metadata": { - "description": "The DNS name for the public IP address used by the Load Balancer infront of the DNS servers" - } + "type": "securestring", + "metadata": { + "description": "The password for the Administrator account of the new VM and Domain" + } + }, + "serverPublicDnsName": { + "type": "string", + "metadata": { + "description": "The DNS name for the public IP address used by the Load Balancer infront of the DNS servers" + } }, "assetLocation": { "type": "string", "metadata": { "description": "The location of resources, such as templates and scripts, that this script depends on" }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/custom-private-dns" + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/custom-private-dns" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - - "adTemplate": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/active-directory-new-domain-ha-2-dc/azuredeploy.json", - "virtualNetworkName": "adVNet", - "subnetName": "default", - "adPDCVMName": "adPDC", - "adBDCVMName": "adBDC", - + "adTemplate": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/active-directory-new-domain-ha-2-dc/azuredeploy.json", + "virtualNetworkName": "adVNet", + "subnetName": "default", + "adPDCVMName": "adPDC", + "adBDCVMName": "adBDC", "subnetId": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')),'/subnets/',variables('subnetName'))]", - "storageId": "[resourceId(resourceGroup().name, 'Microsoft.Storage/storageAccounts', parameters('newStorageAccountName'))]", - - "serverTemplateFolder": "nested/server", - "serverTemplateFile": "setupserver.json", - - "vmTemplate": "[concat(parameters('assetLocation'), '/nested/genericvm.json')]", - - "winClientTemplateFolder": "nested/windows-client", - "linClientTemplateFolder": "nested/linux-client", - "winClientTemplateFile": "setupwinclient.json", - "linClientTemplateFile": "setuplinuxclient.json" + "storageId": "[resourceId(resourceGroup().name, 'Microsoft.Storage/storageAccounts', parameters('newStorageAccountName'))]", + "serverTemplateFolder": "nested/server", + "serverTemplateFile": "setupserver.json", + "vmTemplate": "[concat(parameters('assetLocation'), '/nested/genericvm.json')]", + "winClientTemplateFolder": "nested/windows-client", + "linClientTemplateFolder": "nested/linux-client", + "winClientTemplateFile": "setupwinclient.json", + "linClientTemplateFile": "setuplinuxclient.json" }, - "resources": - [ - { - "comments": "This uses one of the other templates to deploy a pair of AD controllers", - "name":"adDeployment", - "type":"Microsoft.Resources/deployments", - "apiVersion": "2016-06-01", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('adTemplate')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "newStorageAccountName": { - "value": "[parameters('newStorageAccountName')]" - }, - "storageAccountType": { - "value": "Standard_LRS" - }, - "virtualNetworkName": { - "value": "[variables('virtualNetworkName')]" - }, - "adSubnetName": { - "value": "[variables('subnetName')]" - }, - "adVMSize": { - "value": "Standard_D1" - }, - "domainName": { - "value": "[parameters('dnsZoneName')]" - }, - "adminUsername": { - "value": "[parameters('adminUsername')]" - }, - "adminPassword": { - "value": "[parameters('adminPassword')]" - }, - "dnsPrefix": { - "value": "[parameters('serverPublicDnsName')]" - }, - "adPDCVMName": { - "value": "[variables('adPDCVMName')]" - }, - "adBDCVMName": { - "value": "[variables('adBDCVMName')]" - } - } + "resources": [ + { + "comments": "This uses one of the other templates to deploy a pair of AD controllers", + "name": "adDeployment", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2016-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('adTemplate')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "newStorageAccountName": { + "value": "[parameters('newStorageAccountName')]" + }, + "storageAccountType": { + "value": "Standard_LRS" + }, + "virtualNetworkName": { + "value": "[variables('virtualNetworkName')]" + }, + "adSubnetName": { + "value": "[variables('subnetName')]" + }, + "adVMSize": { + "value": "Standard_D1" + }, + "domainName": { + "value": "[parameters('dnsZoneName')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "dnsPrefix": { + "value": "[parameters('serverPublicDnsName')]" + }, + "adPDCVMName": { + "value": "[variables('adPDCVMName')]" + }, + "adBDCVMName": { + "value": "[variables('adBDCVMName')]" + } + } + } + }, + { + "comments": "This deployment modifies the DNS servers to allow dynamic and reverse DNS", + "name": "setupServer", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "Microsoft.Resources/deployments/adDeployment" + ], + "apiVersion": "2016-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('assetLocation'),'/',variables('serverTemplateFolder'), '/', variables('serverTemplateFile'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "vmList": { + "value": "[concat(variables('adPDCVMName'), ',', variables('adBDCVMName'))]" + }, + "dnsZone": { + "value": "[parameters('dnsZoneName')]" + }, + "vnetName": { + "value": "[variables('virtualNetworkName')]" + }, + "relativeDownloadFolder": { + "value": "./" + }, + "assetLocation": { + "value": "[concat(parameters('assetLocation'),'/',variables('serverTemplateFolder'))]" + } } - }, - { - "comments": "This deployment modifies the DNS servers to allow dynamic and reverse DNS", - "name": "setupServer", - "type":"Microsoft.Resources/deployments", - "dependsOn" : ["Microsoft.Resources/deployments/adDeployment"], - "apiVersion": "2016-06-01", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('assetLocation'),'/',variables('serverTemplateFolder'), '/', variables('serverTemplateFile'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "vmList": { - "value": "[concat(variables('adPDCVMName'), ',', variables('adBDCVMName'))]" - }, - "dnsZone": { - "value": "[parameters('dnsZoneName')]" - }, - "vnetName": { - "value": "[variables('virtualNetworkName')]" - }, - "relativeDownloadFolder": { - "value": "./" - }, - "assetLocation": { - "value": "[concat(parameters('assetLocation'),'/',variables('serverTemplateFolder'))]" - } - } - } - }, - { - "comments": "Create an example Windows client VM", - "name": "setupWindowsClient", - "type":"Microsoft.Resources/deployments", - "apiVersion": "2016-06-01", - "dependsOn" : ["Microsoft.Resources/deployments/setupServer"], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('vmTemplate')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "vmName": { - "value": "WindowsClient" - }, - "adminUsername":{ - "value": "[parameters('adminUsername')]" - }, - "adminPassword":{ - "value": "[parameters('adminPassword')]" - }, - "subnetId": { - "value": "[variables('subnetId')]" - }, - "imagePublisher": { - "value": "MicrosoftWindowsServer" - }, - "imageOffer": { - "value": "WindowsServer" - }, - "imageSKU": { - "value": "2012-R2-Datacenter" - }, - "storageId": { - "value": "[variables('storageId')]" - } - } - } - }, - { - "comments": "Install the extension on the Windows Client", - "name": "WindowsExtension", - "type":"Microsoft.Resources/deployments", - "dependsOn": ["Microsoft.Resources/deployments/setupWindowsClient"], - "apiVersion": "2016-06-01", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('assetLocation'),'/',variables('winClientTemplateFolder'), '/', variables('winClientTemplateFile'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "vmList":{ - "value": "WindowsClient" - }, - "dnsZone": { - "value": "[parameters('dnsZoneName')]" - }, - "relativeDownloadFolder": { - "value": "./" - }, - "assetLocation":{ - "value": "[concat(parameters('assetLocation'), '/', variables('winClientTemplateFolder'))]" - } - } - } - }, - { - "comments": "Create an example Ubuntu client VM", - "name": "setupLinuxClient", - "type":"Microsoft.Resources/deployments", - "apiVersion": "2016-06-01", - "dependsOn" : ["Microsoft.Resources/deployments/setupServer"], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('vmTemplate')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "vmName": { - "value": "LinuxClient" - }, - "adminUsername":{ - "value": "[parameters('adminUsername')]" - }, - "adminPassword":{ - "value": "[parameters('adminPassword')]" - }, - "subnetId": { - "value": "[variables('subnetId')]" - }, - "imagePublisher": { - "value": "Canonical" - }, - "imageOffer": { - "value": "UbuntuServer" - }, - "imageSKU": { - "value": "14.04.3-LTS" - }, - "storageId": { - "value": "[variables('storageId')]" - } - } - } - }, - { - "comments": "Install the extension on the Linux Client", - "name": "LinuxExtension", - "type":"Microsoft.Resources/deployments", - "dependsOn": ["Microsoft.Resources/deployments/setupLinuxClient"], - "apiVersion": "2016-06-01", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('assetLocation'),'/',variables('linClientTemplateFolder'), '/', variables('linClientTemplateFile'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "vmList":{ - "value": "LinuxClient" - }, - "dnsZone": { - "value": "[parameters('dnsZoneName')]" - }, - "assetLocation":{ - "value": "[concat(parameters('assetLocation'), '/', variables('linClientTemplateFolder'))]" - } - } - } - } + } + }, + { + "comments": "Create an example Windows client VM", + "name": "setupWindowsClient", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2016-06-01", + "dependsOn": [ + "Microsoft.Resources/deployments/setupServer" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('vmTemplate')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "vmName": { + "value": "WindowsClient" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "subnetId": { + "value": "[variables('subnetId')]" + }, + "imagePublisher": { + "value": "MicrosoftWindowsServer" + }, + "imageOffer": { + "value": "WindowsServer" + }, + "imageSKU": { + "value": "2012-R2-Datacenter" + }, + "storageId": { + "value": "[variables('storageId')]" + } + } + } + }, + { + "comments": "Install the extension on the Windows Client", + "name": "WindowsExtension", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "Microsoft.Resources/deployments/setupWindowsClient" + ], + "apiVersion": "2016-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('assetLocation'),'/',variables('winClientTemplateFolder'), '/', variables('winClientTemplateFile'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "vmList": { + "value": "WindowsClient" + }, + "dnsZone": { + "value": "[parameters('dnsZoneName')]" + }, + "relativeDownloadFolder": { + "value": "./" + }, + "assetLocation": { + "value": "[concat(parameters('assetLocation'), '/', variables('winClientTemplateFolder'))]" + } + } + } + }, + { + "comments": "Create an example Ubuntu client VM", + "name": "setupLinuxClient", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2016-06-01", + "dependsOn": [ + "Microsoft.Resources/deployments/setupServer" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('vmTemplate')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "vmName": { + "value": "LinuxClient" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "subnetId": { + "value": "[variables('subnetId')]" + }, + "imagePublisher": { + "value": "Canonical" + }, + "imageOffer": { + "value": "UbuntuServer" + }, + "imageSKU": { + "value": "14.04.3-LTS" + }, + "storageId": { + "value": "[variables('storageId')]" + } + } + } + }, + { + "comments": "Install the extension on the Linux Client", + "name": "LinuxExtension", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "Microsoft.Resources/deployments/setupLinuxClient" + ], + "apiVersion": "2016-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('assetLocation'),'/',variables('linClientTemplateFolder'), '/', variables('linClientTemplateFile'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "vmList": { + "value": "LinuxClient" + }, + "dnsZone": { + "value": "[parameters('dnsZoneName')]" + }, + "assetLocation": { + "value": "[concat(parameters('assetLocation'), '/', variables('linClientTemplateFolder'))]" + } + } + } + } ] -} \ No newline at end of file +} diff --git a/custom-private-dns/nested/genericvm.json b/custom-private-dns/nested/genericvm.json index 2eea2e301d08..75096608ca3f 100644 --- a/custom-private-dns/nested/genericvm.json +++ b/custom-private-dns/nested/genericvm.json @@ -2,31 +2,31 @@ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { - "subnetId": { - "type" : "string", - "metadata" : { - "description": "Reference to the subnet to put the VM's NIC in" - } - }, - "storageId": { - "type" : "string", - "metadata" : { - "description": "Reference to the storage account for the VM disk" - } - }, + "subnetId": { + "type": "string", + "metadata": { + "description": "Reference to the subnet to put the VM's NIC in" + } + }, + "storageId": { + "type": "string", + "metadata": { + "description": "Reference to the storage account for the VM disk" + } + }, "vmName": { - "type" : "string", - "metadata" : { - "description": "The name of the VM, also sets the computer name and is the based for the NIC's name" - } - }, + "type": "string", + "metadata": { + "description": "The name of the VM, also sets the computer name and is the based for the NIC's name" + } + }, "vmSize": { - "type" : "string", - "metadata" : { - "description": "The size of the VM" - }, - "defaultValue": "Standard_A1" - }, + "type": "string", + "metadata": { + "description": "The size of the VM" + }, + "defaultValue": "Standard_A1" + }, "adminUsername": { "type": "string", "metadata": { @@ -56,37 +56,43 @@ "metadata": { "description": "Image SKU" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "nicName": "[concat(parameters('vmName'), '-nic')]", + "nicName": "[concat(parameters('vmName'), '-nic')]" }, - "resources": - [ + "resources": [ { "name": "[variables('nicName')]", "type": "Microsoft.Network/networkInterfaces", "apiVersion": "2016-12-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { "name": "ipconfig1", "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[parameters('subnetId')]" - } + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[parameters('subnetId')]" + } } } ] - } + } }, - { + { "name": "[parameters('vmName')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2016-08-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" ], @@ -123,6 +129,6 @@ ] } } - } + } ] -} \ No newline at end of file +} diff --git a/custom-private-dns/nested/linux-client/setuplinuxclient.json b/custom-private-dns/nested/linux-client/setuplinuxclient.json index 01fe9bc9703f..f73b1cbf28a2 100644 --- a/custom-private-dns/nested/linux-client/setuplinuxclient.json +++ b/custom-private-dns/nested/linux-client/setuplinuxclient.json @@ -1,51 +1,61 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmList": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "List of virtual machines to be configured. If using multiple VMs, make their names comma separate, e.g. VM01,VM02,VM03." - } - }, - "dnsZone": { - "type": "string", - "metadata": { - "description": "Name of the dnsZone to use as the suffix on the clients and to register records in" - } - }, - "assetLocation": { - "type": "string", - "metadata": { - "description": "The location of resources such as templates and scripts that the script is dependent" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmList": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "List of virtual machines to be configured. If using multiple VMs, make their names comma separate, e.g. VM01,VM02,VM03." + } }, - "variables": { - "vmListArray" : "[split(replace(parameters('vmList'),' ',''),',')]" + "dnsZone": { + "type": "string", + "metadata": { + "description": "Name of the dnsZone to use as the suffix on the clients and to register records in" + } }, - "resources": [ - { - "comments": "DNS client setup - set suffix and enable DDNS", - "apiVersion": "2016-08-30", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmListArray')[copyIndex()],'/SetupDnsClient')]", - "location": "[resourcegroup().location]", - "copy": { - "name": "setupDNSCopy", - "count": "[length(variables('vmListArray'))]" - }, - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": ["[concat(parameters('assetLocation'), '/setuplinuxclient.sh')]", "[concat(parameters('assetLocation'), '/ddns-dhcphook')]"], - "commandToExecute": "[concat('sh setuplinuxclient.sh', ' ', parameters('dnsZone'))]" - } - } + "assetLocation": { + "type": "string", + "metadata": { + "description": "The location of resources such as templates and scripts that the script is dependent" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "vmListArray": "[split(replace(parameters('vmList'),' ',''),',')]" + }, + "resources": [ + { + "comments": "DNS client setup - set suffix and enable DDNS", + "apiVersion": "2016-08-30", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmListArray')[copyIndex()],'/SetupDnsClient')]", + "location": "[parameters('location')]", + "copy": { + "name": "setupDNSCopy", + "count": "[length(variables('vmListArray'))]" + }, + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('assetLocation'), '/setuplinuxclient.sh')]", + "[concat(parameters('assetLocation'), '/ddns-dhcphook')]" + ], + "commandToExecute": "[concat('sh setuplinuxclient.sh', ' ', parameters('dnsZone'))]" } - ] + } + } + ] } diff --git a/custom-private-dns/nested/server/setupserver.json b/custom-private-dns/nested/server/setupserver.json index 89871fac5a57..fe9460ade882 100644 --- a/custom-private-dns/nested/server/setupserver.json +++ b/custom-private-dns/nested/server/setupserver.json @@ -1,64 +1,73 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmList": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "List of virtual machines to be configured. If using multiple VMs, make their names comma separate, e.g. VM01,VM02,VM03." - } - }, - "dnsZone": { - "type": "string", - "metadata": { - "description": "Name of the forward dnsZone to configure for updates" - } - }, - "vnetName": { - "type": "string", - "metadata": { - "description": "Name of the vnet for which to create the reverse DNS zone" - } - }, - "relativeDownloadFolder": { - "type": "string", - "metadata": { - "description": "This is the relative location of the folder the script will be downloaded to by the plugin. This is dictated by the plugin here: https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-extensions-customscript" - } - }, - "assetLocation": { - "type": "string", - "metadata": { - "description": "The location of resources such as templates and scripts that the script is dependent" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmList": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "List of virtual machines to be configured. If using multiple VMs, make their names comma separate, e.g. VM01,VM02,VM03." + } }, - "variables": { - "vmListArray" : "[split(replace(parameters('vmList'),' ',''),',')]", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks/', parameters('vnetName'))]" + "dnsZone": { + "type": "string", + "metadata": { + "description": "Name of the forward dnsZone to configure for updates" + } }, - "resources": [ - { - "comments": "DNS server setup - assumes AD has already been setup", - "apiVersion": "2016-08-30", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmListArray')[copyIndex()],'/SetupDnsServer')]", - "location": "[resourcegroup().location]", - "copy": { - "name": "setupDNSCopy", - "count": "[length(variables('vmListArray'))]" - }, - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.8", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": ["[concat(parameters('assetLocation'), '/setupserver.ps1')]"], - "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File ', parameters('relativeDownloadFolder'), '/setupserver.ps1', ' ', parameters('dnsZone'), ' ', reference(variables('vnetID'), '2016-12-01').addressSpace.addressPrefixes[0])]" - } - } + "vnetName": { + "type": "string", + "metadata": { + "description": "Name of the vnet for which to create the reverse DNS zone" + } + }, + "relativeDownloadFolder": { + "type": "string", + "metadata": { + "description": "This is the relative location of the folder the script will be downloaded to by the plugin. This is dictated by the plugin here: https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-extensions-customscript" + } + }, + "assetLocation": { + "type": "string", + "metadata": { + "description": "The location of resources such as templates and scripts that the script is dependent" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "vmListArray": "[split(replace(parameters('vmList'),' ',''),',')]", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks/', parameters('vnetName'))]" + }, + "resources": [ + { + "comments": "DNS server setup - assumes AD has already been setup", + "apiVersion": "2016-08-30", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmListArray')[copyIndex()],'/SetupDnsServer')]", + "location": "[parameters('location')]", + "copy": { + "name": "setupDNSCopy", + "count": "[length(variables('vmListArray'))]" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.8", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('assetLocation'), '/setupserver.ps1')]" + ], + "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File ', parameters('relativeDownloadFolder'), '/setupserver.ps1', ' ', parameters('dnsZone'), ' ', reference(variables('vnetID'), '2016-12-01').addressSpace.addressPrefixes[0])]" } - ] + } + } + ] } diff --git a/custom-private-dns/nested/windows-client/setupwinclient.json b/custom-private-dns/nested/windows-client/setupwinclient.json index f8fbe27be344..707c3fbbe0dd 100644 --- a/custom-private-dns/nested/windows-client/setupwinclient.json +++ b/custom-private-dns/nested/windows-client/setupwinclient.json @@ -1,57 +1,66 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmList": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "List of virtual machines to be configured. If using multiple VMs, make their names comma separate, e.g. VM01,VM02,VM03." - } - }, - "dnsZone": { - "type": "string", - "metadata": { - "description": "Name of the dnsZone to use as the suffix on the clients and to register records in" - } - }, - "relativeDownloadFolder": { - "type": "string", - "metadata": { - "description": "This is the relative location of the folder the script will be downloaded to by the plugin. This is dictated by the plugin here: https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-extensions-customscript" - } - }, - "assetLocation": { - "type": "string", - "metadata": { - "description": "The location of resources such as templates and scripts that the script is dependent" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmList": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "List of virtual machines to be configured. If using multiple VMs, make their names comma separate, e.g. VM01,VM02,VM03." + } }, - "variables": { - "vmListArray" : "[split(replace(parameters('vmList'),' ',''),',')]" + "dnsZone": { + "type": "string", + "metadata": { + "description": "Name of the dnsZone to use as the suffix on the clients and to register records in" + } }, - "resources": [ - { - "comments": "DNS client setup - set suffix and enable PTR record registration", - "apiVersion": "2016-08-30", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmListArray')[copyIndex()],'/SetupDnsClient')]", - "location": "[resourcegroup().location]", - "copy": { - "name": "setupDNSCopy", - "count": "[length(variables('vmListArray'))]" - }, - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.8", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": ["[concat(parameters('assetLocation'), '/setupwinclient.ps1')]"], - "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File ', parameters('relativeDownloadFolder'), '/setupwinclient.ps1', ' ', parameters('dnsZone'))]" - } - } + "relativeDownloadFolder": { + "type": "string", + "metadata": { + "description": "This is the relative location of the folder the script will be downloaded to by the plugin. This is dictated by the plugin here: https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-extensions-customscript" + } + }, + "assetLocation": { + "type": "string", + "metadata": { + "description": "The location of resources such as templates and scripts that the script is dependent" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "vmListArray": "[split(replace(parameters('vmList'),' ',''),',')]" + }, + "resources": [ + { + "comments": "DNS client setup - set suffix and enable PTR record registration", + "apiVersion": "2016-08-30", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmListArray')[copyIndex()],'/SetupDnsClient')]", + "location": "[parameters('location')]", + "copy": { + "name": "setupDNSCopy", + "count": "[length(variables('vmListArray'))]" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.8", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('assetLocation'), '/setupwinclient.ps1')]" + ], + "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File ', parameters('relativeDownloadFolder'), '/setupwinclient.ps1', ' ', parameters('dnsZone'))]" } - ] + } + } + ] } diff --git a/datameer-trend-chef-riskanalysis/azuredeploy.json b/datameer-trend-chef-riskanalysis/azuredeploy.json index 04740dc2883d..14d1c6a06940 100644 --- a/datameer-trend-chef-riskanalysis/azuredeploy.json +++ b/datameer-trend-chef-riskanalysis/azuredeploy.json @@ -604,7 +604,7 @@ "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ - "['Microsoft.Resources/deployments/vnetstorage']" + "Microsoft.Resources/deployments/vnetstorage" ], "properties": { "mode": "Incremental", @@ -726,7 +726,7 @@ "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ - "['Microsoft.Resources/deployments/vnetstorage']" + "Microsoft.Resources/deployments/vnetstorage" ], "properties": { "mode": "Incremental", @@ -812,9 +812,9 @@ "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ - "['Microsoft.Resources/deployments/vnetstorage']", - "['Microsoft.Resources/deployments/trendmicrodsm']", - "['Microsoft.Resources/deployments/orchestrator']" + "Microsoft.Resources/deployments/vnetstorage", + "Microsoft.Resources/deployments/trendmicrodsm", + "Microsoft.Resources/deployments/orchestrator" ], "properties": { "mode": "Incremental", @@ -921,9 +921,9 @@ "type": "Microsoft.Resources/deployments", "name": "dsagents", "dependsOn": [ - "['Microsoft.Resources/deployments/vnetstorage']", - "['Microsoft.Resources/deployments/trendmicrodsm']", - "['Microsoft.Resources/deployments/chefserver']" + "Microsoft.Resources/deployments/vnetstorage", + "Microsoft.Resources/deployments/trendmicrodsm", + "Microsoft.Resources/deployments/chefserver" ], "properties": { "mode": "Incremental", @@ -1039,9 +1039,9 @@ "type": "Microsoft.Resources/deployments", "name": "chefnodes", "dependsOn": [ - "['Microsoft.Resources/deployments/vnetstorage']", - "['Microsoft.Resources/deployments/trendmicrodsm']", - "['Microsoft.Resources/deployments/chefserver']" + "Microsoft.Resources/deployments/vnetstorage", + "Microsoft.Resources/deployments/trendmicrodsm", + "Microsoft.Resources/deployments/chefserver" ], "properties": { "mode": "Incremental", @@ -1208,7 +1208,7 @@ "type": "Microsoft.Resources/deployments", "name": "datameerhdinsight", "dependsOn": [ - "['Microsoft.Resources/deployments/vnetstorage']" + "Microsoft.Resources/deployments/vnetstorage" ], "properties": { "mode": "Incremental", @@ -1283,4 +1283,4 @@ "value": "[reference('datameerhdinsight').outputs.datameerAppURL.value]" } } -} \ No newline at end of file +} diff --git a/datameer-trend-chef-riskanalysis/nested/datameer-hdinsight.json b/datameer-trend-chef-riskanalysis/nested/datameer-hdinsight.json index 9a7c4ff6a62e..25a8f2305b8d 100644 --- a/datameer-trend-chef-riskanalysis/nested/datameer-hdinsight.json +++ b/datameer-trend-chef-riskanalysis/nested/datameer-hdinsight.json @@ -94,16 +94,16 @@ } }, "datameerTags": { - "type": "object" + "type": "object" }, "trendmicroTags": { - "type": "object" + "type": "object" }, "chefSoftwareTags": { - "type": "object" + "type": "object" }, "quickstartTags": { - "type": "object" + "type": "object" } }, "variables": { @@ -122,8 +122,8 @@ "location": "[parameters('location')]", "apiVersion": "[variables('defaultApiVersion')]", "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('datameerTags').provider]" + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('datameerTags').provider]" }, "dependsOn": [], "properties": { @@ -136,8 +136,8 @@ "location": "[parameters('location')]", "apiVersion": "[variables('clusterApiVersion')]", "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('datameerTags').provider]" + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('datameerTags').provider]" }, "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('storageAccountName'))]" @@ -205,7 +205,6 @@ }, { "name": "zookeepernode", - //"minInstanceCount": 1, "targetInstanceCount": 3, "hardwareProfile": { "vmSize": "Small" @@ -263,4 +262,4 @@ "value": "[concat('https://',parameters('clusterName'),'-dtu.apps.azurehdinsight.net:443')]" } } -} \ No newline at end of file +} diff --git a/datameer-trend-chef-riskanalysis/nested/orchestrator-server-setup-trend.json b/datameer-trend-chef-riskanalysis/nested/orchestrator-server-setup-trend.json index af2c75660dcc..90e9265277d7 100644 --- a/datameer-trend-chef-riskanalysis/nested/orchestrator-server-setup-trend.json +++ b/datameer-trend-chef-riskanalysis/nested/orchestrator-server-setup-trend.json @@ -6,7 +6,8 @@ "type": "string" }, "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "datameerTags": { "type": "object" @@ -28,8 +29,8 @@ "apiVersion": "2015-05-01-preview", "location": "[parameters('location')]", "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('chefSoftwareTags').provider]" + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('chefSoftwareTags').provider]" }, "properties": { "publisher": "Microsoft.Azure.Extensions", @@ -41,8 +42,8 @@ "https://raw.githubusercontent.com/sysgain/cloudtry-p2p-public-artifacts/master/scripts/TrendMicro/p2porchAllinOneTrend.sh" ], "commandToExecute": "sh p2porchAllinOneTrend.sh" - } + } } } ] -} \ No newline at end of file +} diff --git a/datameer-trend-chef-riskanalysis/nested/trendp2p-chefnodes.json b/datameer-trend-chef-riskanalysis/nested/trendp2p-chefnodes.json index 403652b33bf3..b0d79e01b2d4 100644 --- a/datameer-trend-chef-riskanalysis/nested/trendp2p-chefnodes.json +++ b/datameer-trend-chef-riskanalysis/nested/trendp2p-chefnodes.json @@ -4,7 +4,7 @@ "parameters": { "location": { "type": "string", - "defaultValue": "" + "defaultValue": "[resourceGroup().location]" }, "network-api-version": { "type": "string", @@ -493,4 +493,4 @@ } } ] -} \ No newline at end of file +} diff --git a/datameer-trend-chef-riskanalysis/nested/trendp2p-chefserver.json b/datameer-trend-chef-riskanalysis/nested/trendp2p-chefserver.json index 55fc16dd3f06..3836855fcb47 100644 --- a/datameer-trend-chef-riskanalysis/nested/trendp2p-chefserver.json +++ b/datameer-trend-chef-riskanalysis/nested/trendp2p-chefserver.json @@ -40,7 +40,7 @@ }, "location": { "type": "string", - "defaultValue": "" + "defaultValue": "[resourceGroup().location]" }, "network-api-version": { "type": "string", @@ -345,4 +345,4 @@ "value": "[concat('https://',reference(resourceId('Microsoft.Network/publicIPAddresses',parameters('publicIPAddressNameChefServer'))).dnsSettings.fqdn)]" } } -} \ No newline at end of file +} diff --git a/datameer-trend-chef-riskanalysis/nested/trendp2p-dsagents.json b/datameer-trend-chef-riskanalysis/nested/trendp2p-dsagents.json index 25d9443ba11b..1e92f0939250 100644 --- a/datameer-trend-chef-riskanalysis/nested/trendp2p-dsagents.json +++ b/datameer-trend-chef-riskanalysis/nested/trendp2p-dsagents.json @@ -4,7 +4,7 @@ "parameters": { "location": { "type": "string", - "defaultValue": "" + "defaultValue": "[resourceGroup().location]" }, "network-api-version": { "type": "string", @@ -425,4 +425,4 @@ } } ] -} \ No newline at end of file +} diff --git a/datameer-trend-chef-riskanalysis/nested/trendp2p-orchestrator.json b/datameer-trend-chef-riskanalysis/nested/trendp2p-orchestrator.json index f88cd6ae33db..5a2276e827c4 100644 --- a/datameer-trend-chef-riskanalysis/nested/trendp2p-orchestrator.json +++ b/datameer-trend-chef-riskanalysis/nested/trendp2p-orchestrator.json @@ -36,7 +36,7 @@ }, "location": { "type": "string", - "defaultValue": "" + "defaultValue": "[resourceGroup().location]" }, "network-api-version": { "type": "string", @@ -347,4 +347,4 @@ "dependsOn": [] } ] -} \ No newline at end of file +} diff --git a/datameer-trend-chef-riskanalysis/nested/trendp2p-splunkenterprise.json b/datameer-trend-chef-riskanalysis/nested/trendp2p-splunkenterprise.json index 06347ed5f739..fa2a039ca0d4 100644 --- a/datameer-trend-chef-riskanalysis/nested/trendp2p-splunkenterprise.json +++ b/datameer-trend-chef-riskanalysis/nested/trendp2p-splunkenterprise.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "network-api-version": { "type": "string", @@ -404,4 +405,4 @@ "value": "[concat('https://',reference(resourceId('Microsoft.Network/publicIPAddresses',parameters('publicIPAddressSettingsSplunk').name)).dnsSettings.fqdn)]" } } -} \ No newline at end of file +} diff --git a/datameer-trend-chef-riskanalysis/nested/trendp2p-trenddsm.json b/datameer-trend-chef-riskanalysis/nested/trendp2p-trenddsm.json index 5603c7fd44d4..a661b9103f3f 100644 --- a/datameer-trend-chef-riskanalysis/nested/trendp2p-trenddsm.json +++ b/datameer-trend-chef-riskanalysis/nested/trendp2p-trenddsm.json @@ -12,7 +12,7 @@ }, "location": { "type": "string", - "defaultValue": "" + "defaultValue": "[resourceGroup().location]" }, "network-api-version": { "type": "string", @@ -411,4 +411,4 @@ "value": "[concat('https://',reference(resourceId('Microsoft.Network/publicIPAddresses',parameters('publicIPAddressNameTrendDSM'))).dnsSettings.fqdn)]" } } -} \ No newline at end of file +} diff --git a/datameer-trend-chef-riskanalysis/nested/trendp2p-vnetstorage.json b/datameer-trend-chef-riskanalysis/nested/trendp2p-vnetstorage.json index 9b552f93a14c..b207a9230e97 100644 --- a/datameer-trend-chef-riskanalysis/nested/trendp2p-vnetstorage.json +++ b/datameer-trend-chef-riskanalysis/nested/trendp2p-vnetstorage.json @@ -16,7 +16,7 @@ }, "location": { "type": "string", - "defaultValue": "" + "defaultValue": "[resourceGroup().location]" }, "network-api-version": { "type": "string", @@ -169,4 +169,4 @@ } } ] -} \ No newline at end of file +} diff --git a/datastax/azuredeploy.json b/datastax/azuredeploy.json index 364f4ad79536..30872aef4b0f 100644 --- a/datastax/azuredeploy.json +++ b/datastax/azuredeploy.json @@ -54,6 +54,13 @@ "metadata": { "description": "Admin password for the virtual machines" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -62,7 +69,7 @@ "extensionUrl": "[concat(variables('baseUrl'), '/scripts/')]", "nodesTemplateUrl": "[concat(variables('templateUrl'), 'nodes.json')]", "opsCenterTemplateUrl": "[concat(variables('templateUrl'), 'opscenter.json')]", - "location": "[resourcegroup().location]", + "location": "[parameters('location')]", "uniqueString": "[uniqueString(resourceGroup().id, deployment().name)]", "vnetName": "vnet", "subnetName": "subnet", diff --git a/datastax/nested/nodes.json b/datastax/nested/nodes.json index 1d3c4a180fc1..0a6780410ccc 100644 --- a/datastax/nested/nodes.json +++ b/datastax/nested/nodes.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "uniqueString": { "type": "string" diff --git a/datastax/nested/opscenter.json b/datastax/nested/opscenter.json index ce9cd8f99034..3baf8d4ebbd5 100644 --- a/datastax/nested/opscenter.json +++ b/datastax/nested/opscenter.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "uniqueString": { "type": "string" diff --git a/diagnostics-eventhub-elk/azuredeploy.json b/diagnostics-eventhub-elk/azuredeploy.json index 595ba7b605b3..04e1cc1cefb7 100644 --- a/diagnostics-eventhub-elk/azuredeploy.json +++ b/diagnostics-eventhub-elk/azuredeploy.json @@ -1,395 +1,456 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "esClusterName": { - "type": "string", - "defaultValue": "elasticsearch", - "metadata": { - "description": "The name of the Elasticsearch cluster." - } - }, - "esVersion": { - "type": "string", - "defaultValue": "2.3.1", - "allowedValues": [ - "2.3.1", - "2.2.2", - "2.1.2", - "1.7.5" - ], - "metadata": { - "description": "Elasticsearch version to install." - } - }, - "vmClientNodeCount": { - "type": "int", - "defaultValue": 1, - "allowedValues": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9 - ], - "metadata": { - "description": "Number of Elasticsearch client nodes to provision (Setting this to zero puts the data nodes on the load balancer)" - } - }, - "vmDataNodeCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "Number of Elasticsearch data nodes" - } - }, - "vmSizeMasterNodes": { - "type": "string", - "defaultValue": "Standard_D2_v2", - "allowedValues": [ - "Standard_D2_v2", - "Standard_D3_v2", - "Standard_D4_v2", - "Standard_A2", - "Standard_A3", - "Standard_A4", - "Standard_A5", - "Standard_A6", - "Standard_A7", - "Standard_DS2", - "Standard_DS3", - "Standard_DS4", - "Standard_DS13" - ], - "metadata": { - "description": "Size of the Elasticsearch cluster master nodes" - } - }, - "vmSizeClientNodes": { - "type": "string", - "defaultValue": "Standard_D2_v2", - "allowedValues": [ - "Standard_D2_v2", - "Standard_D3_v2", - "Standard_D4_v2", - "Standard_A2", - "Standard_A3", - "Standard_A4", - "Standard_A5", - "Standard_A6", - "Standard_A7", - "Standard_DS2", - "Standard_DS3", - "Standard_DS4", - "Standard_DS13" - ], - "metadata": { - "description": "Size of the Elasticsearch cluster client nodes" - } - }, - "vmSizeDataNodes": { - "type": "string", - "defaultValue": "Standard_D2_v2", - "allowedValues": [ - "Standard_D2_v2", - "Standard_D3_v2", - "Standard_D4_v2", - "Standard_A2", - "Standard_A3", - "Standard_A4", - "Standard_A5", - "Standard_A6", - "Standard_A7", - "Standard_DS2", - "Standard_DS3", - "Standard_DS4", - "Standard_DS13" - ], - "metadata": { - "description": "Size of the Elasticsearch cluster data nodes" - } - }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "User name for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "ubuntuOSVersion": { - "type": "string", - "defaultValue": "14.04.4-LTS", - "allowedValues": [ - "12.04.5-LTS", - "14.04.4-LTS", - "16.04.0-LTS" - ], - "metadata": { - "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version." - } - }, - "existingEHNamespace": { - "type": "string", - "metadata": { - "description": "Existing Event Hub namespace." - } - }, - "existingEHSharedAccessKeyName": { - "type": "string", - "metadata": { - "description": "Existing Event Hub shared access key name." - } - }, - "existingEHSharedAccessKey": { - "type": "string", - "metadata": { - "description": "Existing Event Hub shared access key." - } - }, - "existingEHEntityPath": { - "type": "string", - "metadata": { - "description": "Existing Event Hub entity path." - } - }, - "existingEHPartitions": { - "type": "int", - "metadata": { - "description": "Existing Event Hub partitions." - } - }, - "_artifactsLocation": { - "type": "string", - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/diagnostics-eventhub-elk", - "metadata": { - "description": "Change this value to your repo name if deploying from a fork" - } - }, - "_artifactsLocationSasToken": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Auto-generated token to access _artifactsLocation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "esClusterName": { + "type": "string", + "defaultValue": "elasticsearch", + "metadata": { + "description": "The name of the Elasticsearch cluster." + } }, - "variables": { - "storageAccountPrefix": "[concat(substring(uniqueString(resourceGroup().id, parameters('esClusterName')), 0, 6), substring(parameters('esClusterName'), 0, 3))]", - "storageAccountName": "[concat(variables('storageAccountPrefix'), 'log')]", - "imagePublisher": "Canonical", - "imageOffer": "UbuntuServer", - "OSDiskName": "osdiskforlinuxsimple", - "storageAccountType": "Standard_LRS", - "vmStorageAccountContainerName": "vhds", - "vmName": "logstashvm1", - "vmSize": "Standard_D1", - "vmNicName": "[concat(variables('vmName'), '-nic')]", - "vmNsgName": "[concat(variables('vmName'), '-nsg')]", - "vmPipName": "[concat(variables('vmName'), '-pip')]", - "virtualNetworkName": "elkvnet2", - "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), '/subnets/', 'other')]", - "esHost": "10.0.2.100", - "esTemplateBase": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/elasticsearch", - "esDeploymentName": "esDeploymentForDiagnosticsEventHubELK" + "esVersion": { + "type": "string", + "defaultValue": "2.3.1", + "allowedValues": [ + "2.3.1", + "2.2.2", + "2.1.2", + "1.7.5" + ], + "metadata": { + "description": "Elasticsearch version to install." + } }, - "resources": [ - { - "apiVersion": "2015-01-01", - "name": "[variables('esDeploymentName')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(variables('esTemplateBase'), '/', 'azuredeploy.json')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "adminUsername": { "value": "[parameters('adminUsername')]" }, - "adminPassword": { "value": "[parameters('adminPassword')]" }, - "virtualNetworkName": { "value": "[variables('virtualNetworkName')]" }, - "OS": { "value": "ubuntu" }, - "authenticationType": { "value": "password" }, - "sshPublicKey": { "value": "" }, - "loadBalancerType": { "value": "internal" }, - "jumpbox": { "value": "Yes" }, - "vmClientNodeCount": { "value": "[parameters('vmClientNodeCount')]" }, - "vmSizeClientNodes": { "value": "[parameters('vmSizeClientNodes')]" }, - "vmSizeMasterNodes": { "value": "[parameters('vmSizeMasterNodes')]" }, - "vmSizeDataNodes": { "value": "[parameters('vmSizeDataNodes')]" }, - "vmDataNodeCount": { "value": "[parameters('vmDataNodeCount')]" }, - "esClusterName": { "value": "[parameters('esClusterName')]" }, - "esVersion": { "value": "[parameters('esVersion')]" }, - "afs": { "value": "no" }, - "marvel": { "value": "no" }, - "marvelCluster": { "value": "no" }, - "vmSizeMarvelNodes": { "value": "Standard_D2_v2" }, - "kibana": { "value": "yes" }, - "sense": { "value": "no" }, - "jmeterAgent": { "value": "no" }, - "cloudAzure": { "value": "no" }, - "cloudAzureStorageAccount": { "value": "" }, - "cloudAzureStorageKey": { "value": "" }, - "_artifactsLocation": { "value": "[variables('esTemplateBase')]" }, - "_artifactsLocationSasToken": { "value": "" } - } - } + "vmClientNodeCount": { + "type": "int", + "defaultValue": 1, + "allowedValues": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "metadata": { + "description": "Number of Elasticsearch client nodes to provision (Setting this to zero puts the data nodes on the load balancer)" + } + }, + "vmDataNodeCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "Number of Elasticsearch data nodes" + } + }, + "vmSizeMasterNodes": { + "type": "string", + "defaultValue": "Standard_D2_v2", + "allowedValues": [ + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS13" + ], + "metadata": { + "description": "Size of the Elasticsearch cluster master nodes" + } + }, + "vmSizeClientNodes": { + "type": "string", + "defaultValue": "Standard_D2_v2", + "allowedValues": [ + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS13" + ], + "metadata": { + "description": "Size of the Elasticsearch cluster client nodes" + } + }, + "vmSizeDataNodes": { + "type": "string", + "defaultValue": "Standard_D2_v2", + "allowedValues": [ + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS13" + ], + "metadata": { + "description": "Size of the Elasticsearch cluster data nodes" + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "User name for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the Virtual Machine." + } + }, + "ubuntuOSVersion": { + "type": "string", + "defaultValue": "14.04.4-LTS", + "allowedValues": [ + "12.04.5-LTS", + "14.04.4-LTS", + "16.04.0-LTS" + ], + "metadata": { + "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version." + } + }, + "existingEHNamespace": { + "type": "string", + "metadata": { + "description": "Existing Event Hub namespace." + } + }, + "existingEHSharedAccessKeyName": { + "type": "string", + "metadata": { + "description": "Existing Event Hub shared access key name." + } + }, + "existingEHSharedAccessKey": { + "type": "string", + "metadata": { + "description": "Existing Event Hub shared access key." + } + }, + "existingEHEntityPath": { + "type": "string", + "metadata": { + "description": "Existing Event Hub entity path." + } + }, + "existingEHPartitions": { + "type": "int", + "metadata": { + "description": "Existing Event Hub partitions." + } + }, + "_artifactsLocation": { + "type": "string", + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/diagnostics-eventhub-elk", + "metadata": { + "description": "Change this value to your repo name if deploying from a fork" + } + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "Auto-generated token to access _artifactsLocation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountPrefix": "[concat(substring(uniqueString(resourceGroup().id, parameters('esClusterName')), 0, 6), substring(parameters('esClusterName'), 0, 3))]", + "storageAccountName": "[concat(variables('storageAccountPrefix'), 'log')]", + "imagePublisher": "Canonical", + "imageOffer": "UbuntuServer", + "OSDiskName": "osdiskforlinuxsimple", + "storageAccountType": "Standard_LRS", + "vmStorageAccountContainerName": "vhds", + "vmName": "logstashvm1", + "vmSize": "Standard_D1", + "vmNicName": "[concat(variables('vmName'), '-nic')]", + "vmNsgName": "[concat(variables('vmName'), '-nsg')]", + "vmPipName": "[concat(variables('vmName'), '-pip')]", + "virtualNetworkName": "elkvnet2", + "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), '/subnets/', 'other')]", + "esHost": "10.0.2.100", + "esTemplateBase": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/elasticsearch", + "esDeploymentName": "esDeploymentForDiagnosticsEventHubELK" + }, + "resources": [ + { + "apiVersion": "2015-01-01", + "name": "[variables('esDeploymentName')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('esTemplateBase'), '/', 'azuredeploy.json')]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('vmNsgName')]", - "location": "[resourceGroup().location]", + "parameters": { + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "virtualNetworkName": { + "value": "[variables('virtualNetworkName')]" + }, + "OS": { + "value": "ubuntu" + }, + "authenticationType": { + "value": "password" + }, + "sshPublicKey": { + "value": "" + }, + "loadBalancerType": { + "value": "internal" + }, + "jumpbox": { + "value": "Yes" + }, + "vmClientNodeCount": { + "value": "[parameters('vmClientNodeCount')]" + }, + "vmSizeClientNodes": { + "value": "[parameters('vmSizeClientNodes')]" + }, + "vmSizeMasterNodes": { + "value": "[parameters('vmSizeMasterNodes')]" + }, + "vmSizeDataNodes": { + "value": "[parameters('vmSizeDataNodes')]" + }, + "vmDataNodeCount": { + "value": "[parameters('vmDataNodeCount')]" + }, + "esClusterName": { + "value": "[parameters('esClusterName')]" + }, + "esVersion": { + "value": "[parameters('esVersion')]" + }, + "afs": { + "value": "no" + }, + "marvel": { + "value": "no" + }, + "marvelCluster": { + "value": "no" + }, + "vmSizeMarvelNodes": { + "value": "Standard_D2_v2" + }, + "kibana": { + "value": "yes" + }, + "sense": { + "value": "no" + }, + "jmeterAgent": { + "value": "no" + }, + "cloudAzure": { + "value": "no" + }, + "cloudAzureStorageAccount": { + "value": "" + }, + "cloudAzureStorageKey": { + "value": "" + }, + "_artifactsLocation": { + "value": "[variables('esTemplateBase')]" + }, + "_artifactsLocationSasToken": { + "value": "" + } + } + } + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('vmNsgName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "SSH", "properties": { - "securityRules": [ - { - "name": "SSH", - "properties": { - "description": "Allows SSH traffic", - "protocol": "Tcp", - "sourcePortRange": "22", - "destinationPortRange": "22", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 100, - "direction": "Inbound" - } - } - ] + "description": "Allows SSH traffic", + "protocol": "Tcp", + "sourcePortRange": "22", + "destinationPortRange": "22", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" } - }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('vmPipName')]", - "location": "[resourceGroup().location]", + } + ] + } + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('vmPipName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Static" + } + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('vmNicName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', variables('esDeploymentName'))]", + "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNsgName'))]", + "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmPipName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig2", "properties": { - "publicIPAllocationMethod": "Static" + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmPipName'))]" + }, + "subnet": { + "id": "[variables('subnetRef')]" + }, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNsgName'))]" + } } + } + ] + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "location": "[parameters('location')]", + "tags": { + "displayName": "StorageAccount" + }, + "properties": {} + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "location": "[parameters('location')]", + "tags": { + "displayName": "VirtualMachine" + }, + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[variables('vmSize')]" }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('vmNicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Resources/deployments', variables('esDeploymentName'))]", - "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNsgName'))]", - "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmPipName'))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig2", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmPipName'))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - }, - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNsgName'))]" - } - } - } - ] - } + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "sku": { - "name": "[variables('storageAccountType')]" - }, - "kind": "Storage", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "StorageAccount" + "storageProfile": { + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[parameters('ubuntuOSVersion')]", + "version": "latest" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('OSDiskName'), '.vhd')]" }, - "properties": {} + "caching": "ReadWrite", + "createOption": "FromImage" + } }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "VirtualMachine" - }, - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", - "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[parameters('ubuntuOSVersion')]", - "version": "latest" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('OSDiskName'), '.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" - } - ] - } + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" } + ] + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmName'), '/InstallEventHubELK')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]", + "[resourceId('Microsoft.Resources/deployments', variables('esDeploymentName'))]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'), '/scripts/logstash-eventhub-install-ubuntu.sh', parameters('_artifactsLocationSasToken'))]" + ] }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'), '/InstallEventHubELK')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]", - "[resourceId('Microsoft.Resources/deployments', variables('esDeploymentName'))]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'), '/scripts/logstash-eventhub-install-ubuntu.sh', parameters('_artifactsLocationSasToken'))]" - ] - }, - "protectedSettings": { - "commandToExecute": "[concat('bash ./logstash-eventhub-install-ubuntu.sh -n ', parameters('existingEHNamespace'), ' -a ', parameters('existingEHSharedAccessKeyName'), ' -k ', parameters('existingEHSharedAccessKey'), ' -e ', parameters('existingEHEntityPath'), ' -p ', parameters('existingEHPartitions'), ' -i ', variables('esHost'))]" - } - } + "protectedSettings": { + "commandToExecute": "[concat('bash ./logstash-eventhub-install-ubuntu.sh -n ', parameters('existingEHNamespace'), ' -a ', parameters('existingEHSharedAccessKeyName'), ' -k ', parameters('existingEHSharedAccessKey'), ' -e ', parameters('existingEHEntityPath'), ' -p ', parameters('existingEHPartitions'), ' -i ', variables('esHost'))]" } - ] -} \ No newline at end of file + } + } + ] +} diff --git a/diagnostics-with-elk/azuredeploy.json b/diagnostics-with-elk/azuredeploy.json index ed483262b385..2855d46918f0 100644 --- a/diagnostics-with-elk/azuredeploy.json +++ b/diagnostics-with-elk/azuredeploy.json @@ -1,394 +1,455 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "esClusterName": { - "type": "string", - "defaultValue": "elasticsearch", - "metadata": { - "description": "The name of the Elasticsearch cluster." - } - }, - "esVersion": { - "type": "string", - "defaultValue": "2.3.1", - "allowedValues": [ - "2.3.1", - "2.2.2", - "2.1.2", - "1.7.5" - ], - "metadata": { - "description": "Elasticsearch version to install." - } - }, - "vmClientNodeCount": { - "type": "int", - "defaultValue": 1, - "allowedValues": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9 - ], - "metadata": { - "description": "Number of Elasticsearch client nodes to provision (Setting this to zero puts the data nodes on the load balancer)" - } - }, - "vmDataNodeCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "Number of Elasticsearch data nodes" - } - }, - "vmSizeMasterNodes": { - "type": "string", - "defaultValue": "Standard_D2_v2", - "allowedValues": [ - "Standard_D2_v2", - "Standard_D3_v2", - "Standard_D4_v2", - "Standard_A2", - "Standard_A3", - "Standard_A4", - "Standard_A5", - "Standard_A6", - "Standard_A7", - "Standard_DS2", - "Standard_DS3", - "Standard_DS4", - "Standard_DS13" - ], - "metadata": { - "description": "Size of the Elasticsearch cluster master nodes" - } - }, - "vmSizeClientNodes": { - "type": "string", - "defaultValue": "Standard_D2_v2", - "allowedValues": [ - "Standard_D2_v2", - "Standard_D3_v2", - "Standard_D4_v2", - "Standard_A2", - "Standard_A3", - "Standard_A4", - "Standard_A5", - "Standard_A6", - "Standard_A7", - "Standard_DS2", - "Standard_DS3", - "Standard_DS4", - "Standard_DS13" - ], - "metadata": { - "description": "Size of the Elasticsearch cluster client nodes" - } - }, - "vmSizeDataNodes": { - "type": "string", - "defaultValue": "Standard_D2_v2", - "allowedValues": [ - "Standard_D2_v2", - "Standard_D3_v2", - "Standard_D4_v2", - "Standard_A2", - "Standard_A3", - "Standard_A4", - "Standard_A5", - "Standard_A6", - "Standard_A7", - "Standard_DS2", - "Standard_DS3", - "Standard_DS4", - "Standard_DS13" - ], - "metadata": { - "description": "Size of the Elasticsearch cluster data nodes" - } - }, - "encodedConfigString": { - "type": "string", - "defaultValue": "na", - "metadata": { - "description": "Base64 encoded string which is the Logstash configuration. If you don't want to enter a custom Logstash configuration and would like to use the logstash-input-azurewadtable plugin set this to 'na'." - } - }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "User name for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "ubuntuOSVersion": { - "type": "string", - "defaultValue": "14.04.4-LTS", - "allowedValues": [ - "12.04.5-LTS", - "14.04.4-LTS", - "16.04.0-LTS" - ], - "metadata": { - "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version." - } - }, - "existingDiagnosticsStorageAccountName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Existing diagnostics storage account name." - } - }, - "existingDiagnosticsStorageAccountKey": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Existing diagnostics storage account key." - } - }, - "existingDiagnosticsStorageTableNames": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "List of existing tables containing diagnostics data separated by semicolon (;)." - } - }, - "_artifactsLocation": { - "type": "string", - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/diagnostics-with-elk", - "metadata": { - "description": "Change this value to your repo name if deploying from a fork" - } - }, - "_artifactsLocationSasToken": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Auto-generated token to access _artifactsLocation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "esClusterName": { + "type": "string", + "defaultValue": "elasticsearch", + "metadata": { + "description": "The name of the Elasticsearch cluster." + } }, - "variables": { - "storageAccountPrefix": "[concat(substring(uniqueString(resourceGroup().id, parameters('esClusterName')), 0, 6), substring(parameters('esClusterName'), 0, 3))]", - "storageAccountName": "[concat(variables('storageAccountPrefix'), 'log')]", - "extensionName": "ELKSimple", - "imagePublisher": "Canonical", - "imageOffer": "UbuntuServer", - "OSDiskName": "osdiskforlinuxsimple", - "storageAccountType": "Standard_LRS", - "vmStorageAccountContainerName": "vhds", - "vmName": "logstashvm1", - "vmSize": "Standard_D1", - "vmNicName": "[concat(variables('vmName'), '-nic')]", - "vmNsgName": "[concat(variables('vmName'), '-nsg')]", - "vmPipName": "[concat(variables('vmName'), '-pip')]", - "virtualNetworkName": "elkvnet2", - "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), '/subnets/', 'other')]", - "esHost": "10.0.2.100", - "esTemplateBase": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/elasticsearch", - "esDeploymentName": "esDeploymentForDiagnosticsWithELK" + "esVersion": { + "type": "string", + "defaultValue": "2.3.1", + "allowedValues": [ + "2.3.1", + "2.2.2", + "2.1.2", + "1.7.5" + ], + "metadata": { + "description": "Elasticsearch version to install." + } }, - "resources": [ - { - "apiVersion": "2015-01-01", - "name": "[variables('esDeploymentName')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(variables('esTemplateBase'), '/', 'azuredeploy.json')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "adminUsername": { "value": "[parameters('adminUsername')]" }, - "adminPassword": { "value": "[parameters('adminPassword')]" }, - "virtualNetworkName": { "value": "[variables('virtualNetworkName')]" }, - "OS": { "value": "ubuntu" }, - "authenticationType": { "value": "password" }, - "sshPublicKey": { "value": "" }, - "loadBalancerType": { "value": "internal" }, - "jumpbox": { "value": "Yes" }, - "vmClientNodeCount": { "value": "[parameters('vmClientNodeCount')]" }, - "vmSizeClientNodes": { "value": "[parameters('vmSizeClientNodes')]" }, - "vmSizeMasterNodes": { "value": "[parameters('vmSizeMasterNodes')]" }, - "vmSizeDataNodes": { "value": "[parameters('vmSizeDataNodes')]" }, - "vmDataNodeCount": { "value": "[parameters('vmDataNodeCount')]" }, - "esClusterName": { "value": "[parameters('esClusterName')]" }, - "esVersion": { "value": "[parameters('esVersion')]" }, - "afs": { "value": "no" }, - "marvel": { "value": "no" }, - "marvelCluster": { "value": "no" }, - "vmSizeMarvelNodes": { "value": "Standard_D2_v2" }, - "kibana": { "value": "yes" }, - "sense": { "value": "no" }, - "jmeterAgent": { "value": "no" }, - "cloudAzure": { "value": "no" }, - "cloudAzureStorageAccount": { "value": "" }, - "cloudAzureStorageKey": { "value": "" }, - "_artifactsLocation": { "value": "[variables('esTemplateBase')]" }, - "_artifactsLocationSasToken": { "value": "" } - } - } + "vmClientNodeCount": { + "type": "int", + "defaultValue": 1, + "allowedValues": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "metadata": { + "description": "Number of Elasticsearch client nodes to provision (Setting this to zero puts the data nodes on the load balancer)" + } + }, + "vmDataNodeCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "Number of Elasticsearch data nodes" + } + }, + "vmSizeMasterNodes": { + "type": "string", + "defaultValue": "Standard_D2_v2", + "allowedValues": [ + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS13" + ], + "metadata": { + "description": "Size of the Elasticsearch cluster master nodes" + } + }, + "vmSizeClientNodes": { + "type": "string", + "defaultValue": "Standard_D2_v2", + "allowedValues": [ + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS13" + ], + "metadata": { + "description": "Size of the Elasticsearch cluster client nodes" + } + }, + "vmSizeDataNodes": { + "type": "string", + "defaultValue": "Standard_D2_v2", + "allowedValues": [ + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS13" + ], + "metadata": { + "description": "Size of the Elasticsearch cluster data nodes" + } + }, + "encodedConfigString": { + "type": "string", + "defaultValue": "na", + "metadata": { + "description": "Base64 encoded string which is the Logstash configuration. If you don't want to enter a custom Logstash configuration and would like to use the logstash-input-azurewadtable plugin set this to 'na'." + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "User name for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the Virtual Machine." + } + }, + "ubuntuOSVersion": { + "type": "string", + "defaultValue": "14.04.4-LTS", + "allowedValues": [ + "12.04.5-LTS", + "14.04.4-LTS", + "16.04.0-LTS" + ], + "metadata": { + "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version." + } + }, + "existingDiagnosticsStorageAccountName": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Existing diagnostics storage account name." + } + }, + "existingDiagnosticsStorageAccountKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Existing diagnostics storage account key." + } + }, + "existingDiagnosticsStorageTableNames": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "List of existing tables containing diagnostics data separated by semicolon (;)." + } + }, + "_artifactsLocation": { + "type": "string", + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/diagnostics-with-elk", + "metadata": { + "description": "Change this value to your repo name if deploying from a fork" + } + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "Auto-generated token to access _artifactsLocation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "storageAccountPrefix": "[concat(substring(uniqueString(resourceGroup().id, parameters('esClusterName')), 0, 6), substring(parameters('esClusterName'), 0, 3))]", + "storageAccountName": "[concat(variables('storageAccountPrefix'), 'log')]", + "extensionName": "ELKSimple", + "imagePublisher": "Canonical", + "imageOffer": "UbuntuServer", + "OSDiskName": "osdiskforlinuxsimple", + "storageAccountType": "Standard_LRS", + "vmStorageAccountContainerName": "vhds", + "vmName": "logstashvm1", + "vmSize": "Standard_D1", + "vmNicName": "[concat(variables('vmName'), '-nic')]", + "vmNsgName": "[concat(variables('vmName'), '-nsg')]", + "vmPipName": "[concat(variables('vmName'), '-pip')]", + "virtualNetworkName": "elkvnet2", + "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), '/subnets/', 'other')]", + "esHost": "10.0.2.100", + "esTemplateBase": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/elasticsearch", + "esDeploymentName": "esDeploymentForDiagnosticsWithELK" + }, + "resources": [ + { + "apiVersion": "2015-01-01", + "name": "[variables('esDeploymentName')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('esTemplateBase'), '/', 'azuredeploy.json')]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('vmNsgName')]", - "location": "[resourceGroup().location]", + "parameters": { + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "virtualNetworkName": { + "value": "[variables('virtualNetworkName')]" + }, + "OS": { + "value": "ubuntu" + }, + "authenticationType": { + "value": "password" + }, + "sshPublicKey": { + "value": "" + }, + "loadBalancerType": { + "value": "internal" + }, + "jumpbox": { + "value": "Yes" + }, + "vmClientNodeCount": { + "value": "[parameters('vmClientNodeCount')]" + }, + "vmSizeClientNodes": { + "value": "[parameters('vmSizeClientNodes')]" + }, + "vmSizeMasterNodes": { + "value": "[parameters('vmSizeMasterNodes')]" + }, + "vmSizeDataNodes": { + "value": "[parameters('vmSizeDataNodes')]" + }, + "vmDataNodeCount": { + "value": "[parameters('vmDataNodeCount')]" + }, + "esClusterName": { + "value": "[parameters('esClusterName')]" + }, + "esVersion": { + "value": "[parameters('esVersion')]" + }, + "afs": { + "value": "no" + }, + "marvel": { + "value": "no" + }, + "marvelCluster": { + "value": "no" + }, + "vmSizeMarvelNodes": { + "value": "Standard_D2_v2" + }, + "kibana": { + "value": "yes" + }, + "sense": { + "value": "no" + }, + "jmeterAgent": { + "value": "no" + }, + "cloudAzure": { + "value": "no" + }, + "cloudAzureStorageAccount": { + "value": "" + }, + "cloudAzureStorageKey": { + "value": "" + }, + "_artifactsLocation": { + "value": "[variables('esTemplateBase')]" + }, + "_artifactsLocationSasToken": { + "value": "" + } + } + } + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('vmNsgName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "SSH", "properties": { - "securityRules": [ - { - "name": "SSH", - "properties": { - "description": "Allows SSH traffic", - "protocol": "Tcp", - "sourcePortRange": "22", - "destinationPortRange": "22", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 100, - "direction": "Inbound" - } - } - ] + "description": "Allows SSH traffic", + "protocol": "Tcp", + "sourcePortRange": "22", + "destinationPortRange": "22", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" } - }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('vmPipName')]", - "location": "[resourceGroup().location]", + } + ] + } + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('vmPipName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Static" + } + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('vmNicName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', variables('esDeploymentName'))]", + "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNsgName'))]", + "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmPipName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig2", "properties": { - "publicIPAllocationMethod": "Static" + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmPipName'))]" + }, + "subnet": { + "id": "[variables('subnetRef')]" + }, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNsgName'))]" + } } + } + ] + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "location": "[parameters('location')]", + "tags": { + "displayName": "StorageAccount" + }, + "properties": {} + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "location": "[parameters('location')]", + "tags": { + "displayName": "VirtualMachine" + }, + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[variables('vmSize')]" }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('vmNicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Resources/deployments', variables('esDeploymentName'))]", - "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNsgName'))]", - "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmPipName'))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig2", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmPipName'))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - }, - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNsgName'))]" - } - } - } - ] - } + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "sku": { - "name": "[variables('storageAccountType')]" - }, - "kind": "Storage", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "StorageAccount" + "storageProfile": { + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[parameters('ubuntuOSVersion')]", + "version": "latest" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/', variables('OSDiskName'), '.vhd')]" }, - "properties": {} + "caching": "ReadWrite", + "createOption": "FromImage" + } }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "VirtualMachine" - }, - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", - "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[parameters('ubuntuOSVersion')]", - "version": "latest" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/', variables('OSDiskName'), '.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" - } - ] - } + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" } + ] + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmName'),'/', variables('extensionName'))]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]", + "[resourceId('Microsoft.Resources/deployments', variables('esDeploymentName'))]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'), '/scripts/elk-simple-install-ubuntu.sh', parameters('_artifactsLocationSasToken'))]" + ] }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'),'/', variables('extensionName'))]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]", - "[resourceId('Microsoft.Resources/deployments', variables('esDeploymentName'))]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'), '/scripts/elk-simple-install-ubuntu.sh', parameters('_artifactsLocationSasToken'))]" - ] - }, - "protectedSettings": { - "commandToExecute": "[concat('bash ./elk-simple-install-ubuntu.sh -e ', parameters('encodedConfigString'), ' -a ', parameters('existingDiagnosticsStorageAccountName'), ' -k ', parameters('existingDiagnosticsStorageAccountKey'), ' -t ', parameters('existingDiagnosticsStorageTableNames'), ' -i ', variables('esHost'))]" - } - } + "protectedSettings": { + "commandToExecute": "[concat('bash ./elk-simple-install-ubuntu.sh -e ', parameters('encodedConfigString'), ' -a ', parameters('existingDiagnosticsStorageAccountName'), ' -k ', parameters('existingDiagnosticsStorageAccountKey'), ' -t ', parameters('existingDiagnosticsStorageTableNames'), ' -i ', variables('esHost'))]" } - ] -} \ No newline at end of file + } + } + ] +} diff --git a/diskraid-ubuntu-vm/azuredeploy.json b/diskraid-ubuntu-vm/azuredeploy.json index 314889ba47de..a6ee987a5f05 100644 --- a/diskraid-ubuntu-vm/azuredeploy.json +++ b/diskraid-ubuntu-vm/azuredeploy.json @@ -67,10 +67,16 @@ "metadata": { "description": "Size of each data disk attached to data nodes in (Gb)" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "vmStorageAccountContainerName": "vhd", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", "subnet1Ref": "[concat(variables('vnetID'),'/subnets/',parameters('subnet1Name'))]", "scriptUrl": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/shared_scripts/ubuntu/vm-disk-utils-0.1.sh", @@ -81,7 +87,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -105,7 +111,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -114,7 +120,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -135,7 +141,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "publicIp", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -147,7 +153,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "nic", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIPAddresses/', 'publicIP')]", @@ -177,7 +183,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "myvm", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nic')]", "[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]" @@ -242,7 +248,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('myvm', '/azureVmUtils')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'myvm')]" ], diff --git a/django-app/azuredeploy.json b/django-app/azuredeploy.json index f0037e096583..f982dca288ab 100644 --- a/django-app/azuredeploy.json +++ b/django-app/azuredeploy.json @@ -46,6 +46,13 @@ "metadata": { "description": "DNS Name for the Public IP. Must be lowercase." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -68,7 +75,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -77,7 +84,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -89,7 +96,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -110,7 +117,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -136,7 +143,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -179,7 +186,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/dns-records-office365/azuredeploy.json b/dns-records-office365/azuredeploy.json index 2873bbe4401f..68514c2005b3 100644 --- a/dns-records-office365/azuredeploy.json +++ b/dns-records-office365/azuredeploy.json @@ -1,78 +1,84 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "dnsZoneName": { - "type": "string", - "metadata": { - "description": "Name of the DNS Zone to create or update." - } - }, - "ttl": { - "type": "int", - "defaultValue": 3600, - "metadata": { - "description": "Time to live value, in seconds" - } - }, - "_artifactsLocation": { - "type": "string", - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/dns-records-office365", - "metadata": { - "description": "The base URI where artifacts required by this template are located." - } - }, - "_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": "" - }, - "recordTypes": { - "type": "string", - "defaultValue": [ - "mail;mdm;sfb" - ], - "metadata": { - "description": "A delimited list that defines the resources to create, acceptable values are (mail,mdm, and sfb). A combination of all or just one of the values can be used." - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "dnsZoneName": { + "type": "string", + "metadata": { + "description": "Name of the DNS Zone to create or update." + } + }, + "ttl": { + "type": "int", + "defaultValue": 3600, + "metadata": { + "description": "Time to live value, in seconds" + } + }, + "_artifactsLocation": { + "type": "string", + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/dns-records-office365", + "metadata": { + "description": "The base URI where artifacts required by this template are located." + } + }, + "_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": "" + }, + "recordTypes": { + "type": "string", + "defaultValue": [ + "mail;mdm;sfb" + ], + "metadata": { + "description": "A delimited list that defines the resources to create, acceptable values are (mail,mdm, and sfb). A combination of all or just one of the values can be used." + } + } + }, + "variables": { + "delimiters": [ + ",", + ";" + ], + "records": "[split(parameters('recordTypes'), variables('delimiters'))]" + }, + "resources": [ + { + "apiVersion": "2016-04-01", + "type": "Microsoft.Network/dnszones", + "name": "[parameters('dnsZoneName')]", + "location": "global" + }, + { + "name": "[concat('SettingUpDNSRecods','-',variables('records')[copyIndex()])]", + "type": "Microsoft.Resources/deployments", + "copy": { + "name": "recordcopies", + "count": "[length(variables('records'))]" + }, + "apiVersion": "2015-01-01", + "dependsOn": [ + "[resourceId('Microsoft.Network/dnszones', parameters('dnsZoneName'))]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'),'/',variables('records')[copyIndex()],'.json',parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "dnsZoneName": { + "value": "[parameters('dnsZoneName')]" + }, + "ttl": { + "value": "[parameters('ttl')]" + } } - }, - "variables": { - "delimiters": [ ",", ";" ], - "records": "[split(parameters('recordTypes'), variables('delimiters'))]" - }, - "resources": [{ - "apiVersion": "2016-04-01", - "type": "Microsoft.Network/dnszones", - "name": "[parameters('dnsZoneName')]", - "location": "global" - }, { - "name": "[concat('SettingUpDNSRecods','-',variables('records')[copyIndex()])]", - "type": "Microsoft.Resources/deployments", - "copy": { - "name": "recordcopies", - "count": "[length(variables('records'))]" - }, - "apiVersion": "2015-01-01", - "dependsOn": [ - "[resourceId('Microsoft.Network/dnszones', parameters('dnsZoneName'))]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'),'/',variables('records')[copyIndex()],'.json',parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "dnsZoneName": { - "value": "[parameters('dnsZoneName')]" - }, - "ttl": { - "value": "[parameters('ttl')]" - } - } - } - }] + } + } + ] } diff --git a/dns-records-office365/mail.json b/dns-records-office365/mail.json index 19d132ce32a4..4ba53a05e3b9 100644 --- a/dns-records-office365/mail.json +++ b/dns-records-office365/mail.json @@ -1,69 +1,78 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "dnsZoneName": { - "type": "string", - "metadata": { - "description": "Name of the DNS Zone." - } - }, - "ttl": { - "type": "int", - "defaultValue": "3600", - "metadata": { - "description": "Time to live value, in seconds." - } - }, - }, - "variables": { - "mx": "[concat(replace(parameters('dnsZoneName'),'.','-'),'.mail.protection.outlook.com')]", - }, - "resources": [{ - "comments": "CNAME record needed for autodiscover endpoint for making it easier to configure Outlook.", - "type": "Microsoft.Network/dnszones/CNAME", - "name": "[concat(parameters('dnsZoneName'),'/','autodiscover')]", - "apiVersion": "2016-04-01", - "properties": { - "TTL": "[parameters('ttl')]", - "CNAMERecord": { - "cname": "autodiscover.outlook.com" - } - } - }, { - "type": "Microsoft.Network/dnszones/CNAME", - "name": "[concat(parameters('dnsZoneName'),'/','msoid')]", - "apiVersion": "2016-04-01", - "properties": { - "TTL": "[parameters('ttl')]", - "CNAMERecord": { - "cname": "clientconfig.microsoftonline-p.net" - } - } - }, { - "comments": "MX record so email for your domain will be routed to Office 365", - "type": "Microsoft.Network/dnszones/MX", - "name": "[concat(parameters('dnsZoneName'),'/','@')]", - "apiVersion": "2016-04-01", - "properties": { - "TTL": "[parameters('ttl')]", - "MXRecords": [{ - "exchange": "[variables('mx')]", - "preference": 0 - }] - } - }, { - "comments": "TXT record for Sender policy framework (SPF) records, which are used to prevent spam.", - "type": "Microsoft.Network/dnszones/TXT", - "name": "[concat(parameters('dnsZoneName'),'/','@')]", - "apiVersion": "2016-04-01", - "properties": { - "TTL": "[parameters('TTL')]", - "TXTRecords": [{ - "value": [ - "v=spf1 include:spf.protection.outlook.com -all" - ] - }] - } - }] + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "dnsZoneName": { + "type": "string", + "metadata": { + "description": "Name of the DNS Zone." + } + }, + "ttl": { + "type": "int", + "defaultValue": "3600", + "metadata": { + "description": "Time to live value, in seconds." + } + }, + }, + "variables": { + "mx": "[concat(replace(parameters('dnsZoneName'),'.','-'),'.mail.protection.outlook.com')]" + }, + "resources": [ + { + "comments": "CNAME record needed for autodiscover endpoint for making it easier to configure Outlook.", + "type": "Microsoft.Network/dnszones/CNAME", + "name": "[concat(parameters('dnsZoneName'),'/','autodiscover')]", + "apiVersion": "2016-04-01", + "properties": { + "TTL": "[parameters('ttl')]", + "CNAMERecord": { + "cname": "autodiscover.outlook.com" + } + } + }, + { + "type": "Microsoft.Network/dnszones/CNAME", + "name": "[concat(parameters('dnsZoneName'),'/','msoid')]", + "apiVersion": "2016-04-01", + "properties": { + "TTL": "[parameters('ttl')]", + "CNAMERecord": { + "cname": "clientconfig.microsoftonline-p.net" + } + } + }, + { + "comments": "MX record so email for your domain will be routed to Office 365", + "type": "Microsoft.Network/dnszones/MX", + "name": "[concat(parameters('dnsZoneName'),'/','@')]", + "apiVersion": "2016-04-01", + "properties": { + "TTL": "[parameters('ttl')]", + "MXRecords": [ + { + "exchange": "[variables('mx')]", + "preference": 0 + } + ] + } + }, + { + "comments": "TXT record for Sender policy framework (SPF) records, which are used to prevent spam.", + "type": "Microsoft.Network/dnszones/TXT", + "name": "[concat(parameters('dnsZoneName'),'/','@')]", + "apiVersion": "2016-04-01", + "properties": { + "TTL": "[parameters('TTL')]", + "TXTRecords": [ + { + "value": [ + "v=spf1 include:spf.protection.outlook.com -all" + ] + } + ] + } + } + ] } diff --git a/dns-records-office365/mdm.json b/dns-records-office365/mdm.json index 68ca1afb6ea7..d05cb21189f0 100644 --- a/dns-records-office365/mdm.json +++ b/dns-records-office365/mdm.json @@ -1,41 +1,44 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "dnsZoneName": { - "type": "string", - "metadata": { - "description": "Name of the DNS Zone." - } - }, - "ttl": { - "type": "int", - "defaultValue": "3600", - "metadata": { - "description": "Time to live value, in seconds." - } - }, - }, - "resources": [{ - "type": "Microsoft.Network/dnszones/CNAME", - "name": "[concat(parameters('dnsZoneName'),'/','enterpriseregistration')]", - "apiVersion": "2016-04-01", - "properties": { - "TTL": "[parameters('ttl')]", - "CNAMERecord": { - "cname": "enterpriseregistration.windows.net" - } - } - }, { - "comments": "CNAME record needed for Mobile Device Management (MDM) with Office 365.", - "type": "Microsoft.Network/dnszones/CNAME", - "name": "[concat(parameters('dnsZoneName'),'/','enterpriseenrollment')]", - "apiVersion": "2016-04-01", - "properties": { - "TTL": "[parameters('ttl')]", - "CNAMERecord": { - "cname": "enterpriseenrollment.manage.microsoft.com" - } - } - }] -} + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "dnsZoneName": { + "type": "string", + "metadata": { + "description": "Name of the DNS Zone." + } + }, + "ttl": { + "type": "int", + "defaultValue": "3600", + "metadata": { + "description": "Time to live value, in seconds." + } + } + }, + "resources": [ + { + "type": "Microsoft.Network/dnszones/CNAME", + "name": "[concat(parameters('dnsZoneName'),'/','enterpriseregistration')]", + "apiVersion": "2016-04-01", + "properties": { + "TTL": "[parameters('ttl')]", + "CNAMERecord": { + "cname": "enterpriseregistration.windows.net" + } + } + }, + { + "comments": "CNAME record needed for Mobile Device Management (MDM) with Office 365.", + "type": "Microsoft.Network/dnszones/CNAME", + "name": "[concat(parameters('dnsZoneName'),'/','enterpriseenrollment')]", + "apiVersion": "2016-04-01", + "properties": { + "TTL": "[parameters('ttl')]", + "CNAMERecord": { + "cname": "enterpriseenrollment.manage.microsoft.com" + } + } + } + ] +} \ No newline at end of file diff --git a/dns-records-office365/sfb.json b/dns-records-office365/sfb.json index a7ce7ff608aa..1df32b819d39 100644 --- a/dns-records-office365/sfb.json +++ b/dns-records-office365/sfb.json @@ -1,93 +1,102 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "dnsZoneName": { - "type": "string", - "metadata": { - "description": "Name of the DNS Zone." - } - }, - "ttl": { - "type": "int", - "defaultValue": "3600", - "metadata": { - "description": "Time to live value, in seconds." - } - }, - }, - "variables": { - "apiVersion": "2016-04-01" - }, - "resources": [{ - "comments": "CNAME record needed for autodiscover endpoint for making it easier to configure Outlook.", - "type": "Microsoft.Network/dnszones/CNAME", - "name": "[concat(parameters('dnsZoneName'),'/','autodiscover')]", - "apiVersion": "2016-04-01", - "properties": { - "TTL": "[parameters('ttl')]", - "CNAMERecord": { - "cname": "autodiscover.outlook.com" - } - } - }, { - "comments": "CNAME record needed for autodiscover endpoint for making it easier to configure Skype for Business.", - "type": "Microsoft.Network/dnszones/CNAME", - "name": "[concat(parameters('dnsZoneName'),'/','lyncdiscover')]", - "apiVersion": "2016-04-01", - "properties": { - "TTL": "[parameters('ttl')]", - "CNAMERecord": { - "cname": "webdir.online.lync.com" - } - } - }, { - "type": "Microsoft.Network/dnszones/CNAME", - "name": "[concat(parameters('dnsZoneName'),'/','msoid')]", - "apiVersion": "2016-04-01", - "properties": { - "TTL": "[parameters('ttl')]", - "CNAMERecord": { - "cname": "clientconfig.microsoftonline-p.net" - } - } - }, { - "type": "Microsoft.Network/dnszones/CNAME", - "name": "[concat(parameters('dnsZoneName'),'/','sip')]", - "apiVersion": "2016-04-01", - "properties": { - "TTL": "[parameters('ttl')]", - "CNAMERecord": { - "cname": "sipdir.online.lync.com" - } - } - }, { - "comments": "SRV record to specify sip federation location for Skype for Business.", - "type": "Microsoft.Network/dnszones/SRV", - "name": "[concat(parameters('dnsZoneName'),'/','_sipfederationtls._tcp')]", - "apiVersion": "2016-04-01", - "properties": { - "TTL": "[parameters('ttl')]", - "SRVRecords": [{ - "port": 5061, - "priority": 100, - "target": "sipfed.online.lync.com", - "weight": 1 - }] - } - }, { - "comments": "SRV record to specify sip location for Skype for Business.", - "type": "Microsoft.Network/dnszones/SRV", - "name": "[concat(parameters('dnsZoneName'),'/','_sip._tls')]", - "apiVersion": "2016-04-01", - "properties": { - "TTL": "[parameters('ttl')]", - "SRVRecords": [{ - "port": 443, - "priority": 100, - "target": "sipdir.online.lync.com", - "weight": 1 - }] - } - }] + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "dnsZoneName": { + "type": "string", + "metadata": { + "description": "Name of the DNS Zone." + } + }, + "ttl": { + "type": "int", + "defaultValue": "3600", + "metadata": { + "description": "Time to live value, in seconds." + } + } + }, + "variables": {}, + "resources": [ + { + "comments": "CNAME record needed for autodiscover endpoint for making it easier to configure Outlook.", + "type": "Microsoft.Network/dnszones/CNAME", + "name": "[concat(parameters('dnsZoneName'),'/','autodiscover')]", + "apiVersion": "2016-04-01", + "properties": { + "TTL": "[parameters('ttl')]", + "CNAMERecord": { + "cname": "autodiscover.outlook.com" + } + } + }, + { + "comments": "CNAME record needed for autodiscover endpoint for making it easier to configure Skype for Business.", + "type": "Microsoft.Network/dnszones/CNAME", + "name": "[concat(parameters('dnsZoneName'),'/','lyncdiscover')]", + "apiVersion": "2016-04-01", + "properties": { + "TTL": "[parameters('ttl')]", + "CNAMERecord": { + "cname": "webdir.online.lync.com" + } + } + }, + { + "type": "Microsoft.Network/dnszones/CNAME", + "name": "[concat(parameters('dnsZoneName'),'/','msoid')]", + "apiVersion": "2016-04-01", + "properties": { + "TTL": "[parameters('ttl')]", + "CNAMERecord": { + "cname": "clientconfig.microsoftonline-p.net" + } + } + }, + { + "type": "Microsoft.Network/dnszones/CNAME", + "name": "[concat(parameters('dnsZoneName'),'/','sip')]", + "apiVersion": "2016-04-01", + "properties": { + "TTL": "[parameters('ttl')]", + "CNAMERecord": { + "cname": "sipdir.online.lync.com" + } + } + }, + { + "comments": "SRV record to specify sip federation location for Skype for Business.", + "type": "Microsoft.Network/dnszones/SRV", + "name": "[concat(parameters('dnsZoneName'),'/','_sipfederationtls._tcp')]", + "apiVersion": "2016-04-01", + "properties": { + "TTL": "[parameters('ttl')]", + "SRVRecords": [ + { + "port": 5061, + "priority": 100, + "target": "sipfed.online.lync.com", + "weight": 1 + } + ] + } + }, + { + "comments": "SRV record to specify sip location for Skype for Business.", + "type": "Microsoft.Network/dnszones/SRV", + "name": "[concat(parameters('dnsZoneName'),'/','_sip._tls')]", + "apiVersion": "2016-04-01", + "properties": { + "TTL": "[parameters('ttl')]", + "SRVRecords": [ + { + "port": 443, + "priority": 100, + "target": "sipdir.online.lync.com", + "weight": 1 + } + ] + } + } + ] } diff --git a/dnx-on-ubuntu/azuredeploy.json b/dnx-on-ubuntu/azuredeploy.json index 2589992d12c8..594b9290f977 100644 --- a/dnx-on-ubuntu/azuredeploy.json +++ b/dnx-on-ubuntu/azuredeploy.json @@ -12,14 +12,21 @@ "type": "string", "metadata": { "description": "The admin username for the Ubuntu machine" - } + } }, "vmName": { "defaultValue": "dnx-on-ubuntu", "type": "string", "metadata": { "description": "The name of the Ubuntu machine" - } + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -36,7 +43,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "hardwareProfile": { "vmSize": "Standard_DS2" @@ -78,21 +85,21 @@ "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountVms'))]", "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" - ], + ], "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/installcustomscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName') )]" ], "properties": { "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/dnx-on-ubuntu/scripts/post_deployment.sh" @@ -107,7 +114,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -142,7 +149,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -166,7 +173,7 @@ "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('pipName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "idleTimeoutInMinutes": 4 @@ -177,7 +184,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vnetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -199,7 +206,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountDiagnostics')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": {}, "properties": { "accountType": "Standard_LRS" @@ -210,7 +217,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountVms')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": {}, "properties": { "accountType": "Premium_LRS" diff --git a/docker-ckan/azuredeploy.json b/docker-ckan/azuredeploy.json index fabe66f6874c..00dfc550c788 100644 --- a/docker-ckan/azuredeploy.json +++ b/docker-ckan/azuredeploy.json @@ -25,6 +25,13 @@ "metadata": { "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -54,7 +61,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -63,7 +70,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -75,7 +82,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nsgID')]" ], @@ -102,7 +109,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -128,7 +135,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -166,7 +173,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -209,7 +216,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('extensionName'))]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/docker-kibana-elasticsearch/azuredeploy.json b/docker-kibana-elasticsearch/azuredeploy.json index 1f9d1b3c960c..d141a0c06429 100644 --- a/docker-kibana-elasticsearch/azuredeploy.json +++ b/docker-kibana-elasticsearch/azuredeploy.json @@ -25,6 +25,13 @@ "metadata": { "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -54,7 +61,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -63,7 +70,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -75,7 +82,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nsgID')]" ], @@ -102,7 +109,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -128,7 +135,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -166,7 +173,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -209,7 +216,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('extensionName'))]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/docker-neo4j/azuredeploy.json b/docker-neo4j/azuredeploy.json index 6b55f7f7c2b5..e8fd261ea4a1 100644 --- a/docker-neo4j/azuredeploy.json +++ b/docker-neo4j/azuredeploy.json @@ -57,10 +57,16 @@ "metadata": { "description": "Size of the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-05-01-preview", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "ubuntuOSVersion": "15.10", @@ -90,7 +96,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -99,7 +105,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -111,7 +117,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nsgID')]" ], @@ -138,7 +144,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -164,7 +170,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -230,7 +236,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -284,7 +290,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('azureVMUtilsName'))]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -305,7 +311,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('dockerExtensionName'))]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',variables('vmName'),'/','extensions/',variables('azureVMUtilsName'))]" ], @@ -331,4 +337,4 @@ } } ] -} \ No newline at end of file +} diff --git a/docker-parse/azuredeploy.json b/docker-parse/azuredeploy.json index e712d311910b..b9e15105b8ad 100644 --- a/docker-parse/azuredeploy.json +++ b/docker-parse/azuredeploy.json @@ -50,10 +50,16 @@ "metadata": { "description": "DNS Label for the Public IP. 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." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-06-15", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "ubuntuOSVersion": "15.10", @@ -80,7 +86,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -89,7 +95,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -101,7 +107,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nsgID')]" ], @@ -128,7 +134,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -154,7 +160,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -192,7 +198,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -235,7 +241,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('extensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -265,4 +271,4 @@ } } ] -} \ No newline at end of file +} diff --git a/docker-rancher/azuredeploy.json b/docker-rancher/azuredeploy.json index 60bd19ff3d8a..714b50142e8d 100644 --- a/docker-rancher/azuredeploy.json +++ b/docker-rancher/azuredeploy.json @@ -114,10 +114,16 @@ "metadata": { "description": "Change this value to your repo name if deploying from a fork" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-11-01", "deployTypeParam": { "Nodes": "nodes.json", "Server": "server.json" @@ -160,4 +166,4 @@ } } ] -} \ No newline at end of file +} diff --git a/docker-rancher/nodes.json b/docker-rancher/nodes.json index fdd430005c64..7b2c11f0bbb3 100644 --- a/docker-rancher/nodes.json +++ b/docker-rancher/nodes.json @@ -94,18 +94,22 @@ }, "minValue": 1, "maxValue": 250 + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-06-15", "availabilitySet": "[parameters('rancherNodeName')]", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'ranchernode')]", "networkSecurityGroupName": "[parameters('rancherNodeName')]", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "ubuntuOSVersion": "14.04.2-LTS", - "OSDiskName": "rancherosdisk", - "nicName": "ranchernic", "virtualNetworkName": "[parameters('rancherNodeName')]", "addressPrefix": "192.168.253.0/24", "subnetName": "[parameters('rancherNodeName')]", @@ -123,7 +127,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -132,14 +136,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySet')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSecurityGroupName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -205,7 +209,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" ], @@ -232,7 +236,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('rancherNodeName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "pipLoopNode", "count": "[parameters('rancherCount')]" @@ -248,7 +252,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('rancherNodeName'), copyIndex(), '-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoopNode", "count": "[parameters('rancherCount')]" @@ -278,7 +282,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('rancherNodeName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "vmLoopNode", "count": "[parameters('rancherCount')]" @@ -325,7 +329,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('rancherNodeName'), copyIndex(),'/', variables('extensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "extLoopNode", "count": "[parameters('rancherCount')]" @@ -357,4 +361,4 @@ } } ] -} \ No newline at end of file +} diff --git a/docker-rancher/server.json b/docker-rancher/server.json index 7fb36d660542..1603ffdce540 100644 --- a/docker-rancher/server.json +++ b/docker-rancher/server.json @@ -94,19 +94,23 @@ }, "minValue": 1, "maxValue": 1 + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "rancherCount": 1, - "apiVersion": "2015-06-15", "availabilitySet": "[parameters('rancherNodeName')]", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'rancherhost')]", "networkSecurityGroupName": "[parameters('rancherNodeName')]", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "ubuntuOSVersion": "14.04.2-LTS", - "OSDiskName": "rancherosdisk", - "nicName": "ranchernic", "virtualNetworkName": "[parameters('rancherNodeName')]", "addressPrefix": "192.168.254.0/24", "subnetName": "[parameters('rancherNodeName')]", @@ -124,7 +128,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -133,14 +137,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySet')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSecurityGroupName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -192,7 +196,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" ], @@ -219,7 +223,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('rancherNodeName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "pipLoopNode", "count": "[variables('rancherCount')]" @@ -235,7 +239,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('rancherNodeName'), '-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoopNode", "count": "[variables('rancherCount')]" @@ -265,7 +269,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('rancherNodeName'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "vmLoopNode", "count": "[variables('rancherCount')]" @@ -312,7 +316,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('rancherNodeName'),'/', variables('extensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "extLoopNode", "count": "[variables('rancherCount')]" @@ -342,4 +346,4 @@ } } ] -} \ No newline at end of file +} diff --git a/docker-simple-on-ubuntu/azuredeploy.json b/docker-simple-on-ubuntu/azuredeploy.json index a8aa4e72c727..01d295c9db47 100644 --- a/docker-simple-on-ubuntu/azuredeploy.json +++ b/docker-simple-on-ubuntu/azuredeploy.json @@ -44,6 +44,13 @@ "15.10", "16.04.0-LTS" ] + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -69,7 +76,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "kind": "Storage", "sku": { "name": "[variables('storageAccountType')]" @@ -79,7 +86,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -91,7 +98,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -112,7 +119,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -138,7 +145,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -181,7 +188,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('extensionName'))]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -190,9 +197,8 @@ "type": "DockerExtension", "typeHandlerVersion": "1.0", "autoUpgradeMinorVersion": true, - "settings": { } + "settings": {} } } ] } - diff --git a/docker-swarm-cluster/azuredeploy.json b/docker-swarm-cluster/azuredeploy.json index bfae4940d6cf..352f9b8d12da 100644 --- a/docker-swarm-cluster/azuredeploy.json +++ b/docker-swarm-cluster/azuredeploy.json @@ -14,6 +14,13 @@ "metadata": { "description": "Number of Swarm worker nodes in the cluster." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -67,7 +74,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -76,21 +83,21 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetMasters')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetNodes')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('managementPublicIPAddrName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -102,7 +109,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('nodesPublicIPAddrName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -114,7 +121,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('mastersNsgID')]", "[variables('nodesNsgID')]" @@ -152,7 +159,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('mastersNsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -176,7 +183,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nodesNsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -200,7 +207,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('vmNameMaster'), copyIndex(), '-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoopMaster", "count": "[variables('masterCount')]" @@ -239,7 +246,7 @@ "apiVersion": "2015-06-15", "name": "[variables('mastersLbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('managementPublicIPAddrName'))]" ], @@ -265,7 +272,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/loadBalancers/inboundNatRules", "name": "[concat(variables('mastersLbName'), '/', 'SSH-', variables('vmNameMaster'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "lbNatLoopMaster", "count": "[variables('masterCount')]" @@ -287,7 +294,7 @@ "apiVersion": "2015-06-15", "name": "[variables('nodesLbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('nodesPublicIPAddrName'))]" ], @@ -313,7 +320,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('vmNameNode'),copyIndex(), '-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoopNode", "count": "[parameters('nodeCount')]" @@ -345,7 +352,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmNameMaster'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "vmLoopMaster", "count": "[variables('masterCount')]" @@ -406,7 +413,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmNameNode'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "vmLoopNode", "count": "[parameters('nodeCount')]" @@ -466,7 +473,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmNameMaster'), copyIndex(), '/DockerExtension')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "extensionLoopMaster", "count": "[variables('masterCount')]" @@ -492,7 +499,7 @@ "8302:8302", "8302:8302/udp", "8400:8400" - ], + ], "volumes": [ "/data/consul:/data" ], @@ -520,7 +527,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmNameNode'), copyIndex(), '/DockerExtension')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "extensionLoopNode", "count": "[parameters('nodeCount')]" @@ -536,10 +543,10 @@ "settings": { "docker": { "port": "2375", - "options": [ - "--cluster-store=consul://10.0.0.4:8500", - "--cluster-advertise=eth0:2375" - ] + "options": [ + "--cluster-store=consul://10.0.0.4:8500", + "--cluster-advertise=eth0:2375" + ] } } } diff --git a/docker-wordpress-mysql/azuredeploy.json b/docker-wordpress-mysql/azuredeploy.json index ac4a43ec7d9d..6b0d00907480 100644 --- a/docker-wordpress-mysql/azuredeploy.json +++ b/docker-wordpress-mysql/azuredeploy.json @@ -31,6 +31,13 @@ "metadata": { "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -60,7 +67,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -69,7 +76,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -81,7 +88,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nsgID')]" ], @@ -108,7 +115,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -134,7 +141,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -172,7 +179,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -215,7 +222,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('extensionName'))]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/dokku-vm/azuredeploy.json b/dokku-vm/azuredeploy.json index 22aa08697421..27a9d70960ea 100644 --- a/dokku-vm/azuredeploy.json +++ b/dokku-vm/azuredeploy.json @@ -1,241 +1,248 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "metadata": { - "description": "User name for the Virtual Machine." - } - }, - "sshKeyData": { - "type": "string", - "metadata": { - "description": "The SSH public key data for the administrator account as a string." - } - }, - "dnsLabelPrefix": { - "type": "string", - "metadata": { - "description": "DNS Label for the Public IP. 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." - } - }, - "ubuntuOSVersion": { - "type": "string", - "defaultValue": "16.04.0-LTS", - "allowedValues": [ - "14.04.4-LTS", - "16.04.0-LTS" - ], - "metadata": { - "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values: 12.04.5-LTS, 14.04.2-LTS, 15.10." - } - }, - "dokkuVersion": { - "type": "string", - "defaultValue": "0.10.3", - "metadata": { - "description": "The Dokku version to launch" - } - }, - "vmSize": { - "type": "string", - "defaultValue": "Standard_D2S_V3", - "metadata": { - "description": "Size of the virtual machine" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "type": "string", + "metadata": { + "description": "User name for the Virtual Machine." + } + }, + "sshKeyData": { + "type": "string", + "metadata": { + "description": "The SSH public key data for the administrator account as a string." + } + }, + "dnsLabelPrefix": { + "type": "string", + "metadata": { + "description": "DNS Label for the Public IP. 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." + } + }, + "ubuntuOSVersion": { + "type": "string", + "defaultValue": "16.04.0-LTS", + "allowedValues": [ + "14.04.4-LTS", + "16.04.0-LTS" + ], + "metadata": { + "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values: 12.04.5-LTS, 14.04.2-LTS, 15.10." + } + }, + "dokkuVersion": { + "type": "string", + "defaultValue": "0.10.3", + "metadata": { + "description": "The Dokku version to launch" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D2S_V3", + "metadata": { + "description": "Size of the virtual machine" + } + }, + "storageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ], + "metadata": { + "description": "Type of storage to be used for the VM's OS disk. Diagnostics disk will use Standard_LRS." + } + }, + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/dokku-vm" + }, + "_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": { + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'dokku')]", + "imagePublisher": "Canonical", + "imageOffer": "UbuntuServer", + "nicName": "dokkuVMNic", + "addressPrefix": "10.0.0.0/16", + "subnetName": "Subnet", + "subnetPrefix": "10.0.0.0/24", + "publicIPAddressName": "dokkuPublicIP", + "publicIPAddressType": "Dynamic", + "vmName": "DokkuVM", + "virtualNetworkName": "DokkuVNet", + "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets/', variables('virtualNetworkName'), variables('subnetName'))]", + "sshKeyPath": "[concat('/home/',parameters('adminUsername'), '/.ssh/authorized_keys')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2017-08-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "[variables('publicIPAddressType')]", + "dnsSettings": { + "domainNameLabel": "[parameters('dnsLabelPrefix')]" + } + } + }, + { + "apiVersion": "2017-08-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] }, - "storageAccountType": { - "type": "string", - "defaultValue": "Standard_LRS", - "allowedValues": [ - "Standard_LRS", - "Premium_LRS" - ], - "metadata": { - "description": "Type of storage to be used for the VM's OS disk. Diagnostics disk will use Standard_LRS." + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "[variables('subnetPrefix')]" } - }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/dokku-vm" - }, - "_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": "" - } + } + ] + } }, - "variables": { - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'dokku')]", - "imagePublisher": "Canonical", - "imageOffer": "UbuntuServer", - "nicName": "dokkuVMNic", - "addressPrefix": "10.0.0.0/16", - "subnetName": "Subnet", - "subnetPrefix": "10.0.0.0/24", - "publicIPAddressName": "dokkuPublicIP", - "publicIPAddressType": "Dynamic", - "vmName": "DokkuVM", - "virtualNetworkName": "DokkuVNet", - "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets/', variables('virtualNetworkName'), variables('subnetName'))]", - "sshKeyPath": "[concat('/home/',parameters('adminUsername'), '/.ssh/authorized_keys')]" + { + "apiVersion": "2017-08-01", + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('nicName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[variables('publicIPAddressName')]", + "[variables('virtualNetworkName')]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" + }, + "subnet": { + "id": "[variables('subnetRef')]" + } + } + } + ] + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": {} + { + "apiVersion": "2017-03-30", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[variables('storageAccountName')]", + "[variables('nicName')]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" }, - { - "apiVersion": "2017-08-01", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]", - "dnsSettings": { - "domainNameLabel": "[parameters('dnsLabelPrefix')]" + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[variables('sshKeyPath')]", + "keyData": "[parameters('sshKeyData')]" } + ] } + } }, - { - "apiVersion": "2017-08-01", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] + "storageProfile": { + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[parameters('ubuntuOSVersion')]", + "version": "latest" + }, + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('storageAccountType')]" } + } }, - { - "apiVersion": "2017-08-01", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[variables('publicIPAddressName')]", - "[variables('virtualNetworkName')]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ] + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" } + ] }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))).primaryEndpoints['blob']]" + } + } + }, + "resources": [ { - "apiVersion": "2017-03-30", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[variables('storageAccountName')]", - "[variables('nicName')]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "path": "[variables('sshKeyPath')]", - "keyData": "[parameters('sshKeyData')]" - } - ] - } - } - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[parameters('ubuntuOSVersion')]", - "version": "latest" - }, - "osDisk": { - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "[parameters('storageAccountType')]" - } - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))).primaryEndpoints['blob']]" - } - } - }, - "resources": [ - { - "type": "extensions", - "name": "initdokku", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[variables('vmName')]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'), '/scripts/deploy_dokku.sh', parameters('_artifactsLocationSasToken'))]" - ], - "commandToExecute": "[concat('sh deploy_dokku.sh ', parameters('dokkuVersion'))]" - } - } - } - ] + "type": "extensions", + "name": "initdokku", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[variables('vmName')]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'), '/scripts/deploy_dokku.sh', parameters('_artifactsLocationSasToken'))]" + ], + "commandToExecute": "[concat('sh deploy_dokku.sh ', parameters('dokkuVersion'))]" + } + } } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/drone-ubuntu-vm/azuredeploy.json b/drone-ubuntu-vm/azuredeploy.json index 88d91ee87c85..94678c0af1d3 100644 --- a/drone-ubuntu-vm/azuredeploy.json +++ b/drone-ubuntu-vm/azuredeploy.json @@ -37,6 +37,13 @@ "metadata": { "description": "GitHub application client secret required by the Drone CI components for synchronizing repositories" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -59,7 +66,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -68,7 +75,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -80,7 +87,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -101,7 +108,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -127,7 +134,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -171,7 +178,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/DockerExtension')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',variables('vmName'))]" ], @@ -180,22 +187,22 @@ "type": "DockerExtension", "typeHandlerVersion": "1.0", "autoUpgradeMinorVersion": true, - "settings": { } + "settings": {} } }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/installDrone')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], "properties": { "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/drone-ubuntu-vm/install_drone.sh" diff --git a/dsc-extension-azure-automation-pullserver/azuredeploy.json b/dsc-extension-azure-automation-pullserver/azuredeploy.json index b7d7275b8e44..ed73fb7aa9b0 100644 --- a/dsc-extension-azure-automation-pullserver/azuredeploy.json +++ b/dsc-extension-azure-automation-pullserver/azuredeploy.json @@ -1,182 +1,188 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmName": { - "type": "string", - "metadata": { - "description": "Name of the existing VM to apply the DSC configuration to" - } - }, - "modulesUrl": { - "type": "string", - "defaultValue": "https://github.com/Azure/azure-quickstart-templates/raw/master/dsc-extension-azure-automation-pullserver/UpdateLCMforAAPull.zip", - "metadata": { - "description": "URL for the DSC configuration package. NOTE: Can be a Github url(raw) to the zip file (this is the default value)" - } - }, - "configurationFunction": { - "type": "string", - "defaultValue": "UpdateLCMforAAPull.ps1\\ConfigureLCMforAAPull", - "metadata": { - "description": "DSC configuration function to call. Should contain filename and function in format fileName.ps1\\configurationfunction" - } - }, - "registrationKey": { - "type": "securestring", - "metadata": { - "description": "Registration key to use to onboard to the Azure Automation DSC pull/reporting server" - } - }, - "registrationUrl": { - "type": "string", - "metadata": { - "description": "Registration url of the Azure Automation DSC pull/reporting server" - } - }, - "nodeConfigurationName": { - "type": "string", - "metadata": { - "description": "The name of the node configuration, on the Azure Automation DSC pull server, that this node will be configured as" - } - }, - "configurationMode": { - "type": "string", - "defaultValue": "ApplyAndMonitor", - "allowedValues": [ - "ApplyOnly", - "ApplyAndMonitor", - "ApplyAndAutoCorrect" - ], - "metadata": { - "description": "DSC agent (LCM) configuration mode setting. ApplyOnly, ApplyAndMonitor, or ApplyAndAutoCorrect" - } - }, - "configurationModeFrequencyMins": { - "type": "int", - "defaultValue": 15, - "metadata": { - "description": "DSC agent (LCM) configuration mode frequency setting, in minutes" - } - }, - "refreshFrequencyMins": { - "type": "int", - "defaultValue": 30, - "metadata": { - "description": "DSC agent (LCM) refresh frequency setting, in minutes" - } - }, - "rebootNodeIfNeeded": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "DSC agent (LCM) rebootNodeIfNeeded setting" - } - }, - "actionAfterReboot": { - "type": "string", - "defaultValue": "ContinueConfiguration", - "allowedValues": [ - "ContinueConfiguration", - "StopConfiguration" - ], - "metadata": { - "description": "DSC agent (LCM) actionAfterReboot setting. ContinueConfiguration or StopConfiguration" - } - }, - "allowModuleOverwrite": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "DSC agent (LCM) allowModuleOverwrite setting" - } - }, - "timestamp": { - "type": "string", - "metadata": { - "description": "The current datetime, as a string, to force the request to go through ARM even if all fields are the same as last ARM deployment of this template; example in parameters file is in MM/dd/yyyy H:mm:ss tt format" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the existing VM to apply the DSC configuration to" + } + }, + "modulesUrl": { + "type": "string", + "defaultValue": "https://github.com/Azure/azure-quickstart-templates/raw/master/dsc-extension-azure-automation-pullserver/UpdateLCMforAAPull.zip", + "metadata": { + "description": "URL for the DSC configuration package. NOTE: Can be a Github url(raw) to the zip file (this is the default value)" + } + }, + "configurationFunction": { + "type": "string", + "defaultValue": "UpdateLCMforAAPull.ps1\\ConfigureLCMforAAPull", + "metadata": { + "description": "DSC configuration function to call. Should contain filename and function in format fileName.ps1\\configurationfunction" + } + }, + "registrationKey": { + "type": "securestring", + "metadata": { + "description": "Registration key to use to onboard to the Azure Automation DSC pull/reporting server" + } + }, + "registrationUrl": { + "type": "string", + "metadata": { + "description": "Registration url of the Azure Automation DSC pull/reporting server" + } + }, + "nodeConfigurationName": { + "type": "string", + "metadata": { + "description": "The name of the node configuration, on the Azure Automation DSC pull server, that this node will be configured as" + } + }, + "configurationMode": { + "type": "string", + "defaultValue": "ApplyAndMonitor", + "allowedValues": [ + "ApplyOnly", + "ApplyAndMonitor", + "ApplyAndAutoCorrect" + ], + "metadata": { + "description": "DSC agent (LCM) configuration mode setting. ApplyOnly, ApplyAndMonitor, or ApplyAndAutoCorrect" + } + }, + "configurationModeFrequencyMins": { + "type": "int", + "defaultValue": 15, + "metadata": { + "description": "DSC agent (LCM) configuration mode frequency setting, in minutes" + } + }, + "refreshFrequencyMins": { + "type": "int", + "defaultValue": 30, + "metadata": { + "description": "DSC agent (LCM) refresh frequency setting, in minutes" + } + }, + "rebootNodeIfNeeded": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "DSC agent (LCM) rebootNodeIfNeeded setting" + } }, - "variables": { - + "actionAfterReboot": { + "type": "string", + "defaultValue": "ContinueConfiguration", + "allowedValues": [ + "ContinueConfiguration", + "StopConfiguration" + ], + "metadata": { + "description": "DSC agent (LCM) actionAfterReboot setting. ContinueConfiguration or StopConfiguration" + } }, - "resources": [ + "allowModuleOverwrite": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "DSC agent (LCM) allowModuleOverwrite setting" + } + }, + "timestamp": { + "type": "string", + "metadata": { + "description": "The current datetime, as a string, to force the request to go through ARM even if all fields are the same as last ARM deployment of this template; example in parameters file is in MM/dd/yyyy H:mm:ss tt format" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [ { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('vmName'),'/Microsoft.Powershell.DSC')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": { - "publisher": "Microsoft.Powershell", - "type": "DSC", - "typeHandlerVersion": "2.19", - "autoUpgradeMinorVersion": true, - "protectedSettings": { - "Items": { - "registrationKeyPrivate": "[parameters('registrationKey')]" - } + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('vmName'),'/Microsoft.Powershell.DSC')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.19", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "Items": { + "registrationKeyPrivate": "[parameters('registrationKey')]" + } + }, + "settings": { + "ModulesUrl": "[parameters('modulesUrl')]", + "SasToken": "", + "ConfigurationFunction": "[parameters('configurationFunction')]", + "Properties": [ + { + "Name": "RegistrationKey", + "Value": { + "UserName": "PLACEHOLDER_DONOTUSE", + "Password": "PrivateSettingsRef:registrationKeyPrivate" + }, + "TypeName": "System.Management.Automation.PSCredential" + }, + { + "Name": "RegistrationUrl", + "Value": "[parameters('registrationUrl')]", + "TypeName": "System.String" + }, + { + "Name": "NodeConfigurationName", + "Value": "[parameters('nodeConfigurationName')]", + "TypeName": "System.String" + }, + { + "Name": "ConfigurationMode", + "Value": "[parameters('configurationMode')]", + "TypeName": "System.String" + }, + { + "Name": "ConfigurationModeFrequencyMins", + "Value": "[parameters('configurationModeFrequencyMins')]", + "TypeName": "System.Int32" + }, + { + "Name": "RefreshFrequencyMins", + "Value": "[parameters('refreshFrequencyMins')]", + "TypeName": "System.Int32" + }, + { + "Name": "RebootNodeIfNeeded", + "Value": "[parameters('rebootNodeIfNeeded')]", + "TypeName": "System.Boolean" + }, + { + "Name": "ActionAfterReboot", + "Value": "[parameters('actionAfterReboot')]", + "TypeName": "System.String" + }, + { + "Name": "AllowModuleOverwrite", + "Value": "[parameters('allowModuleOverwrite')]", + "TypeName": "System.Boolean" }, - "settings": { - "ModulesUrl": "[parameters('modulesUrl')]", - "SasToken": "", - "ConfigurationFunction": "[parameters('configurationFunction')]", - "Properties": [ - { - "Name": "RegistrationKey", - "Value": { - "UserName": "PLACEHOLDER_DONOTUSE", - "Password": "PrivateSettingsRef:registrationKeyPrivate" - }, - "TypeName": "System.Management.Automation.PSCredential" - }, - { - "Name": "RegistrationUrl", - "Value": "[parameters('registrationUrl')]", - "TypeName": "System.String" - }, - { - "Name": "NodeConfigurationName", - "Value": "[parameters('nodeConfigurationName')]", - "TypeName": "System.String" - }, - { - "Name": "ConfigurationMode", - "Value": "[parameters('configurationMode')]", - "TypeName": "System.String" - }, - { - "Name": "ConfigurationModeFrequencyMins", - "Value": "[parameters('configurationModeFrequencyMins')]", - "TypeName": "System.Int32" - }, - { - "Name": "RefreshFrequencyMins", - "Value": "[parameters('refreshFrequencyMins')]", - "TypeName": "System.Int32" - }, - { - "Name": "RebootNodeIfNeeded", - "Value": "[parameters('rebootNodeIfNeeded')]", - "TypeName": "System.Boolean" - }, - { - "Name": "ActionAfterReboot", - "Value": "[parameters('actionAfterReboot')]", - "TypeName": "System.String" - }, - { - "Name": "AllowModuleOverwrite", - "Value": "[parameters('allowModuleOverwrite')]", - "TypeName": "System.Boolean" - }, - { - "Name": "Timestamp", - "Value": "[parameters('timestamp')]", - "TypeName": "System.String" - } - ] + { + "Name": "Timestamp", + "Value": "[parameters('timestamp')]", + "TypeName": "System.String" } + ] } - }] + } + } + ] } diff --git a/dsc-extension-iis-server-windows-vm/azuredeploy.json b/dsc-extension-iis-server-windows-vm/azuredeploy.json index 85d923d4578d..55f95839d09f 100644 --- a/dsc-extension-iis-server-windows-vm/azuredeploy.json +++ b/dsc-extension-iis-server-windows-vm/azuredeploy.json @@ -64,6 +64,13 @@ "metadata": { "description": "DSC configuration function to call" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -85,7 +92,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -94,7 +101,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]" } @@ -103,7 +110,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -124,7 +131,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -150,7 +157,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -193,7 +200,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/', variables('vmExtensionName'))]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], diff --git a/dsc-pullserver-to-win-server/azuredeploy.json b/dsc-pullserver-to-win-server/azuredeploy.json index f27eee15c22e..ca1db39187aa 100644 --- a/dsc-pullserver-to-win-server/azuredeploy.json +++ b/dsc-pullserver-to-win-server/azuredeploy.json @@ -68,6 +68,13 @@ "description": "The location of resources such as templates and DSC modules that the script is dependent" }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/dsc-pullserver-to-win-server/" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -92,9 +99,9 @@ { "name": "[parameters('newStorageAccount')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "Storage" }, @@ -105,9 +112,9 @@ { "name": "dscVirtualNetwork", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "VirtualNetwork" }, @@ -136,7 +143,7 @@ { "name": "[variables('dscPullSrvNicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', 'dscVirtualNetwork')]" @@ -165,7 +172,7 @@ { "name": "[parameters('dscPullSrvName')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccount'))]", @@ -211,7 +218,7 @@ { "name": "deployDSCPullServer", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('dscPullSrvName'))]" @@ -227,9 +234,9 @@ "settings": { "modulesUrl": "[variables('deployDSCPullServerConfigurationFile')]", "configurationFunction": "[variables('deployDSCPullServerConfigurationFunction')]", - "properties": { } + "properties": {} }, - "protectedSettings": { } + "protectedSettings": {} } } ] @@ -237,9 +244,9 @@ { "name": "[variables('dscPullIPName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "dscPullIP" }, diff --git a/elasticsearch-centos-3node/azuredeploy.json b/elasticsearch-centos-3node/azuredeploy.json index bf6c09f42e74..f3b3a4d7d0dd 100644 --- a/elasticsearch-centos-3node/azuredeploy.json +++ b/elasticsearch-centos-3node/azuredeploy.json @@ -25,13 +25,19 @@ "metadata": { "description": "Prefix to use for common resources" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "apiVersion": "2015-06-15", "vmSize": "Standard_D1", "clusterName": "elasticcluster", - "logTableName": "elasticscriptlog", "imagePublisher": "OpenLogic", "imageOffer": "CentOS", "imageSku": "7.1", @@ -67,7 +73,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "StorageAccount" }, @@ -79,7 +85,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]" } @@ -88,7 +94,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "AvailabilitySet" } @@ -97,7 +103,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('JBNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -121,7 +127,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('JBNSGName'))]" ], @@ -157,7 +163,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('vmPrefix'), variables('networkInterfaceName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NetworkInterface" }, @@ -191,7 +197,7 @@ "name": "virtualMachineLoop", "count": "[variables('numberOfNodes')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "VirtualMachines" }, @@ -257,7 +263,7 @@ "name": "virtualMachineExtensions", "count": "[variables('numberOfNodes')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmPrefix'), copyindex())]" ], @@ -276,7 +282,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "JumpboxNic", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NetworkInterface" }, @@ -306,7 +312,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "Jumpbox", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "VirtualMachines" }, @@ -352,7 +358,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "Jumpbox/PrepExtension", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Compute/virtualMachines/Jumpbox" ], @@ -373,4 +379,4 @@ "value": "[concat('https://ms.portal.azure.com/#asset/HubsExtension/ResourceGroups/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name)]" } } -} \ No newline at end of file +} diff --git a/elasticsearch-jmeter/azuredeploy.json b/elasticsearch-jmeter/azuredeploy.json index 5786e417011c..306b45ef2dc7 100644 --- a/elasticsearch-jmeter/azuredeploy.json +++ b/elasticsearch-jmeter/azuredeploy.json @@ -99,6 +99,13 @@ "metadata": { "description": "Change this value to your repo name if deploying from a fork" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -161,7 +168,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -170,7 +177,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "jmeter-pip", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Static" } @@ -179,7 +186,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "jmeter-nsg", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -203,7 +210,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks/subnets", "name": "[concat(variables('networkSettings').virtualNetworkName, '/jmeter')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressPrefix": "[variables('networkSettings').subnet.jmeter.prefix]" } @@ -212,7 +219,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), '-sub', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "subNodesNicLoop", "count": "[parameters('subNodeCount')]" @@ -239,7 +246,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), '-boss')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', 'jmeter-pip')]", "[concat('Microsoft.Network/networkSecurityGroups/', 'jmeter-nsg')]" @@ -269,7 +276,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), '-boss')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), '-boss')]", "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" @@ -307,7 +314,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '-boss', '/installjmeter')]", "apiVersion": "[variables('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), '-boss')]" ], @@ -327,7 +334,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), '-sub', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "subVmLoop", "count": "[parameters('subNodeCount')]" @@ -369,7 +376,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '-sub', copyindex(), '/installjmeter')]", "apiVersion": "[variables('apiVersion')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), '-sub', copyindex())]" ], @@ -392,4 +399,4 @@ "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', 'jmeter-pip')).ipAddress]" } } -} \ No newline at end of file +} diff --git a/elasticsearch-jmeter/prereqs/prereq.azuredeploy.json b/elasticsearch-jmeter/prereqs/prereq.azuredeploy.json index 62c97be5cd3b..3b14b27bab27 100644 --- a/elasticsearch-jmeter/prereqs/prereq.azuredeploy.json +++ b/elasticsearch-jmeter/prereqs/prereq.azuredeploy.json @@ -1,458 +1,468 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Admin password used when provisioning virtual machines" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Admin password used when provisioning virtual machines" + } }, - "variables": { - "esClusterName": "elasticsearch", - "_artifactsLocation": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/elasticsearch", - "nestedTemplatesFolderName": "nestedtemplates", - "scriptsLocation": "[concat(variables('_artifactsLocation'), '/scripts/')]", - "sharedScriptsLocation": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/shared_scripts/ubuntu/", - "storageAccountPrefix": "[concat('st',uniqueString(resourceGroup().id))]", - "storageAccountNameAFS": "[concat(variables('storageAccountPrefix'), 'afs')]", - "storageAccountNameShared": "[concat(variables('storageAccountPrefix'), 'sh')]", - "networkSettings": { - "virtualNetworkName": "es-vnet", - "addressPrefix": "10.0.0.0/16", - "subnet": { - "master": { - "name": "master", - "prefix": "10.0.0.0/24", - "vnet": "es-vnet" - }, - "data": { - "name": "data", - "prefix": "10.0.1.0/24", - "vnet": "es-vnet" - }, - "other": { - "name": "other", - "prefix": "10.0.2.0/24", - "vnet": "es-vnet" - } - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "esClusterName": "elasticsearch", + "_artifactsLocation": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/elasticsearch", + "nestedTemplatesFolderName": "nestedtemplates", + "scriptsLocation": "[concat(variables('_artifactsLocation'), '/scripts/')]", + "sharedScriptsLocation": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/shared_scripts/ubuntu/", + "storageAccountPrefix": "[concat('st',uniqueString(resourceGroup().id))]", + "storageAccountNameAFS": "[concat(variables('storageAccountPrefix'), 'afs')]", + "storageAccountNameShared": "[concat(variables('storageAccountPrefix'), 'sh')]", + "networkSettings": { + "virtualNetworkName": "es-vnet", + "addressPrefix": "10.0.0.0/16", + "subnet": { + "master": { + "name": "master", + "prefix": "10.0.0.0/24", + "vnet": "es-vnet" }, - "lbBackEndPoolsAdded": { - "backendPools": [{ - "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'es-load-balancer', 'LBBE')]" - }] + "data": { + "name": "data", + "prefix": "10.0.1.0/24", + "vnet": "es-vnet" }, - "lbBackendPoolsRemoved": { - "backendPools": [] + "other": { + "name": "other", + "prefix": "10.0.2.0/24", + "vnet": "es-vnet" + } + } + }, + "lbBackEndPoolsAdded": { + "backendPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'es-load-balancer', 'LBBE')]" + } + ] + }, + "lbBackendPoolsRemoved": { + "backendPools": [] + }, + "dataLBSettings": "[variables('lbBackendPoolsRemoved')]", + "ubuntuScripts": [ + "[concat(variables('scriptsLocation'), 'elasticsearch-ubuntu-install.sh', '')]", + "[concat(variables('scriptsLocation'), 'kibana-install.sh', '')]", + "[concat(variables('sharedScriptsLocation'), 'vm-disk-utils-0.1.sh')]", + "[concat(variables('sharedScriptsLocation'), 'afs-utils-0.1.sh')]" + ], + "authSet": { + "password": "[parameters('adminPassword')]", + "sshKey": "", + "type": "password" + }, + "ubuntuSettings": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "14.04.4-LTS", + "version": "latest" + }, + "linuxConfiguration": {}, + "managementPort": "22", + "extensionSettings": { + "marvel": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "autoUpgradeMinorVersion": true, + "typeHandlerVersion": "2.0", + "settings": { + "fileUris": "[variables('ubuntuScripts')]", + "commandToExecute": "[concat('bash elasticsearch-ubuntu-install.sh -wn elasticsearch-marvel -v 2.3.1 -d 10.0.2.2-3 -k ')]" + } + }, + "master": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "autoUpgradeMinorVersion": true, + "typeHandlerVersion": "2.0", + "settings": { + "fileUris": "[variables('ubuntuScripts')]", + "commandToExecute": "[concat('bash elasticsearch-ubuntu-install.sh -xn elasticsearch -v 2.3.1 -d 10.0.0.1-3 -m -a ', variables('storageAccountNameAFS'), ' -k ')]" + } }, - "dataLBSettings": "[variables('lbBackendPoolsRemoved')]", - "ubuntuScripts": [ - "[concat(variables('scriptsLocation'), 'elasticsearch-ubuntu-install.sh', '')]", - "[concat(variables('scriptsLocation'), 'kibana-install.sh', '')]", - "[concat(variables('sharedScriptsLocation'), 'vm-disk-utils-0.1.sh')]", - "[concat(variables('sharedScriptsLocation'), 'afs-utils-0.1.sh')]" - ], - "authSet": { - "password": "[parameters('adminPassword')]", - "sshKey": "", - "type": "password" + "client": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": "[variables('ubuntuScripts')]", + "commandToExecute": "[concat('bash elasticsearch-ubuntu-install.sh -yn elasticsearch -v 2.3.1 -d 10.0.0.1-3 -m -a ', variables('storageAccountNameAFS'), ' -k ')]" + } }, - "ubuntuSettings": { - "imageReference": { - "publisher": "Canonical", - "offer": "UbuntuServer", - "sku": "14.04.4-LTS", - "version": "latest" - }, - "linuxConfiguration": {}, - "managementPort": "22", - "extensionSettings": { - "marvel": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "autoUpgradeMinorVersion": true, - "typeHandlerVersion": "2.0", - "settings": { - "fileUris": "[variables('ubuntuScripts')]", - "commandToExecute": "[concat('bash elasticsearch-ubuntu-install.sh -wn elasticsearch-marvel -v 2.3.1 -d 10.0.2.2-3 -k ')]" - } - }, - "master": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "autoUpgradeMinorVersion": true, - "typeHandlerVersion": "2.0", - "settings": { - "fileUris": "[variables('ubuntuScripts')]", - "commandToExecute": "[concat('bash elasticsearch-ubuntu-install.sh -xn elasticsearch -v 2.3.1 -d 10.0.0.1-3 -m -a ', variables('storageAccountNameAFS'), ' -k ')]" - } - }, - "client": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": "[variables('ubuntuScripts')]", - "commandToExecute": "[concat('bash elasticsearch-ubuntu-install.sh -yn elasticsearch -v 2.3.1 -d 10.0.0.1-3 -m -a ', variables('storageAccountNameAFS'), ' -k ')]" - } - }, - "data": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "settings": { - "fileUris": "[variables('ubuntuScripts')]", - "commandToExecute": "[concat('bash elasticsearch-ubuntu-install.sh -zn elasticsearch -v 2.3.1 -d 10.0.0.1-3 -m -a ', variables('storageAccountNameAFS'), ' -k ')]" - } - }, - "kibana": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "autoUpgradeMinorVersion": true, - "typeHandlerVersion": "2.0", - "settings": { - "fileUris": "[variables('ubuntuScripts')]", - "commandToExecute": "[concat('bash kibana-install.sh -v 2.3.1 -m -s -t http://10.0.0.10:9200')]" - } - } - } + "data": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "settings": { + "fileUris": "[variables('ubuntuScripts')]", + "commandToExecute": "[concat('bash elasticsearch-ubuntu-install.sh -zn elasticsearch -v 2.3.1 -d 10.0.0.1-3 -m -a ', variables('storageAccountNameAFS'), ' -k ')]" + } }, - "osSettings": "[variables('ubuntuSettings')]", - "storageBinPackMap": [ - "[div(sub(add(1, 4), 1), 4)]", - "[div(sub(add(2, 4), 1), 4)]", - "[div(sub(add(3, 4), 1), 4)]", - "[div(sub(add(4, 4), 1), 4)]", - "[div(sub(add(5, 4), 1), 4)]", - "[div(sub(add(6, 4), 1), 4)]", - "[div(sub(add(7, 4), 1), 4)]", - "[div(sub(add(8, 4), 1), 4)]", - "[div(sub(add(9, 4), 1), 4)]", - "[div(sub(add(10, 4), 1), 4)]", - "[div(sub(add(11, 4), 1), 4)]", - "[div(sub(add(12, 4), 1), 4)]", - "[div(sub(add(13, 4), 1), 4)]", - "[div(sub(add(14, 4), 1), 4)]", - "[div(sub(add(15, 4), 1), 4)]", - "[div(sub(add(16, 4), 1), 4)]", - "[div(sub(add(17, 4), 1), 4)]", - "[div(sub(add(18, 4), 1), 4)]", - "[div(sub(add(19, 4), 1), 4)]", - "[div(sub(add(20, 4), 1), 4)]", - "[div(sub(add(21, 4), 1), 4)]", - "[div(sub(add(22, 4), 1), 4)]", - "[div(sub(add(23, 4), 1), 4)]", - "[div(sub(add(24, 4), 1), 4)]", - "[div(sub(add(25, 4), 1), 4)]", - "[div(sub(add(26, 4), 1), 4)]", - "[div(sub(add(27, 4), 1), 4)]", - "[div(sub(add(28, 4), 1), 4)]", - "[div(sub(add(29, 4), 1), 4)]", - "[div(sub(add(30, 4), 1), 4)]", - "[div(sub(add(31, 4), 1), 4)]", - "[div(sub(add(32, 4), 1), 4)]", - "[div(sub(add(33, 4), 1), 4)]", - "[div(sub(add(34, 4), 1), 4)]", - "[div(sub(add(35, 4), 1), 4)]", - "[div(sub(add(36, 4), 1), 4)]", - "[div(sub(add(37, 4), 1), 4)]", - "[div(sub(add(38, 4), 1), 4)]", - "[div(sub(add(39, 4), 1), 4)]", - "[div(sub(add(40, 4), 1), 4)]", - "[div(sub(add(51, 4), 1), 4)]", - "[div(sub(add(52, 4), 1), 4)]", - "[div(sub(add(53, 4), 1), 4)]", - "[div(sub(add(54, 4), 1), 4)]", - "[div(sub(add(55, 4), 1), 4)]", - "[div(sub(add(56, 4), 1), 4)]", - "[div(sub(add(57, 4), 1), 4)]", - "[div(sub(add(58, 4), 1), 4)]", - "[div(sub(add(59, 4), 1), 4)]", - "[div(sub(add(60, 4), 1), 4)]" - ], - "dataNodeStorageSettings": { - "count": "[div(sub(add(3, 4), 1), 4)]", - "mapping": "[variables('storageBinPackMap')]", - "accountType": "Standard_LRS", - "afs": "[variables('storageAccountNameAFS')]", - "shared": "[variables('storageAccountNameShared')]", - "prefix": "[concat(variables('storageAccountPrefix'), 'da')]" + "kibana": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "autoUpgradeMinorVersion": true, + "typeHandlerVersion": "2.0", + "settings": { + "fileUris": "[variables('ubuntuScripts')]", + "commandToExecute": "[concat('bash kibana-install.sh -v 2.3.1 -m -s -t http://10.0.0.10:9200')]" + } } + } }, - "resources": [{ - "name": "master-nodes", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "dependsOn": [ - "[resourceId('Microsoft.Resources/deployments', 'shared')]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', 'master-nodes-resources.json', '')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "storageSettings": { - "value": "[variables('dataNodeStorageSettings')]" - }, - "adminUsername": { - "value": "demouser" - }, - "authSet": { - "value": "[variables('authSet')]" - }, - "masterNodesIpPrefix": { - "value": "10.0.0.1" - }, - "vmSize": { - "value": "Standard_D2_v2" - }, - "subnet": { - "value": "[variables('networkSettings').subnet.master]" - }, - "osSettings": { - "value": "[variables('osSettings')]" - }, - "namespace": { - "value": "[concat(variables('esClusterName'), '-master')]" - } - } - } + "osSettings": "[variables('ubuntuSettings')]", + "storageBinPackMap": [ + "[div(sub(add(1, 4), 1), 4)]", + "[div(sub(add(2, 4), 1), 4)]", + "[div(sub(add(3, 4), 1), 4)]", + "[div(sub(add(4, 4), 1), 4)]", + "[div(sub(add(5, 4), 1), 4)]", + "[div(sub(add(6, 4), 1), 4)]", + "[div(sub(add(7, 4), 1), 4)]", + "[div(sub(add(8, 4), 1), 4)]", + "[div(sub(add(9, 4), 1), 4)]", + "[div(sub(add(10, 4), 1), 4)]", + "[div(sub(add(11, 4), 1), 4)]", + "[div(sub(add(12, 4), 1), 4)]", + "[div(sub(add(13, 4), 1), 4)]", + "[div(sub(add(14, 4), 1), 4)]", + "[div(sub(add(15, 4), 1), 4)]", + "[div(sub(add(16, 4), 1), 4)]", + "[div(sub(add(17, 4), 1), 4)]", + "[div(sub(add(18, 4), 1), 4)]", + "[div(sub(add(19, 4), 1), 4)]", + "[div(sub(add(20, 4), 1), 4)]", + "[div(sub(add(21, 4), 1), 4)]", + "[div(sub(add(22, 4), 1), 4)]", + "[div(sub(add(23, 4), 1), 4)]", + "[div(sub(add(24, 4), 1), 4)]", + "[div(sub(add(25, 4), 1), 4)]", + "[div(sub(add(26, 4), 1), 4)]", + "[div(sub(add(27, 4), 1), 4)]", + "[div(sub(add(28, 4), 1), 4)]", + "[div(sub(add(29, 4), 1), 4)]", + "[div(sub(add(30, 4), 1), 4)]", + "[div(sub(add(31, 4), 1), 4)]", + "[div(sub(add(32, 4), 1), 4)]", + "[div(sub(add(33, 4), 1), 4)]", + "[div(sub(add(34, 4), 1), 4)]", + "[div(sub(add(35, 4), 1), 4)]", + "[div(sub(add(36, 4), 1), 4)]", + "[div(sub(add(37, 4), 1), 4)]", + "[div(sub(add(38, 4), 1), 4)]", + "[div(sub(add(39, 4), 1), 4)]", + "[div(sub(add(40, 4), 1), 4)]", + "[div(sub(add(51, 4), 1), 4)]", + "[div(sub(add(52, 4), 1), 4)]", + "[div(sub(add(53, 4), 1), 4)]", + "[div(sub(add(54, 4), 1), 4)]", + "[div(sub(add(55, 4), 1), 4)]", + "[div(sub(add(56, 4), 1), 4)]", + "[div(sub(add(57, 4), 1), 4)]", + "[div(sub(add(58, 4), 1), 4)]", + "[div(sub(add(59, 4), 1), 4)]", + "[div(sub(add(60, 4), 1), 4)]" + ], + "dataNodeStorageSettings": { + "count": "[div(sub(add(3, 4), 1), 4)]", + "mapping": "[variables('storageBinPackMap')]", + "accountType": "Standard_LRS", + "afs": "[variables('storageAccountNameAFS')]", + "shared": "[variables('storageAccountNameShared')]", + "prefix": "[concat(variables('storageAccountPrefix'), 'da')]" + } + }, + "resources": [ + { + "name": "master-nodes", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'shared')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', 'master-nodes-resources.json', '')]", + "contentVersion": "1.0.0.0" }, - { - "name": "marvel-nodes", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "dependsOn": [ - "[resourceId('Microsoft.Resources/deployments', 'shared')]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', 'empty-resources.json', '')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "storageAccountName": { - "value": "[variables('storageAccountNameShared')]" - }, - "adminUsername": { - "value": "demouser" - }, - "authSet": { - "value": "[variables('authSet')]" - }, - "marvelNodesIpPrefix": { - "value": "10.0.2.2" - }, - "vmSize": { - "value": "Standard_D2_v2" - }, - "subnet": { - "value": "[variables('networkSettings').subnet.other]" - }, - "osSettings": { - "value": "[variables('osSettings')]" - }, - "namespace": { - "value": "[concat(variables('esClusterName'), '-marvel')]" - } - } - } + "parameters": { + "storageSettings": { + "value": "[variables('dataNodeStorageSettings')]" + }, + "adminUsername": { + "value": "demouser" + }, + "authSet": { + "value": "[variables('authSet')]" + }, + "masterNodesIpPrefix": { + "value": "10.0.0.1" + }, + "vmSize": { + "value": "Standard_D2_v2" + }, + "subnet": { + "value": "[variables('networkSettings').subnet.master]" + }, + "osSettings": { + "value": "[variables('osSettings')]" + }, + "namespace": { + "value": "[concat(variables('esClusterName'), '-master')]" + } + } + } + }, + { + "name": "marvel-nodes", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'shared')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', 'empty-resources.json', '')]", + "contentVersion": "1.0.0.0" }, - { - "name": "shared", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', 'shared-resources.json', '')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "networkSettings": { - "value": "[variables('networkSettings')]" - }, - "storageSettings": { - "value": "[variables('dataNodeStorageSettings')]" - }, - "loadBalancerType": { - "value": "internal" - }, - "ilbIpAddress": { - "value": "10.0.2.100" - } - } - } + "parameters": { + "storageAccountName": { + "value": "[variables('storageAccountNameShared')]" + }, + "adminUsername": { + "value": "demouser" + }, + "authSet": { + "value": "[variables('authSet')]" + }, + "marvelNodesIpPrefix": { + "value": "10.0.2.2" + }, + "vmSize": { + "value": "Standard_D2_v2" + }, + "subnet": { + "value": "[variables('networkSettings').subnet.other]" + }, + "osSettings": { + "value": "[variables('osSettings')]" + }, + "namespace": { + "value": "[concat(variables('esClusterName'), '-marvel')]" + } + } + } + }, + { + "name": "shared", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', 'shared-resources.json', '')]", + "contentVersion": "1.0.0.0" }, - { - "name": "client-nodes", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "dependsOn": [ - "[resourceId('Microsoft.Resources/deployments', 'shared')]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', 'client-nodes-resources.json', '')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "adminUsername": { - "value": "demouser" - }, - "authSet": { - "value": "[variables('authSet')]" - }, - "storageSettings": { - "value": "[variables('dataNodeStorageSettings')]" - }, - "subnet": { - "value": "[variables('networkSettings').subnet.other]" - }, - "vmSize": { - "value": "Standard_D2_v2" - }, - "osSettings": { - "value": "[variables('osSettings')]" - }, - "vmCount": { - "value": 1 - }, - "lbBackendPools": { - "value": "[variables('lbBackEndPoolsAdded')]" - }, - "namespace": { - "value": "[concat(variables('esClusterName'), '-client')]" - } - } - } + "parameters": { + "networkSettings": { + "value": "[variables('networkSettings')]" + }, + "storageSettings": { + "value": "[variables('dataNodeStorageSettings')]" + }, + "loadBalancerType": { + "value": "internal" + }, + "ilbIpAddress": { + "value": "10.0.2.100" + } + } + } + }, + { + "name": "client-nodes", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'shared')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', 'client-nodes-resources.json', '')]", + "contentVersion": "1.0.0.0" }, - { - "name": "data-nodes", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "dependsOn": [ - "[resourceId('Microsoft.Resources/deployments', 'shared')]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', 'data-nodes-4disk-resources.json', '')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "adminUsername": { - "value": "demouser" - }, - "authSet": { - "value": "[variables('authSet')]" - }, - "storageSettings": { - "value": "[variables('dataNodeStorageSettings')]" - }, - "subnet": { - "value": "[variables('networkSettings').subnet.data]" - }, - "vmSize": { - "value": "Standard_D2_v2" - }, - "vmCount": { - "value": 3 - }, - "namespace": { - "value": "[concat(variables('esClusterName'), '-data')]" - }, - "osSettings": { - "value": "[variables('osSettings')]" - }, - "lbBackendPools": { - "value": "[variables('dataLBSettings')]" - } - } - } + "parameters": { + "adminUsername": { + "value": "demouser" + }, + "authSet": { + "value": "[variables('authSet')]" + }, + "storageSettings": { + "value": "[variables('dataNodeStorageSettings')]" + }, + "subnet": { + "value": "[variables('networkSettings').subnet.other]" + }, + "vmSize": { + "value": "Standard_D2_v2" + }, + "osSettings": { + "value": "[variables('osSettings')]" + }, + "vmCount": { + "value": 1 + }, + "lbBackendPools": { + "value": "[variables('lbBackEndPoolsAdded')]" + }, + "namespace": { + "value": "[concat(variables('esClusterName'), '-client')]" + } + } + } + }, + { + "name": "data-nodes", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'shared')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', 'data-nodes-4disk-resources.json', '')]", + "contentVersion": "1.0.0.0" }, - { - "name": "jumpbox", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "dependsOn": [ - "[resourceId('Microsoft.Resources/deployments', 'shared')]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', 'jumpbox-resources.json', '')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "storageAccountName": { - "value": "[variables('storageAccountNameShared')]" - }, - "adminUsername": { - "value": "demouser" - }, - "authSet": { - "value": "[variables('authSet')]" - }, - "subnet": { - "value": "[variables('networkSettings').subnet.other]" - }, - "osSettings": { - "value": "[variables('osSettings')]" - }, - "namespace": { - "value": "[concat(variables('esClusterName'), '-jumpbox')]" - } - } - } + "parameters": { + "adminUsername": { + "value": "demouser" + }, + "authSet": { + "value": "[variables('authSet')]" + }, + "storageSettings": { + "value": "[variables('dataNodeStorageSettings')]" + }, + "subnet": { + "value": "[variables('networkSettings').subnet.data]" + }, + "vmSize": { + "value": "Standard_D2_v2" + }, + "vmCount": { + "value": 3 + }, + "namespace": { + "value": "[concat(variables('esClusterName'), '-data')]" + }, + "osSettings": { + "value": "[variables('osSettings')]" + }, + "lbBackendPools": { + "value": "[variables('dataLBSettings')]" + } + } + } + }, + { + "name": "jumpbox", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'shared')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/', 'jumpbox-resources.json', '')]", + "contentVersion": "1.0.0.0" }, - { - "name": "kibana", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "dependsOn": [ - "[resourceId('Microsoft.Resources/deployments', 'shared')]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/kibana-resources.json', '')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "storageAccountName": { - "value": "[variables('storageAccountNameShared')]" - }, - "adminUsername": { - "value": "demouser" - }, - "authSet": { - "value": "[variables('authSet')]" - }, - "subnet": { - "value": "[variables('networkSettings').subnet.other]" - }, - "osSettings": { - "value": "[variables('osSettings')]" - }, - "namespace": { - "value": "[concat(variables('esClusterName'), '-kibana')]" - } - } - } + "parameters": { + "storageAccountName": { + "value": "[variables('storageAccountNameShared')]" + }, + "adminUsername": { + "value": "demouser" + }, + "authSet": { + "value": "[variables('authSet')]" + }, + "subnet": { + "value": "[variables('networkSettings').subnet.other]" + }, + "osSettings": { + "value": "[variables('osSettings')]" + }, + "namespace": { + "value": "[concat(variables('esClusterName'), '-jumpbox')]" + } } - ], - "outputs": { - "existingVnetName": { - "type": "string", - "value": "es-vnet" + } + }, + { + "name": "kibana", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'shared')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('_artifactsLocation'), '/', variables('nestedTemplatesFolderName'), '/kibana-resources.json', '')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "storageAccountName": { + "value": "[variables('storageAccountNameShared')]" + }, + "adminUsername": { + "value": "demouser" + }, + "authSet": { + "value": "[variables('authSet')]" + }, + "subnet": { + "value": "[variables('networkSettings').subnet.other]" + }, + "osSettings": { + "value": "[variables('osSettings')]" + }, + "namespace": { + "value": "[concat(variables('esClusterName'), '-kibana')]" + } } + } + } + ], + "outputs": { + "existingVnetName": { + "type": "string", + "value": "es-vnet" } + } } diff --git a/elasticsearch/azuredeploy.json b/elasticsearch/azuredeploy.json index 3b7b35cc2210..49bfff6abd12 100644 --- a/elasticsearch/azuredeploy.json +++ b/elasticsearch/azuredeploy.json @@ -307,6 +307,13 @@ "metadata": { "description": "Auto-generated token to access _artifactsLocation" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -418,9 +425,9 @@ "yes": "[concat(' -e ', variables('marvelNodesIpPrefix'), '-3')]", "no": "" }, - "centos" : { - "yes" : "[concat(' -e ', variables('marvelNodesIpPrefix'), '-3')]", - "no": "" + "centos": { + "yes": "[concat(' -e ', variables('marvelNodesIpPrefix'), '-3')]", + "no": "" }, "windows": { "yes": "[concat(' -marvelEndpoints ', variables('marvelNodesIpPrefix'), '-3')]", @@ -531,7 +538,7 @@ "kibana": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", - "autoUpgradeMinorVersion": true, + "autoUpgradeMinorVersion": true, "typeHandlerVersion": "2.0", "settings": { "fileUris": "[variables('ubuntuScripts')]", @@ -541,45 +548,45 @@ } }, "centosSettings": { - "imageReference":{ + "imageReference": { "publisher": "OpenLogic", "offer": "CentOS", "sku": "7.2", "version": "latest" }, "linuxConfiguration": "[variables('configurationObject')[parameters('authenticationType')]]", - "managementPort":"22", - "extensionSettings":{ + "managementPort": "22", + "extensionSettings": { "marvel": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "autoUpgradeMinorVersion": true, - "typeHandlerVersion": "2.0", - "settings": { - "fileUris": "[variables('centosScripts')]", - "commandToExecute": "[concat('bash elasticsearch-centos-install.sh -wn ', variables('esSettings').marvelClusterName, ' -v ', variables('esSettings').version, ' -d ', variables('esSettings').marvelHosts, ' -k ')]" - } - }, + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "autoUpgradeMinorVersion": true, + "typeHandlerVersion": "2.0", + "settings": { + "fileUris": "[variables('centosScripts')]", + "commandToExecute": "[concat('bash elasticsearch-centos-install.sh -wn ', variables('esSettings').marvelClusterName, ' -v ', variables('esSettings').version, ' -d ', variables('esSettings').marvelHosts, ' -k ')]" + } + }, "master": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": "[variables('centosScripts')]", - "commandToExecute": "[concat('bash elasticsearch-centos-install.sh -xn ', variables('esSettings').clusterName, ' -v ', variables('esSettings').version, ' -d ', variables('esSettings').discoveryHosts, variables('marvelParamValue'), variables('jmeterParamValue'), variables('cloudAzureParamValue'), variables('marvelExportParamValue'), variables('afsParamValue'))]" - } - }, + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": "[variables('centosScripts')]", + "commandToExecute": "[concat('bash elasticsearch-centos-install.sh -xn ', variables('esSettings').clusterName, ' -v ', variables('esSettings').version, ' -d ', variables('esSettings').discoveryHosts, variables('marvelParamValue'), variables('jmeterParamValue'), variables('cloudAzureParamValue'), variables('marvelExportParamValue'), variables('afsParamValue'))]" + } + }, "client": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": "[variables('centosScripts')]", - "commandToExecute": "[concat('bash elasticsearch-centos-install.sh -yn ', variables('esSettings').clusterName, ' -v ', variables('esSettings').version, ' -d ', variables('esSettings').discoveryHosts, variables('marvelParamValue'), variables('jmeterParamValue'), variables('cloudAzureParamValue'),variables('marvelExportParamValue'), variables('afsParamValue'))]" - } - }, + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": "[variables('centosScripts')]", + "commandToExecute": "[concat('bash elasticsearch-centos-install.sh -yn ', variables('esSettings').clusterName, ' -v ', variables('esSettings').version, ' -d ', variables('esSettings').discoveryHosts, variables('marvelParamValue'), variables('jmeterParamValue'), variables('cloudAzureParamValue'),variables('marvelExportParamValue'), variables('afsParamValue'))]" + } + }, "data": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", diff --git a/elasticsearch/nestedtemplates/client-nodes-resources.json b/elasticsearch/nestedtemplates/client-nodes-resources.json index 442d2d4ee7d7..65df819aef80 100644 --- a/elasticsearch/nestedtemplates/client-nodes-resources.json +++ b/elasticsearch/nestedtemplates/client-nodes-resources.json @@ -56,6 +56,13 @@ "metadata": { "description": "Namespace for resources created by this template" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -70,14 +77,14 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "es-client-set", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "clientNodesNicLoop", "count": "[parameters('vmCount')]" @@ -101,7 +108,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "clientVmLoop", "count": "[parameters('vmCount')]" @@ -147,7 +154,7 @@ "type": "extensions", "name": "installelasticsearch", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', concat(variables('vmName'), copyindex()))]" ], @@ -164,4 +171,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/elasticsearch/nestedtemplates/data-nodes-0disk-resources.json b/elasticsearch/nestedtemplates/data-nodes-0disk-resources.json index 55618bc0a0c4..917e9b4ffcc4 100644 --- a/elasticsearch/nestedtemplates/data-nodes-0disk-resources.json +++ b/elasticsearch/nestedtemplates/data-nodes-0disk-resources.json @@ -57,6 +57,13 @@ "metadata": { "description": "loadBalancerBackendAddressPools config object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -70,7 +77,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "es-data-set", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformUpdateDomainCount": 20, "platformFaultDomainCount": 3 @@ -80,7 +87,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), '-nic', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'nicLoop')]", "count": "[parameters('vmCount')]" @@ -104,7 +111,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'virtualMachineLoop')]", "count": "[parameters('vmCount')]" @@ -150,7 +157,7 @@ "type": "extensions", "name": "installelasticsearch", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', concat(variables('vmName'), copyindex()))]" ], @@ -167,4 +174,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/elasticsearch/nestedtemplates/data-nodes-16disk-resources.json b/elasticsearch/nestedtemplates/data-nodes-16disk-resources.json index dbe04806d8ba..d2d9e244b9c9 100644 --- a/elasticsearch/nestedtemplates/data-nodes-16disk-resources.json +++ b/elasticsearch/nestedtemplates/data-nodes-16disk-resources.json @@ -64,6 +64,13 @@ "metadata": { "description": "loadBalancerBackendAddressPools config object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -78,7 +85,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "es-data-set", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformUpdateDomainCount": 20, "platformFaultDomainCount": 3 @@ -88,7 +95,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), '-nic', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'nicLoop')]", "count": "[parameters('vmCount')]" @@ -112,7 +119,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'virtualMachineLoop')]", "count": "[parameters('vmCount')]" @@ -320,7 +327,7 @@ "type": "extensions", "name": "installelasticsearch", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', concat(variables('vmName'), copyindex()))]" ], @@ -337,4 +344,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/elasticsearch/nestedtemplates/data-nodes-2disk-resources.json b/elasticsearch/nestedtemplates/data-nodes-2disk-resources.json index fde64e2f836e..b5c21fbb0288 100644 --- a/elasticsearch/nestedtemplates/data-nodes-2disk-resources.json +++ b/elasticsearch/nestedtemplates/data-nodes-2disk-resources.json @@ -64,6 +64,13 @@ "metadata": { "description": "loadBalancerBackendAddressPools config object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -78,7 +85,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "es-data-set", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformUpdateDomainCount": 20, "platformFaultDomainCount": 3 @@ -88,7 +95,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), '-nic', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'nicLoop')]", "count": "[parameters('vmCount')]" @@ -112,7 +119,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'virtualMachineLoop')]", "count": "[parameters('vmCount')]" @@ -180,7 +187,7 @@ "type": "extensions", "name": "installelasticsearch", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', concat(variables('vmName'), copyindex()))]" ], @@ -197,4 +204,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/elasticsearch/nestedtemplates/data-nodes-4disk-resources.json b/elasticsearch/nestedtemplates/data-nodes-4disk-resources.json index 17f5d6b259ee..ef51f07a3135 100644 --- a/elasticsearch/nestedtemplates/data-nodes-4disk-resources.json +++ b/elasticsearch/nestedtemplates/data-nodes-4disk-resources.json @@ -64,6 +64,13 @@ "metadata": { "description": "loadBalancerBackendAddressPools config object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -78,7 +85,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "es-data-set", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformUpdateDomainCount": 20, "platformFaultDomainCount": 3 @@ -88,7 +95,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), '-nic', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'nicLoop')]", "count": "[parameters('vmCount')]" @@ -112,7 +119,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'virtualMachineLoop')]", "count": "[parameters('vmCount')]" @@ -200,7 +207,7 @@ "type": "extensions", "name": "installelasticsearch", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', concat(variables('vmName'), copyindex()))]" ], @@ -217,4 +224,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/elasticsearch/nestedtemplates/data-nodes-8disk-resources.json b/elasticsearch/nestedtemplates/data-nodes-8disk-resources.json index 46d752cfb2cd..e4795e531b47 100644 --- a/elasticsearch/nestedtemplates/data-nodes-8disk-resources.json +++ b/elasticsearch/nestedtemplates/data-nodes-8disk-resources.json @@ -64,6 +64,13 @@ "metadata": { "description": "loadBalancerBackendAddressPools config object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -78,7 +85,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "es-data-set", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformUpdateDomainCount": 20, "platformFaultDomainCount": 3 @@ -88,7 +95,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), '-nic', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'nicLoop')]", "count": "[parameters('vmCount')]" @@ -112,7 +119,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "[concat(parameters('namespace'), 'virtualMachineLoop')]", "count": "[parameters('vmCount')]" @@ -240,7 +247,7 @@ "type": "extensions", "name": "installelasticsearch", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', concat(variables('vmName'), copyindex()))]" ], @@ -257,4 +264,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/elasticsearch/nestedtemplates/empty-resources.json b/elasticsearch/nestedtemplates/empty-resources.json index 62d5951ca229..842155115f28 100644 --- a/elasticsearch/nestedtemplates/empty-resources.json +++ b/elasticsearch/nestedtemplates/empty-resources.json @@ -41,9 +41,16 @@ "namespace": { "type": "string", "defaultValue": "" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, "resources": [], "outputs": {} -} \ No newline at end of file +} diff --git a/elasticsearch/nestedtemplates/jumpbox-resources.json b/elasticsearch/nestedtemplates/jumpbox-resources.json index 63acc6de45cc..7cdc97264b64 100644 --- a/elasticsearch/nestedtemplates/jumpbox-resources.json +++ b/elasticsearch/nestedtemplates/jumpbox-resources.json @@ -38,6 +38,13 @@ "metadata": { "description": "Elasticsearch deployment platform settings" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -53,7 +60,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -77,7 +84,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Static" } @@ -86,7 +93,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIpName'))]", "[resourceId('Microsoft.Network/networkSecurityGroups', variables('securityGroupName'))]" @@ -115,7 +122,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" ], @@ -156,4 +163,4 @@ "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses', variables('publicIpName'))).ipAddress]" } } -} \ No newline at end of file +} diff --git a/elasticsearch/nestedtemplates/kibana-resources.json b/elasticsearch/nestedtemplates/kibana-resources.json index b0c63f78d435..7d4b40fafde3 100644 --- a/elasticsearch/nestedtemplates/kibana-resources.json +++ b/elasticsearch/nestedtemplates/kibana-resources.json @@ -38,6 +38,13 @@ "metadata": { "description": "Platform and OS settings" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -53,7 +60,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -91,7 +98,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Static" } @@ -100,7 +107,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIpName'))]", "[resourceId('Microsoft.Network/networkSecurityGroups', variables('securityGroupName'))]" @@ -129,7 +136,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" ], @@ -167,7 +174,7 @@ "type": "extensions", "name": "installkibana", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" ], @@ -186,4 +193,4 @@ "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses', variables('publicIpName'))).ipAddress]" } } -} \ No newline at end of file +} diff --git a/elasticsearch/nestedtemplates/marvel-nodes-resources.json b/elasticsearch/nestedtemplates/marvel-nodes-resources.json index f749d416ff81..93aa62c42fc1 100644 --- a/elasticsearch/nestedtemplates/marvel-nodes-resources.json +++ b/elasticsearch/nestedtemplates/marvel-nodes-resources.json @@ -50,6 +50,13 @@ "metadata": { "description": "Namespace for resources created by this template" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -62,7 +69,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "es-marvel-set", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformUpdateDomainCount": 3, "platformFaultDomainCount": 3 @@ -72,7 +79,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "marvelNodesNicLoop", "count": 3 @@ -96,7 +103,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "marvelVmLoop", "count": 3 @@ -142,7 +149,7 @@ "type": "extensions", "name": "installelasticsearch", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', concat(variables('vmName'), copyindex()))]" ], @@ -159,4 +166,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/elasticsearch/nestedtemplates/master-nodes-resources.json b/elasticsearch/nestedtemplates/master-nodes-resources.json index 405835cb125f..d22120d7f4ec 100644 --- a/elasticsearch/nestedtemplates/master-nodes-resources.json +++ b/elasticsearch/nestedtemplates/master-nodes-resources.json @@ -50,6 +50,13 @@ "metadata": { "description": "Namespace for resources created by this template" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -64,7 +71,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "es-master-set", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformUpdateDomainCount": 3, "platformFaultDomainCount": 3 @@ -74,7 +81,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "masterNodesNicLoop", "count": 3 @@ -98,7 +105,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "masterVmLoop", "count": 3 @@ -144,7 +151,7 @@ "type": "extensions", "name": "installelasticsearch", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', concat(variables('vmName'), copyindex()))]" ], @@ -161,4 +168,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/elasticsearch/nestedtemplates/shared-resources.json b/elasticsearch/nestedtemplates/shared-resources.json index 063b872fc2dd..4e007042820c 100644 --- a/elasticsearch/nestedtemplates/shared-resources.json +++ b/elasticsearch/nestedtemplates/shared-resources.json @@ -30,6 +30,13 @@ "metadata": { "description": "The static IP address to use with the internal load balancer configuration" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -69,7 +76,7 @@ "name": "Standard_LRS" }, "kind": "Storage", - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, { "type": "Microsoft.Storage/storageAccounts", @@ -79,7 +86,7 @@ "name": "Standard_LRS" }, "kind": "Storage", - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, { "type": "Microsoft.Storage/storageAccounts", @@ -89,7 +96,7 @@ "name": "[parameters('storageSettings').accountType]" }, "kind": "Storage", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "storageLoop", "count": "[parameters('storageSettings').count]" @@ -99,7 +106,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "public-ip", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Static" } @@ -108,7 +115,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -141,7 +148,7 @@ "apiVersion": "2016-03-30", "name": "es-load-balancer", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', 'public-ip')]" ], @@ -203,4 +210,4 @@ } } ] -} \ No newline at end of file +} diff --git a/episerver-cms-in-azure/azuredeploy.json b/episerver-cms-in-azure/azuredeploy.json index dce0596cefe5..5458481daf1c 100644 --- a/episerver-cms-in-azure/azuredeploy.json +++ b/episerver-cms-in-azure/azuredeploy.json @@ -1,329 +1,334 @@ { - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "WebApplicationWebAppName":{ - "type":"string", - "minLength":1, - "defaultValue":"[concat('episervercmsapp', uniqueString(resourceGroup().id))]", - "metadata":{ - "description":"Name of the WebApp Running EPiServer" - } - }, - "WebApplication-HostingPlanNameName":{ - "type":"string", - "minLength":1, - "defaultValue":"[concat('hostingplan', uniqueString(resourceGroup().id))]", - "metadata":{ - "description":"Name of the App Service Hosting Plan" - } - }, - "WebApplication-HostingPlanNameSKU":{ - "type":"string", - "allowedValues":[ - "Free", - "Shared", - "Basic", - "Standard", - "Premium" - ], - "defaultValue":"Free", - "metadata":{ - "description":"Describes the pricing tier of the Hosting Plan" - } - }, - "WebApplication-HostingPlanNameWorkerSize":{ - "type":"string", - "allowedValues":[ - "0", - "1", - "2" - ], - "defaultValue":"0", - "metadata":{ - "description":"Describes the WorkerSize level of the Hosting Plan" - } - }, - "StorageAccountType":{ - "type":"string", - "defaultValue":"Standard_LRS", - "allowedValues":[ - "Standard_LRS", - "Standard_ZRS", - "Standard_GRS", - "Standard_RAGRS", - "Premium_LRS" - ], - "metadata":{ - "description":"Describes the Storage Account Type" - } - }, - "StorageAccountName":{ - "type":"string", - "defaultValue":"[concat('epistorage', uniqueString(resourceGroup().id))]", - "metadata":{ - "description":"Name of the Storage Account" - } - }, - "sqlserverName":{ - "type":"string", - "defaultValue":"[concat('sqlserver', uniqueString(resourceGroup().id))]", - "metadata":{ - "description":"Name of the Sql Server" - } - }, - "sqlserverAdminLogin":{ - "type":"string", - "minLength":1, - "metadata":{ - "description":"Name of the Sql Admin Account" - } - }, - "sqlserverAdminLoginPassword":{ - "type":"securestring", - "metadata":{ - "description":"Password of the Sql Admin Account" - } - }, - "SQL-DatabaseName":{ - "type":"string", - "minLength":1, - "defaultValue":"episerverdb", - "metadata":{ - "description":"Name of the Sql Database" - } - }, - "SQL-DatabaseCollation":{ - "type":"string", - "minLength":1, - "defaultValue":"SQL_Latin1_General_CP1_CI_AS", - "metadata":{ - "description":"Describes the performance level for SQL Databse Collation" - } - }, - "SQL-DatabaseEdition":{ - "type":"string", - "defaultValue":"Basic", - "allowedValues":[ - "Basic", - "Standard", - "Premium" - ], - "metadata":{ - "description":"Describes the performance level for SQL Database Edition" - } - }, - "SQL-DatabaseRequestedServiceObjectiveName":{ - "type":"string", - "defaultValue":"Basic", - "allowedValues":[ - "Basic", - "S0", - "S1", - "S2", - "P1", - "P2", - "P3" - ], - "metadata":{ - "description":"Describes the performance level for Edition" - } - }, - "serviceBusNamespaceName":{ - "type":"string", - "metadata":{ - "description":"Name of the Service Bus namespace" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "WebApplicationWebAppName": { + "type": "string", + "minLength": 1, + "defaultValue": "[concat('episervercmsapp', uniqueString(resourceGroup().id))]", + "metadata": { + "description": "Name of the WebApp Running EPiServer" + } + }, + "WebApplication-HostingPlanNameName": { + "type": "string", + "minLength": 1, + "defaultValue": "[concat('hostingplan', uniqueString(resourceGroup().id))]", + "metadata": { + "description": "Name of the App Service Hosting Plan" + } + }, + "WebApplication-HostingPlanNameSKU": { + "type": "string", + "allowedValues": [ + "Free", + "Shared", + "Basic", + "Standard", + "Premium" + ], + "defaultValue": "Free", + "metadata": { + "description": "Describes the pricing tier of the Hosting Plan" + } + }, + "WebApplication-HostingPlanNameWorkerSize": { + "type": "string", + "allowedValues": [ + "0", + "1", + "2" + ], + "defaultValue": "0", + "metadata": { + "description": "Describes the WorkerSize level of the Hosting Plan" + } + }, + "StorageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_ZRS", + "Standard_GRS", + "Standard_RAGRS", + "Premium_LRS" + ], + "metadata": { + "description": "Describes the Storage Account Type" + } + }, + "StorageAccountName": { + "type": "string", + "defaultValue": "[concat('epistorage', uniqueString(resourceGroup().id))]", + "metadata": { + "description": "Name of the Storage Account" + } + }, + "sqlserverName": { + "type": "string", + "defaultValue": "[concat('sqlserver', uniqueString(resourceGroup().id))]", + "metadata": { + "description": "Name of the Sql Server" + } + }, + "sqlserverAdminLogin": { + "type": "string", + "minLength": 1, + "metadata": { + "description": "Name of the Sql Admin Account" + } + }, + "sqlserverAdminLoginPassword": { + "type": "securestring", + "metadata": { + "description": "Password of the Sql Admin Account" + } + }, + "SQL-DatabaseName": { + "type": "string", + "minLength": 1, + "defaultValue": "episerverdb", + "metadata": { + "description": "Name of the Sql Database" + } + }, + "SQL-DatabaseCollation": { + "type": "string", + "minLength": 1, + "defaultValue": "SQL_Latin1_General_CP1_CI_AS", + "metadata": { + "description": "Describes the performance level for SQL Databse Collation" + } + }, + "SQL-DatabaseEdition": { + "type": "string", + "defaultValue": "Basic", + "allowedValues": [ + "Basic", + "Standard", + "Premium" + ], + "metadata": { + "description": "Describes the performance level for SQL Database Edition" + } + }, + "SQL-DatabaseRequestedServiceObjectiveName": { + "type": "string", + "defaultValue": "Basic", + "allowedValues": [ + "Basic", + "S0", + "S1", + "S2", + "P1", + "P2", + "P3" + ], + "metadata": { + "description": "Describes the performance level for Edition" + } + }, + "serviceBusNamespaceName": { + "type": "string", + "metadata": { + "description": "Name of the Service Bus namespace" + } + }, + "serviceBusSku": { + "type": "string", + "allowedValues": [ + "Basic", + "Standard" + ], + "defaultValue": "Standard", + "metadata": { + "description": "The messaging tier for service Bus namespace" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "location": "[parameters('location')]", + "defaultSASKeyName": "RootManageSharedAccessKey", + "defaultAuthRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('serviceBusNamespaceName'), variables('defaultSASKeyName'))]", + "storageAccountApiVersion": "2015-06-15", + "serviceBusApiVersion": "2015-08-01", + "storageId": "[resourceId('Microsoft.Storage/storageAccounts', parameters('StorageAccountName'))]", + "storageConnectionStringPrefix": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('StorageAccountName'),';AccountKey=')]" + }, + "resources": [ + { + "name": "[parameters('WebApplication-HostingPlanNameName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('location')]", + "apiVersion": "2014-06-01", + "tags": { + "displayName": "WebApplication-HostingPlanName" }, - "serviceBusSku":{ - "type":"string", - "allowedValues":[ - "Basic", - "Standard" - ], - "defaultValue":"Standard", - "metadata":{ - "description":"The messaging tier for service Bus namespace" - } + "properties": { + "name": "[parameters('WebApplication-HostingPlanNameName')]", + "sku": "[parameters('WebApplication-HostingPlanNameSKU')]", + "workerSize": "[parameters('WebApplication-HostingPlanNameWorkerSize')]", + "numberOfWorkers": 1 } - }, - "variables":{ - "location":"[resourceGroup().location]", - "defaultSASKeyName":"RootManageSharedAccessKey", - "defaultAuthRuleResourceId":"[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('serviceBusNamespaceName'), variables('defaultSASKeyName'))]", - "storageAccountApiVersion":"2015-06-15", - "serviceBusApiVersion":"2015-08-01", - "storageId":"[resourceId('Microsoft.Storage/storageAccounts', parameters('StorageAccountName'))]", - "storageConnectionStringPrefix":"[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('StorageAccountName'),';AccountKey=')]" - }, - "resources":[ - { - "name":"[parameters('WebApplication-HostingPlanNameName')]", - "type":"Microsoft.Web/serverfarms", - "location":"[resourceGroup().location]", - "apiVersion":"2014-06-01", - "tags":{ - "displayName":"WebApplication-HostingPlanName" - }, - "properties":{ - "name":"[parameters('WebApplication-HostingPlanNameName')]", - "sku":"[parameters('WebApplication-HostingPlanNameSKU')]", - "workerSize":"[parameters('WebApplication-HostingPlanNameWorkerSize')]", - "numberOfWorkers":1 - } + }, + { + "name": "[parameters('WebApplicationWebAppName')]", + "type": "Microsoft.Web/sites", + "location": "[parameters('location')]", + "apiVersion": "2015-08-01", + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', parameters('WebApplication-HostingPlanNameName'))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('StorageAccountName'))]", + "[concat('Microsoft.Sql/servers/', parameters('sqlserverName'))]", + "[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'))]" + ], + "tags": { + "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('WebApplication-HostingPlanNameName'))]": "Resource", + "displayName": "WebApplication-WebApp" + }, + "properties": { + "name": "[parameters('WebApplicationWebAppName')]", + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', parameters('WebApplication-HostingPlanNameName'))]", + "webSocketsEnabled": true, + "alwaysOn": false }, - { - "name":"[parameters('WebApplicationWebAppName')]", - "type":"Microsoft.Web/sites", - "location":"[resourceGroup().location]", - "apiVersion":"2015-08-01", - "dependsOn":[ - "[concat('Microsoft.Web/serverfarms/', parameters('WebApplication-HostingPlanNameName'))]", - "[concat('Microsoft.Storage/storageAccounts/', parameters('StorageAccountName'))]", - "[concat('Microsoft.Sql/servers/', parameters('sqlserverName'))]", - "[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'))]" - ], - "tags":{ - "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('WebApplication-HostingPlanNameName'))]":"Resource", - "displayName":"WebApplication-WebApp" - }, - "properties":{ - "name":"[parameters('WebApplicationWebAppName')]", - "serverFarmId":"[resourceId('Microsoft.Web/serverfarms/', parameters('WebApplication-HostingPlanNameName'))]", - "webSocketsEnabled":true, - "alwaysOn":false - }, - "resources":[ - { - "name":"connectionstrings", - "type":"config", - "apiVersion":"2015-08-01", - "dependsOn":[ - "[concat('Microsoft.Web/sites/', parameters('WebApplicationWebAppName'))]" - ], - "tags":{ - "displayName":"WebApplication-WebApp-ConnectionStrings" - }, - "properties":{ - "EPiServerAzureBlobs":{ - "value":"[concat(variables('storageConnectionStringPrefix'), listkeys(variables('storageId'), variables('storageAccountApiVersion')).key1)]", - "type":"Custom" - }, - "EPiServerAzureEvents":{ - "value":"[listkeys(variables('defaultAuthRuleResourceId'), variables('serviceBusApiVersion')).primaryConnectionString]", - "type":"Custom" - }, - "EPiServerDB":{ - "value":"[concat('Server=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('sqlserverName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('SQL-DatabaseName'), ';User Id=', parameters('sqlserverAdminLogin'), '@', parameters('sqlserverName'), ';Password=', parameters('sqlserverAdminLoginPassword'), ';Trusted_Connection=False;Encrypt=True;Connection Timeout=30;MultipleActiveResultSets=True')]", - "type":"SQLAzure" - } - } + "resources": [ + { + "name": "connectionstrings", + "type": "config", + "apiVersion": "2015-08-01", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('WebApplicationWebAppName'))]" + ], + "tags": { + "displayName": "WebApplication-WebApp-ConnectionStrings" + }, + "properties": { + "EPiServerAzureBlobs": { + "value": "[concat(variables('storageConnectionStringPrefix'), listkeys(variables('storageId'), variables('storageAccountApiVersion')).key1)]", + "type": "Custom" }, - { - "name":"appsettings", - "type":"config", - "apiVersion":"2015-08-01", - "dependsOn":[ - "[resourceId('Microsoft.Web/sites', parameters('WebApplicationWebAppName'))]" - ], - "tags":{ - "displayName":"WebApplication-WebApp-ApplicationSettings" - }, - "properties":{ - "episerver:ReadOnlyConfigurationAPI":"True" - } + "EPiServerAzureEvents": { + "value": "[listkeys(variables('defaultAuthRuleResourceId'), variables('serviceBusApiVersion')).primaryConnectionString]", + "type": "Custom" }, - { - "name":"web", - "type":"config", - "apiVersion":"2015-08-01", - "dependsOn":[ - "[resourceId('Microsoft.Web/sites', parameters('WebApplicationWebAppName'))]" - ], - "tags":{ - "displayName":"WebApplication-WebApp-GeneralSettings" - }, - "properties":{ - "webSocketsEnabled":"True", - "alwaysOn":"True" - } + "EPiServerDB": { + "value": "[concat('Server=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('sqlserverName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('SQL-DatabaseName'), ';User Id=', parameters('sqlserverAdminLogin'), '@', parameters('sqlserverName'), ';Password=', parameters('sqlserverAdminLoginPassword'), ';Trusted_Connection=False;Encrypt=True;Connection Timeout=30;MultipleActiveResultSets=True')]", + "type": "SQLAzure" } - ] + } + }, + { + "name": "appsettings", + "type": "config", + "apiVersion": "2015-08-01", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', parameters('WebApplicationWebAppName'))]" + ], + "tags": { + "displayName": "WebApplication-WebApp-ApplicationSettings" + }, + "properties": { + "episerver:ReadOnlyConfigurationAPI": "True" + } + }, + { + "name": "web", + "type": "config", + "apiVersion": "2015-08-01", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', parameters('WebApplicationWebAppName'))]" + ], + "tags": { + "displayName": "WebApplication-WebApp-GeneralSettings" + }, + "properties": { + "webSocketsEnabled": "True", + "alwaysOn": "True" + } + } + ] + }, + { + "name": "[parameters('StorageAccountName')]", + "type": "Microsoft.Storage/storageAccounts", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "tags": { + "displayName": "StorageAccount" }, - { - "name":"[parameters('StorageAccountName')]", - "type":"Microsoft.Storage/storageAccounts", - "location":"[resourceGroup().location]", - "apiVersion":"2015-06-15", - - "tags":{ - "displayName":"StorageAccount" - }, - - "properties":{ - "accountType":"[parameters('StorageAccountType')]" - } + "properties": { + "accountType": "[parameters('StorageAccountType')]" + } + }, + { + "apiVersion": "2014-04-01", + "location": "[parameters('location')]", + "name": "[parameters('sqlserverName')]", + "properties": { + "administratorLogin": "[parameters('sqlserverAdminLogin')]", + "administratorLoginPassword": "[parameters('sqlserverAdminLoginPassword')]", + "version": "12.0" }, - { - "apiVersion":"2014-04-01", - "location":"[resourceGroup().location]", - "name":"[parameters('sqlserverName')]", - "properties":{ - "administratorLogin":"[parameters('sqlserverAdminLogin')]", - "administratorLoginPassword":"[parameters('sqlserverAdminLoginPassword')]", - "version":"12.0" - }, - "resources":[ - { - "name":"AllowAllWindowsAzureIps", - "type":"firewallrules", - "location":"[resourceGroup().location]", - "apiVersion":"2014-04-01", - "dependsOn":[ - "[concat('Microsoft.Sql/servers/', parameters('sqlserverName'))]" - ], - "properties":{ - "startIpAddress":"0.0.0.0", - "endIpAddress":"0.0.0.0" - } - }, - { - "name":"[parameters('SQL-DatabaseName')]", - "type":"databases", - "location":"[resourceGroup().location]", - "apiVersion":"2014-04-01", - "dependsOn":[ - "[parameters('sqlserverName')]" - ], - "tags":{ - "displayName":"SQL-Database" - }, - "properties":{ - "collation":"[parameters('SQL-DatabaseCollation')]", - "edition":"[parameters('SQL-DatabaseEdition')]", - "maxSizeBytes":"1073741824", - "requestedServiceObjectiveName":"[parameters('SQL-DatabaseRequestedServiceObjectiveName')]" - } - } - ], - "tags":{ - "displayName":"SQL-Server" - }, - "type":"Microsoft.Sql/servers" + "resources": [ + { + "name": "AllowAllWindowsAzureIps", + "type": "firewallrules", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01", + "dependsOn": [ + "[concat('Microsoft.Sql/servers/', parameters('sqlserverName'))]" + ], + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "0.0.0.0" + } + }, + { + "name": "[parameters('SQL-DatabaseName')]", + "type": "databases", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01", + "dependsOn": [ + "[parameters('sqlserverName')]" + ], + "tags": { + "displayName": "SQL-Database" + }, + "properties": { + "collation": "[parameters('SQL-DatabaseCollation')]", + "edition": "[parameters('SQL-DatabaseEdition')]", + "maxSizeBytes": "1073741824", + "requestedServiceObjectiveName": "[parameters('SQL-DatabaseRequestedServiceObjectiveName')]" + } + } + ], + "tags": { + "displayName": "SQL-Server" + }, + "type": "Microsoft.Sql/servers" + }, + { + "apiVersion": "2015-08-01", + "name": "[parameters('serviceBusNamespaceName')]", + "type": "Microsoft.ServiceBus/namespaces", + "location": "[variables('location')]", + "kind": "Messaging", + "tags": { + "displayName": "ServiceBus" }, - { - "apiVersion":"2015-08-01", - "name":"[parameters('serviceBusNamespaceName')]", - "type":"Microsoft.ServiceBus/namespaces", - "location":"[variables('location')]", - "kind":"Messaging", - "tags":{ - "displayName":"ServiceBus" - }, - "sku":{ - "name":"[parameters('serviceBusSku')]", - "tier":"[parameters('serviceBusSku')]" - } + "sku": { + "name": "[parameters('serviceBusSku')]", + "tier": "[parameters('serviceBusSku')]" } - ] + } + ] } diff --git a/eris-platform/azuredeploy.json b/eris-platform/azuredeploy.json index 66346608fe9b..84b17d2acb82 100644 --- a/eris-platform/azuredeploy.json +++ b/eris-platform/azuredeploy.json @@ -50,6 +50,13 @@ "metadata": { "description": "Size of VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -67,7 +74,6 @@ "vmStorageAccountContainerName": "vhds", "vmName": "[parameters('dnsLabelPrefix')]", "virtualNetworkName": "WPVNET", - "apiVersion": "2015-06-15", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'eris')]" @@ -77,7 +83,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -86,7 +92,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -98,7 +104,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -119,7 +125,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -145,7 +151,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -188,7 +194,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/docker-for-eris')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -204,7 +210,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), '/extensions/docker-for-eris')]" ], @@ -222,4 +228,4 @@ } } ] -} \ No newline at end of file +} diff --git a/eset-vm-extension/azuredeploy.json b/eset-vm-extension/azuredeploy.json index b4c0a643e52c..02bad294d884 100644 --- a/eset-vm-extension/azuredeploy.json +++ b/eset-vm-extension/azuredeploy.json @@ -52,6 +52,13 @@ "metadata": { "description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: 2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter, Windows-Server-Technical-Preview." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -76,7 +83,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -85,7 +92,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -97,7 +104,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -118,7 +125,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -144,7 +151,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -187,7 +194,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/', 'fileSecurityExtension')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], diff --git a/ethereum-cpp-on-ubuntu/azuredeploy.json b/ethereum-cpp-on-ubuntu/azuredeploy.json index 730d049869d9..ae2507fb021e 100644 --- a/ethereum-cpp-on-ubuntu/azuredeploy.json +++ b/ethereum-cpp-on-ubuntu/azuredeploy.json @@ -43,6 +43,13 @@ "metadata": { "description": "Size of VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -60,7 +67,6 @@ "vmStorageAccountContainerName": "vhds", "vmName": "[parameters('vmDnsPrefix')]", "virtualNetworkName": "WPVNET", - "apiVersion": "2015-06-15", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", "storageAccountName": "[replace(replace(tolower(concat(parameters('storageAccountNamePrefix'), uniquestring(resourceGroup().id))), '-',''),'.','')]" @@ -70,7 +76,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -79,7 +85,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -91,7 +97,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -112,7 +118,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -138,7 +144,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -181,7 +187,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -199,4 +205,4 @@ } } ] -} \ No newline at end of file +} diff --git a/ethereum-studio-docker-standalone-ubuntu/azuredeploy.json b/ethereum-studio-docker-standalone-ubuntu/azuredeploy.json index 810263652a13..b321c6cbc248 100644 --- a/ethereum-studio-docker-standalone-ubuntu/azuredeploy.json +++ b/ethereum-studio-docker-standalone-ubuntu/azuredeploy.json @@ -43,6 +43,13 @@ "metadata": { "description": "Size of VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -73,7 +80,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -82,7 +89,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -94,7 +101,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nsgID')]" ], @@ -121,7 +128,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -147,7 +154,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -213,7 +220,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -256,7 +263,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('extensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/glassfish-on-suse/azuredeploy.json b/glassfish-on-suse/azuredeploy.json index b49f6dcf632d..53083722ea52 100644 --- a/glassfish-on-suse/azuredeploy.json +++ b/glassfish-on-suse/azuredeploy.json @@ -12,7 +12,10 @@ "glassfishVersion": { "type": "int", "minValue": 3, - "allowedValues": [ 3, 4 ], + "allowedValues": [ + 3, + 4 + ], "metadata": { "description": "Release number for the GlassFish package to be deployed" } @@ -55,7 +58,10 @@ }, "osImage": { "type": "string", - "allowedValues": [ "opensuse", "sles" ], + "allowedValues": [ + "opensuse", + "sles" + ], "defaultValue": "opensuse", "metadata": { "description": "Operating System to use for VM image(s)" @@ -78,10 +84,17 @@ "metadata": { "description": "SSH public key on all VMs" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "namePrefix": "gf-", "storageAccountName": "[concat(uniqueString(resourceGroup().id), 'sa')]", "availabilitySetName": "[concat(variables('namePrefix'), 'nodes')]", @@ -401,7 +414,7 @@ }, "caching": "ReadWrite", "createOption": "FromImage" - } + } }, "networkProfile": { "networkInterfaces": [ @@ -413,7 +426,7 @@ "diagnosticsProfile": { "bootDiagnostics": { "enabled": "true", - "storageUri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2015-06-15').primaryEndpoints.blob)]" + "storageUri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2015-06-15').primaryEndpoints.blob)]" } } } @@ -423,7 +436,7 @@ "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ - "virtualMachineLoop" + "virtualMachineLoop" ], "properties": { "mode": "Incremental", @@ -432,24 +445,24 @@ "contentVersion": "1.0.0.0" }, "parameters": { - "_artifactsLocation": { - "value": "[parameters('_artifactsLocation')]" - }, + "_artifactsLocation": { + "value": "[parameters('_artifactsLocation')]" + }, "vmPrefix": { - "value": "[concat(variables('namePrefix'), 'vm-')]" - }, + "value": "[concat(variables('namePrefix'), 'vm-')]" + }, "numberOfInstances": { - "value": "[parameters('numberOfInstances')]" - }, + "value": "[parameters('numberOfInstances')]" + }, "glassfishVersion": { - "value": "[parameters('glassfishVersion')]" - }, + "value": "[parameters('glassfishVersion')]" + }, "glassfishRelease": { - "value": "[parameters('glassfishRelease')]" - }, + "value": "[parameters('glassfishRelease')]" + }, "glassfishAdminPassword": { - "value": "[parameters('glassfishAdminPassword')]" - } + "value": "[parameters('glassfishAdminPassword')]" + } } } } diff --git a/glassfish-on-suse/nestedtemplates/azuredeploy.json b/glassfish-on-suse/nestedtemplates/azuredeploy.json index d8d6fc690a56..009ae6a92aea 100644 --- a/glassfish-on-suse/nestedtemplates/azuredeploy.json +++ b/glassfish-on-suse/nestedtemplates/azuredeploy.json @@ -23,10 +23,13 @@ "description": "Number of VMs" } }, - "glassfishVersion": { + "glassfishVersion": { "type": "int", "minValue": 3, - "allowedValues": [ 3, 4 ], + "allowedValues": [ + 3, + 4 + ], "metadata": { "description": "Release number for the GlassFish package to be deployed" } @@ -50,10 +53,17 @@ "metadata": { "description": "GlassFish admin user password" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "deploymentScriptFolder": "scripts/", "deploymentScriptFileName": "deployGlassFish.sh", "deploymentScriptUrl": "[concat(parameters('_artifactsLocation'), variables('deploymentScriptFolder'), variables('deploymentScriptFileName'))]" @@ -85,6 +95,5 @@ } } ], - "outputs": { - } + "outputs": {} } diff --git a/gluster-file-system/azuredeploy.json b/gluster-file-system/azuredeploy.json index 189f4711fb57..6c540dda25fd 100644 --- a/gluster-file-system/azuredeploy.json +++ b/gluster-file-system/azuredeploy.json @@ -111,6 +111,13 @@ "metadata": { "description": "Gluster file system volume name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -118,14 +125,6 @@ "nicName": "nic", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", "gfsSubnetRef": "[concat(variables('vnetID'),'/subnets/',parameters('gfsSubnetName'))]", - "osImageUbuntuPublisher": "Canonical", - "osImageUbuntuOffer": "UbuntuServer", - "osImageUbuntuSKU": "14.04.3-LTS", - "osImageUbuntuVersion": "latest", - "osImageCentosPublisher": "OpenLogic", - "osImageCentosOffer": "CentOS", - "osImageCentosSKU": "6.5", - "osImageCentosVersion": "latest", "osImagePublisher": "[variables(concat('osImage', parameters('hostOs'), 'Publisher'))]", "osImageOffer": "[variables(concat('osImage', parameters('hostOs'), 'Offer'))]", "osImageSKU": "[variables(concat('osImage', parameters('hostOs'), 'SKU'))]", @@ -136,7 +135,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[concat(parameters('storageAccountName'), copyIndex())]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "gfs", "count": "[parameters('scaleNumber')]" @@ -149,7 +148,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -170,7 +169,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('pipName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "foo", "count": "[parameters('scaleNumber')]" @@ -183,7 +182,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "gfs", "count": "[parameters('scaleNumber')]" @@ -214,7 +213,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('vmNamePrefix'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "gfs", "count": "[parameters('scaleNumber')]" @@ -281,7 +280,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmNamePrefix'), copyindex(), '/extension')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "gfs", "count": "[parameters('scaleNumber')]" diff --git a/go-ethereum-on-ubuntu/azuredeploy.json b/go-ethereum-on-ubuntu/azuredeploy.json index 31bb19be3940..78531e2eda9f 100644 --- a/go-ethereum-on-ubuntu/azuredeploy.json +++ b/go-ethereum-on-ubuntu/azuredeploy.json @@ -44,6 +44,13 @@ "metadata": { "description": "Size of VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -61,7 +68,6 @@ "vmStorageAccountContainerName": "vhds", "vmName": "[parameters('vmDnsPrefix')]", "virtualNetworkName": "WPVNET", - "apiVersion": "2015-06-15", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", "storageAccountName": "[replace(replace(tolower(concat(parameters('storageAccountNamePrefix'), uniquestring(resourceGroup().id))), '-',''),'.','')]" @@ -71,7 +77,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -80,7 +86,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -92,7 +98,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -113,7 +119,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -139,7 +145,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -182,7 +188,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -200,4 +206,4 @@ } } ] -} \ No newline at end of file +} diff --git a/go-expanse-on-ubuntu/azuredeploy.json b/go-expanse-on-ubuntu/azuredeploy.json index 4dbaaa5d7e63..eb05c24637ad 100644 --- a/go-expanse-on-ubuntu/azuredeploy.json +++ b/go-expanse-on-ubuntu/azuredeploy.json @@ -37,6 +37,13 @@ "metadata": { "description": "Size of VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -64,7 +71,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -73,7 +80,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -85,7 +92,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -106,7 +113,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -132,7 +139,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -175,7 +182,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -193,4 +200,4 @@ } } ] -} \ No newline at end of file +} diff --git a/guacamole-rdp-vnc-gateway-existing-vnet/azuredeploy.json b/guacamole-rdp-vnc-gateway-existing-vnet/azuredeploy.json index c7231134532f..6df0bd17e9ab 100644 --- a/guacamole-rdp-vnc-gateway-existing-vnet/azuredeploy.json +++ b/guacamole-rdp-vnc-gateway-existing-vnet/azuredeploy.json @@ -218,4 +218,4 @@ } } ] -} \ No newline at end of file +} diff --git a/guacamole-rdp-vnc-gateway-existing-vnet/prereqs/prereq.azuredeploy.json b/guacamole-rdp-vnc-gateway-existing-vnet/prereqs/prereq.azuredeploy.json index db00964105d3..ba2e4473c113 100644 --- a/guacamole-rdp-vnc-gateway-existing-vnet/prereqs/prereq.azuredeploy.json +++ b/guacamole-rdp-vnc-gateway-existing-vnet/prereqs/prereq.azuredeploy.json @@ -1,52 +1,64 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "existingVirtualNetworkName": "existing-vnet", - "existingSubnetName": "existing-subnet", - "location": "West US" - }, - "resources": [{ - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('existingVirtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "[variables('location')]", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network" - }, - "dependsOn": [], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "[variables('existingSubnetName')]", - "properties": { - "addressPrefix": "10.0.1.0/24" - } - }] - } - }], - "outputs": { - "existingVirtualNetworkName": { - "type": "string", - "value": "[variables('existingVirtualNetworkName')]" - }, - "existingResourceGroup": { - "type": "string", - "value": "[resourceGroup().name]" - }, - "existingSubnetName": { - "type": "string", - "value": "[variables('existingSubnetName')]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "existingVirtualNetworkName": "existing-vnet", + "existingSubnetName": "existing-subnet", + "location": "[parameters('location')]" + }, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('existingVirtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "[variables('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network" + }, + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - "existingVNETLocation": { - "type": "string", - "value": "[variables('location')]" - } + "subnets": [ + { + "name": "[variables('existingSubnetName')]", + "properties": { + "addressPrefix": "10.0.1.0/24" + } + } + ] + } + } + ], + "outputs": { + "existingVirtualNetworkName": { + "type": "string", + "value": "[variables('existingVirtualNetworkName')]" + }, + "existingResourceGroup": { + "type": "string", + "value": "[resourceGroup().name]" + }, + "existingSubnetName": { + "type": "string", + "value": "[variables('existingSubnetName')]" + }, + "existingVNETLocation": { + "type": "string", + "value": "[variables('location')]" } -} \ No newline at end of file + } +} diff --git a/hazelcast-vm-cluster/azuredeploy.json b/hazelcast-vm-cluster/azuredeploy.json index 3678c7e2d0a4..8634f9957d13 100644 --- a/hazelcast-vm-cluster/azuredeploy.json +++ b/hazelcast-vm-cluster/azuredeploy.json @@ -130,6 +130,13 @@ "metadata": { "description": "The base URL for the bootstrap files" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -187,7 +194,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -196,7 +203,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -208,7 +215,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -229,7 +236,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), '0')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -255,7 +262,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex(1))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" ], @@ -281,7 +288,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), '0')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), '0')]" @@ -323,7 +330,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyIndex(1))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyIndex(1))]", @@ -370,7 +377,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), 0, '/initHazelcast')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), '0')]" ], @@ -389,7 +396,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyIndex(1),'/initHazelcast')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "createVms" ], @@ -409,4 +416,4 @@ } } ] -} \ No newline at end of file +} diff --git a/hdInsight-apache-spark/azuredeploy.json b/hdInsight-apache-spark/azuredeploy.json index 3ce3661192c7..b5c34343675f 100644 --- a/hdInsight-apache-spark/azuredeploy.json +++ b/hdInsight-apache-spark/azuredeploy.json @@ -38,25 +38,30 @@ "metadata": { "description": "The number of worker nodes in the HDInsight cluster." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "defaultApiVersion": "2015-06-15", - "clusterApiVersion": "2015-03-01-preview", "clusterType": "hadoop", "clusterVnetSubnetName": "[concat(parameters('clusterName'),'-subnet')]", "clusterVnetAddressSpace": "172.16.228.0/23", "clusterVNetSubnetAddressRange": "172.16.229.0/24", "clusterStorageAccountName": "[concat(parameters('clusterName'),'storeacc')]", - "clusterVNetName": "[concat(parameters('clusterName'),'-vnet')]", - "hadoopZookeeperSize": "Small", - "hbaseZookeeperSize": "Medium" + "clusterVNetName": "[concat(parameters('clusterName'),'-vnet')]" + }, "resources": [ { "name": "[variables('clusterVNetName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, @@ -79,7 +84,7 @@ { "name": "[variables('clusterStorageAccountName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, @@ -90,7 +95,7 @@ { "name": "[parameters('clusterName')]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('clusterStorageAccountName'))]", @@ -200,4 +205,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } } -} \ No newline at end of file +} diff --git a/hdinsight-genomics-adam/azuredeploy.json b/hdinsight-genomics-adam/azuredeploy.json index f913738f6cf0..963dcbd67e0e 100644 --- a/hdinsight-genomics-adam/azuredeploy.json +++ b/hdinsight-genomics-adam/azuredeploy.json @@ -38,25 +38,29 @@ "metadata": { "description": "The number of worker nodes in the HDInsight cluster." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "defaultApiVersion": "2015-06-15", - "clusterApiVersion": "2015-03-01-preview", "clusterType": "hadoop", "clusterVnetSubnetName": "[concat(parameters('clusterName'),'-subnet')]", "clusterVnetAddressSpace": "172.16.228.0/23", "clusterVNetSubnetAddressRange": "172.16.229.0/24", "clusterStorageAccountName": "[concat(parameters('clusterName'),'storeacc')]", - "clusterVNetName": "[concat(parameters('clusterName'),'-vnet')]", - "hadoopZookeeperSize": "Small", - "hbaseZookeeperSize": "Medium" + "clusterVNetName": "[concat(parameters('clusterName'),'-vnet')]" }, "resources": [ { "name": "[variables('clusterVNetName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, @@ -79,7 +83,7 @@ { "name": "[variables('clusterStorageAccountName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, @@ -90,7 +94,7 @@ { "name": "[parameters('clusterName')]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('clusterStorageAccountName'))]", @@ -200,4 +204,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } } -} \ No newline at end of file +} diff --git a/hdinsight-linux-run-script-action/azuredeploy.json b/hdinsight-linux-run-script-action/azuredeploy.json index 3ba65cc3f27c..af85a719970a 100644 --- a/hdinsight-linux-run-script-action/azuredeploy.json +++ b/hdinsight-linux-run-script-action/azuredeploy.json @@ -83,20 +83,25 @@ "metadata": { "description": "A public http(s) uri that points to a script action which will set an environment variable on each node." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "defaultApiVersion": "2015-05-01-preview", - "clusterApiVersion": "2015-03-01-preview", - "clusterVNetName": "[concat(parameters('clusterName'),'-vnet')]", - "hadoopZookeeperSize": "Small", - "hbaseZookeeperSize": "Medium" + + "clusterVNetName": "[concat(parameters('clusterName'),'-vnet')]" }, "resources": [ { "name": "[variables('clusterVNetName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [], "tags": {}, @@ -119,7 +124,7 @@ { "name": "[parameters('clusterStorageAccountName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [], "tags": {}, @@ -130,7 +135,7 @@ { "name": "[parameters('clusterName')]", "type": "Microsoft.HDInsight/clusters", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-03-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',parameters('clusterStorageAccountName'))]", @@ -249,4 +254,4 @@ "value": "[reference(resourceId('Microsoft.HDInsight/clusters',parameters('clusterName')))]" } } -} \ No newline at end of file +} diff --git a/iis-2vm-sql-1vm/azuredeploy.json b/iis-2vm-sql-1vm/azuredeploy.json index bd7e62471c34..fc1206112ea7 100644 --- a/iis-2vm-sql-1vm/azuredeploy.json +++ b/iis-2vm-sql-1vm/azuredeploy.json @@ -94,6 +94,13 @@ "description": "The type of the Storage Account created" }, "defaultValue": "Premium_LRS" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -109,7 +116,6 @@ "sqlSrvDBName": "[concat(parameters('envPrefixName'), 'sqlSrv14')]", "sqlVmSize": "[parameters('sqlVMSize')]", "sqlSrvDBOsDiskName": "[concat(parameters('envPrefixName'), 'DBSrvOS')]", - "sqlSrvDBDataDiskName": "[concat(parameters('envPrefixName'), 'DBSrvData')]", "vnetId": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", "sqlSrvDBNicName": "[concat(variables('sqlSrvDBName'), 'Nic')]", "sqlSvrDBSubnetRef": "[concat(variables('vnetId'), '/subnets/', 'DBSubnetName')]", @@ -128,7 +134,6 @@ "webSrvNumbOfInstances": "[parameters('numberOfWebSrvs')]", "webSrvDnsNameforLBIP": "[concat(toLower(variables('webSrvName')), 'lb')]", "webLbName": "[concat(variables('webSrvName'), 'lb')]", - "webLblbID": "[resourceId('Microsoft.Network/loadBalancers',variables('webLbName'))]", "webLblb_PIP_Id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('webSrvPublicIP'))]", "webLbId": "[resourceId('Microsoft.Network/loadBalancers',variables('webLbName'))]", "frontEndIPConfigID": "[concat(variables('webLbId'),'/frontendIPConfigurations/LoadBalancerFrontEnd')]", @@ -143,7 +148,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('feNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "FrontEndNSG" }, @@ -184,7 +189,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "apiVersion": "2015-06-15", "name": "[variables('dbNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "BackEndNSG" }, @@ -253,7 +258,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('feNSGName'))]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('dbNSGName'))]" @@ -292,7 +297,7 @@ { "name": "[variables('storageName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -305,7 +310,7 @@ { "name": "[variables('sqlPublicIP')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "tags": { "displayName": "SqlPIP" @@ -318,7 +323,7 @@ { "name": "[variables('sqlSrvDBNicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -346,7 +351,7 @@ { "name": "[concat(parameters('envPrefixName'), 'sqlSrv14')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageName'))]", @@ -394,7 +399,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('webSrvAvailabilitySetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "WebSrvAvailabilitySet" }, @@ -403,7 +408,7 @@ { "name": "[variables('webSrvPublicIP')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "tags": { "displayName": "WebSrvPIP for LB" @@ -420,7 +425,7 @@ "apiVersion": "2015-06-15", "name": "[variables('webLbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "Web LB" }, @@ -506,7 +511,7 @@ { "name": "[concat(variables('webSrvNicName'), copyindex())]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "copy": { "name": "nicLoop", @@ -546,7 +551,7 @@ { "name": "[concat(variables('webSrvName'), copyindex())]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "copy": { "name": "webSrvMachineLoop", @@ -601,7 +606,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('webSrvName'), copyindex(),'/', variables('vmExtensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "webSrvMachineLoop", "count": "[variables('webSrvNumbOfInstances')]" @@ -628,4 +633,4 @@ } } ] -} \ No newline at end of file +} diff --git a/iomad-cluster-ubuntu/azuredeploy.json b/iomad-cluster-ubuntu/azuredeploy.json index 6faa901f35c7..1c951e229231 100644 --- a/iomad-cluster-ubuntu/azuredeploy.json +++ b/iomad-cluster-ubuntu/azuredeploy.json @@ -127,6 +127,13 @@ "metadata": { "description": "The size of the database backend VM." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -175,7 +182,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -184,14 +191,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -203,7 +210,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -230,7 +237,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]", "[concat('Microsoft.Network/loadBalancers/',variables('lbName'))]" @@ -270,7 +277,7 @@ "apiVersion": "2015-06-15", "name": "[variables('lbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'))]" ], @@ -451,7 +458,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/',concat(variables('nicName'),copyIndex()))]", @@ -503,7 +510,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),copyIndex(),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'),copyIndex()))]" ], @@ -530,14 +537,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[concat(variables('availabilitySetName'),'db')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicDBIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -549,7 +556,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'),'db')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('publicDBIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]" @@ -575,7 +582,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'),'db')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/',variables('nicName'),'db')]", @@ -622,7 +629,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'db','/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'),'db'))]" ], @@ -642,4 +649,4 @@ } } ] -} \ No newline at end of file +} diff --git a/iomad-singlevm-ubuntu/azuredeploy.json b/iomad-singlevm-ubuntu/azuredeploy.json index 35192d06fa2a..4008acb3d598 100644 --- a/iomad-singlevm-ubuntu/azuredeploy.json +++ b/iomad-singlevm-ubuntu/azuredeploy.json @@ -54,6 +54,13 @@ "metadata": { "description": "The size of the VM." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -84,7 +91,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -93,7 +100,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -105,7 +112,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -126,7 +133,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -152,7 +159,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -195,7 +202,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -215,4 +222,4 @@ } } ] -} \ No newline at end of file +} diff --git a/jboss-eap-standalone-rhel7/azuredeploy.json b/jboss-eap-standalone-rhel7/azuredeploy.json index b80118a079e0..42a27450a614 100755 --- a/jboss-eap-standalone-rhel7/azuredeploy.json +++ b/jboss-eap-standalone-rhel7/azuredeploy.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": { + "parameters": { "adminUsername": { "type": "string", "metadata": { @@ -32,7 +32,6 @@ "description": "Password for EAP manager" } }, - "rhsmUserName": { "type": "string", "metadata": { @@ -54,22 +53,29 @@ "_artifactsLocation": { "type": "string", "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." + "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." }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/jboss-eap-standalone-rhel7/" }, "_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." - }, + "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": { "imagePublisher": "redhat", "imageOffer": "rhel", - "imageSKU":"7.2", + "imageSKU": "7.2", "baseName": "[uniquestring(parameters('dnsLabelPrefix'),resourceGroup().id)]", "nicName": "[concat('myNic8',variables('baseName'))]", "addressPrefix": "10.0.0.0/16", @@ -94,19 +100,18 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('StorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, "kind": "Storage", - "properties": { - } + "properties": {} }, { "apiVersion": "2017-10-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -118,7 +123,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "Custom Network Security Group" }, @@ -152,7 +157,7 @@ "direction": "Inbound" } }, - { + { "name": "default-allow-eap", "properties": { "description": "Allow WEB/EAP", @@ -173,7 +178,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('frontEndNSGName'))]" ], @@ -190,7 +195,7 @@ "addressPrefix": "[variables('subnet1Prefix')]", "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('frontEndNSGName'))]" - } + } } } ] @@ -200,16 +205,16 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('frontEndNSGName'))]" ], "properties": { - "networkSecurityGroup": { + "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('frontEndNSGName'))]" - }, + }, "ipConfigurations": [ { "name": "ipconfig1", @@ -230,7 +235,7 @@ "apiVersion": "2017-12-01", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('StorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -256,7 +261,7 @@ "name": "osdisk1", "vhd": { "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/',variables('StorageAccountName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]" - }, + }, "caching": "ReadWrite", "createOption": "FromImage" } @@ -274,8 +279,10 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2017-12-01", - "location": "[resourceGroup().location]", - "dependsOn": ["[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"], + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" + ], "properties": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", diff --git a/jenkins-cicd-container/azuredeploy.json b/jenkins-cicd-container/azuredeploy.json index b49b04b74464..cf091ebdcf68 100644 --- a/jenkins-cicd-container/azuredeploy.json +++ b/jenkins-cicd-container/azuredeploy.json @@ -1,408 +1,415 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "spClientId": { - "type": "string", - "metadata": { - "description": "Service Principal Client ID used by Jenkins and Azure Container Service (AKS)." - } - }, - "spClientSecret": { - "type": "securestring", - "metadata": { - "description": "Service Principal Client Secret used by Jenkins and Azure Container Service(AKS)." - } - }, - "linuxAdminUsername": { - "type": "string", - "metadata": { - "description": "User name for the Linux Virtual Machines (Jenkins and Kubernetes)." - } - }, - "linuxAdminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Jenkins and Grafana Virtual Machines." - } - }, - "linuxSSHPublicKey": { - "type": "string", - "metadata": { - "description": "Configure all linux machines with the SSH RSA public key string. Your key should include three parts, for example 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'" - } - }, - "cosmosDbName": { - "type": "string", - "metadata": { - "description": "Name of the CosmosDB." - } - }, - "acrName": { - "type": "string", - "metadata": { - "description": "Name of the Azure Container Registery. The name may contain alpha numeric characters only and must be between 5 and 50 characters." - } - }, - "jenkinsDnsPrefix": { - "type": "string", - "metadata": { - "description": "Unique DNS Name for the Public IP used to access the Jenkins Virtual Machine." - } - }, - "grafanaDnsPrefix": { - "type": "string", - "metadata": { - "description": "Unique DNS Name for the Public IP used to access the Grafana Virtual Machine." - } - }, - "kubernetesDnsPrefix": { - "type": "string", - "metadata": { - "description": "Optional DNS prefix to use with hosted Kubernetes API server FQDN." - } - }, - "kubernetesClusterName": { - "type": "string", - "metadata": { - "description": "The name of the Managed Cluster resource." - } - }, - "kubernetesAgentCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The number of nodes for the cluster." - }, - "minValue": 1, - "maxValue": 50 - }, - "kubernetesAgentVMSize": { - "type": "string", - "defaultValue": "Standard_D2_v2", - "allowedValues": [ - "Standard_A10", - "Standard_A11", - "Standard_A2", - "Standard_A2_v2", - "Standard_A2m_v2", - "Standard_A3", - "Standard_A4", - "Standard_A4_v2", - "Standard_A4m_v2", - "Standard_A5", - "Standard_A6", - "Standard_A7", - "Standard_A8", - "Standard_A8_v2", - "Standard_A8m_v2", - "Standard_A9", - "Standard_D1_v2", - "Standard_D11", - "Standard_D11_v2", - "Standard_D12", - "Standard_D12_v2", - "Standard_D13", - "Standard_D13_v2", - "Standard_D14", - "Standard_D14_v2", - "Standard_D15_v2", - "Standard_D2", - "Standard_D2_v2", - "Standard_D3", - "Standard_D3_v2", - "Standard_D4", - "Standard_D4_v2", - "Standard_D5_v2", - "Standard_DS11", - "Standard_DS11_v2", - "Standard_DS12", - "Standard_DS12_v2", - "Standard_DS13", - "Standard_DS13_v2", - "Standard_DS14", - "Standard_DS14_v2", - "Standard_DS15_v2", - "Standard_DS2", - "Standard_DS2_v2", - "Standard_DS3", - "Standard_DS3_v2", - "Standard_DS4", - "Standard_DS4_v2", - "Standard_DS5_v2", - "Standard_F16", - "Standard_F16s", - "Standard_F2", - "Standard_F2s", - "Standard_F4", - "Standard_F4s", - "Standard_F8", - "Standard_F8s", - "Standard_G1", - "Standard_G2" - ], - "metadata": { - "description": "The size of the Virtual Machine." - } - }, - "kubernetesVersion": { - "type": "string", - "defaultValue": "1.7.7", - "allowedValues": [ - "1.7.7", - "1.8.1" - ], - "metadata": { - "description": "The version of Kubernetes." - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "spClientId": { + "type": "string", + "metadata": { + "description": "Service Principal Client ID used by Jenkins and Azure Container Service (AKS)." + } + }, + "spClientSecret": { + "type": "securestring", + "metadata": { + "description": "Service Principal Client Secret used by Jenkins and Azure Container Service(AKS)." + } + }, + "linuxAdminUsername": { + "type": "string", + "metadata": { + "description": "User name for the Linux Virtual Machines (Jenkins and Kubernetes)." + } + }, + "linuxAdminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the Jenkins and Grafana Virtual Machines." + } + }, + "linuxSSHPublicKey": { + "type": "string", + "metadata": { + "description": "Configure all linux machines with the SSH RSA public key string. Your key should include three parts, for example 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'" + } + }, + "cosmosDbName": { + "type": "string", + "metadata": { + "description": "Name of the CosmosDB." + } + }, + "acrName": { + "type": "string", + "metadata": { + "description": "Name of the Azure Container Registery. The name may contain alpha numeric characters only and must be between 5 and 50 characters." + } + }, + "jenkinsDnsPrefix": { + "type": "string", + "metadata": { + "description": "Unique DNS Name for the Public IP used to access the Jenkins Virtual Machine." + } + }, + "grafanaDnsPrefix": { + "type": "string", + "metadata": { + "description": "Unique DNS Name for the Public IP used to access the Grafana Virtual Machine." + } + }, + "kubernetesDnsPrefix": { + "type": "string", + "metadata": { + "description": "Optional DNS prefix to use with hosted Kubernetes API server FQDN." + } + }, + "kubernetesClusterName": { + "type": "string", + "metadata": { + "description": "The name of the Managed Cluster resource." + } + }, + "kubernetesAgentCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The number of nodes for the cluster." }, - "gitRepository": { - "type": "string", - "metadata": { - "description": "URL to a public git repository that includes a Dockerfile." - }, - "defaultValue": "https://github.com/Azure/azure-quickstart-templates" + "minValue": 1, + "maxValue": 50 + }, + "kubernetesAgentVMSize": { + "type": "string", + "defaultValue": "Standard_D2_v2", + "allowedValues": [ + "Standard_A10", + "Standard_A11", + "Standard_A2", + "Standard_A2_v2", + "Standard_A2m_v2", + "Standard_A3", + "Standard_A4", + "Standard_A4_v2", + "Standard_A4m_v2", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_A8", + "Standard_A8_v2", + "Standard_A8m_v2", + "Standard_A9", + "Standard_D1_v2", + "Standard_D11", + "Standard_D11_v2", + "Standard_D12", + "Standard_D12_v2", + "Standard_D13", + "Standard_D13_v2", + "Standard_D14", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_D2", + "Standard_D2_v2", + "Standard_D3", + "Standard_D3_v2", + "Standard_D4", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_DS11", + "Standard_DS11_v2", + "Standard_DS12", + "Standard_DS12_v2", + "Standard_DS13", + "Standard_DS13_v2", + "Standard_DS14", + "Standard_DS14_v2", + "Standard_DS15_v2", + "Standard_DS2", + "Standard_DS2_v2", + "Standard_DS3", + "Standard_DS3_v2", + "Standard_DS4", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F16", + "Standard_F16s", + "Standard_F2", + "Standard_F2s", + "Standard_F4", + "Standard_F4s", + "Standard_F8", + "Standard_F8s", + "Standard_G1", + "Standard_G2" + ], + "metadata": { + "description": "The size of the Virtual Machine." + } + }, + "kubernetesVersion": { + "type": "string", + "defaultValue": "1.7.7", + "allowedValues": [ + "1.7.7", + "1.8.1" + ], + "metadata": { + "description": "The version of Kubernetes." + } + }, + "gitRepository": { + "type": "string", + "metadata": { + "description": "URL to a public git repository that includes a Dockerfile." }, - "_artifactsLocation": { - "type": "string", - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/jenkins-cicd-container/", - "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." - } + "defaultValue": "https://github.com/Azure/azure-quickstart-templates" + }, + "_artifactsLocation": { + "type": "string", + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/jenkins-cicd-container/", + "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": "string", + "defaultValue": "", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "jenkinsVMName": "jenkins", + "grafanaVMName": "grafana", + "cosmosDbName": "[parameters('cosmosDbName')]", + "acrName": "[parameters('acrName')]", + "virtualNetworkName": "virtual-network", + "subnetName": "default-subnet" + }, + "resources": [ + { + "name": "[variables('acrName')]", + "type": "Microsoft.ContainerRegistry/registries", + "location": "[parameters('location')]", + "apiVersion": "2017-10-01", + "sku": { + "name": "Basic" }, - "_artifactsLocationSasToken": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." - } + "properties": { + "adminUserEnabled": true } }, - "variables": { - "jenkinsVMName": "jenkins", - "grafanaVMName": "grafana", - "cosmosDbName": "[parameters('cosmosDbName')]", - "acrName": "[parameters('acrName')]", - "virtualNetworkName": "virtual-network", - "subnetName": "default-subnet" + { + "apiVersion": "2015-04-08", + "kind": "MongoDB", + "type": "Microsoft.DocumentDb/databaseAccounts", + "name": "[variables('cosmosDbName')]", + "location": "[parameters('location')]", + "properties": { + "databaseAccountOfferType": "Standard" + } }, - "resources": [ - { - "name": "[variables('acrName')]", - "type": "Microsoft.ContainerRegistry/registries", - "location": "[resourceGroup().location]", - "apiVersion": "2017-10-01", - "sku": { - "name": "Basic" + { + "apiVersion": "2016-09-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - "properties": { - "adminUserEnabled": true - } - }, - { - "apiVersion": "2015-04-08", - "kind": "MongoDB", - "type": "Microsoft.DocumentDb/databaseAccounts", - "name": "[variables('cosmosDbName')]", - "location": "[resourceGroup().location]", - "properties": { - "databaseAccountOfferType": "Standard" - } - }, - { - "apiVersion": "2016-09-01", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "10.0.0.0/24" - } + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "10.0.0.0/24" } - ] - } - }, - { - "apiVersion": "2017-05-10", - "name": "jenkinsDeployment", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[resourceId('Microsoft.ContainerRegistry/registries', variables('acrName'))]", - "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", - "[resourceId('Microsoft.DocumentDb/databaseAccounts', variables('cosmosDbName'))]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), 'nested/jenkins.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" + } + ] + } + }, + { + "apiVersion": "2017-05-10", + "name": "jenkinsDeployment", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[resourceId('Microsoft.ContainerRegistry/registries', variables('acrName'))]", + "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", + "[resourceId('Microsoft.DocumentDb/databaseAccounts', variables('cosmosDbName'))]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), 'nested/jenkins.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "jenkinsVMName": { + "value": "[variables('jenkinsVMName')]" }, - "parameters": { - "jenkinsVMName": { - "value": "[variables('jenkinsVMName')]" - }, - "spClientId": { - "value": "[parameters('spClientId')]" - }, - "spClientSecret": { - "value": "[parameters('spClientSecret')]" - }, - "linuxAdminUsername": { - "value": "[parameters('linuxAdminUsername')]" - }, - "linuxAdminPassword": { - "value": "[parameters('linuxAdminPassword')]" - }, - "dnsPrefix": { - "value": "[parameters('jenkinsDnsPrefix')]" - }, - "subnetId": { - "value": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]" - }, - "gitRepository": { - "value": "[parameters('gitRepository')]" - }, - "acrServer": { - "value": "[reference(resourceId('Microsoft.ContainerRegistry/registries', variables('acrName'))).loginServer]" - }, - "acrUsername": { - "value": "[listCredentials(resourceId('Microsoft.ContainerRegistry/registries', variables('acrName')), '2017-10-01').username]" - }, - "acrPassword": { - "value": "[listCredentials(resourceId('Microsoft.ContainerRegistry/registries', variables('acrName')), '2017-10-01').passwords[0].value]" - }, - "mongoDbURI": { - "value": "[concat('mongodb://', variables('cosmosDbName'), ':', uriComponent(listKeys(resourceId('Microsoft.DocumentDb/databaseAccounts', variables('cosmosDbName')), '2015-04-08').primaryMasterKey), '@', variables('cosmosDbName'), '.documents.azure.com:10255/?ssl=true&replicaSet=globaldb')]" - }, - "kubernetesResourceGroupName": { - "value": "[resourceGroup().name]" - }, - "kubernetesClusterName": { - "value": "[parameters('kubernetesClusterName')]" - }, - "_artifactsLocation": { - "value": "[parameters('_artifactsLocation')]" - }, - "_artifactsLocationSasToken": { - "value": "[parameters('_artifactsLocationSasToken')]" - } + "spClientId": { + "value": "[parameters('spClientId')]" + }, + "spClientSecret": { + "value": "[parameters('spClientSecret')]" + }, + "linuxAdminUsername": { + "value": "[parameters('linuxAdminUsername')]" + }, + "linuxAdminPassword": { + "value": "[parameters('linuxAdminPassword')]" + }, + "dnsPrefix": { + "value": "[parameters('jenkinsDnsPrefix')]" + }, + "subnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]" + }, + "gitRepository": { + "value": "[parameters('gitRepository')]" + }, + "acrServer": { + "value": "[reference(resourceId('Microsoft.ContainerRegistry/registries', variables('acrName'))).loginServer]" + }, + "acrUsername": { + "value": "[listCredentials(resourceId('Microsoft.ContainerRegistry/registries', variables('acrName')), '2017-10-01').username]" + }, + "acrPassword": { + "value": "[listCredentials(resourceId('Microsoft.ContainerRegistry/registries', variables('acrName')), '2017-10-01').passwords[0].value]" + }, + "mongoDbURI": { + "value": "[concat('mongodb://', variables('cosmosDbName'), ':', uriComponent(listKeys(resourceId('Microsoft.DocumentDb/databaseAccounts', variables('cosmosDbName')), '2015-04-08').primaryMasterKey), '@', variables('cosmosDbName'), '.documents.azure.com:10255/?ssl=true&replicaSet=globaldb')]" + }, + "kubernetesResourceGroupName": { + "value": "[resourceGroup().name]" + }, + "kubernetesClusterName": { + "value": "[parameters('kubernetesClusterName')]" + }, + "_artifactsLocation": { + "value": "[parameters('_artifactsLocation')]" + }, + "_artifactsLocationSasToken": { + "value": "[parameters('_artifactsLocationSasToken')]" } } - }, - { - "apiVersion": "2017-08-31", - "type": "Microsoft.ContainerService/managedClusters", - "location": "eastus", - "name": "[parameters('kubernetesClusterName')]", - "properties": { - "kubernetesVersion": "[parameters('kubernetesVersion')]", - "dnsPrefix": "[parameters('kubernetesDnsPrefix')]", - "agentPoolProfiles": [ - { - "name": "agentpool", - "osDiskSizeGB": 0, - "count": "[parameters('kubernetesAgentCount')]", - "vmSize": "[parameters('kubernetesAgentVMSize')]", - "osType": "Linux", - "storageProfile": "ManagedDisks" - } - ], - "linuxProfile": { - "adminUsername": "[parameters('linuxAdminUsername')]", - "ssh": { - "publicKeys": [ - { - "keyData": "[parameters('linuxSSHPublicKey')]" - } - ] + } + }, + { + "apiVersion": "2017-08-31", + "type": "Microsoft.ContainerService/managedClusters", + "location": "eastus", + "name": "[parameters('kubernetesClusterName')]", + "properties": { + "kubernetesVersion": "[parameters('kubernetesVersion')]", + "dnsPrefix": "[parameters('kubernetesDnsPrefix')]", + "agentPoolProfiles": [ + { + "name": "agentpool", + "osDiskSizeGB": 0, + "count": "[parameters('kubernetesAgentCount')]", + "vmSize": "[parameters('kubernetesAgentVMSize')]", + "osType": "Linux", + "storageProfile": "ManagedDisks" + } + ], + "linuxProfile": { + "adminUsername": "[parameters('linuxAdminUsername')]", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('linuxSSHPublicKey')]" } - }, - "servicePrincipalProfile": { - "ClientId": "[parameters('spClientId')]", - "Secret": "[parameters('spClientSecret')]" + ] } + }, + "servicePrincipalProfile": { + "ClientId": "[parameters('spClientId')]", + "Secret": "[parameters('spClientSecret')]" } - }, - { - "apiVersion": "2017-05-10", - "name": "grafanaDeployment", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[resourceId('Microsoft.DocumentDb/databaseAccounts', variables('cosmosDbName'))]", - "[resourceId('Microsoft.ContainerService/managedClusters', parameters('kubernetesClusterName'))]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), 'nested/grafana.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" + } + }, + { + "apiVersion": "2017-05-10", + "name": "grafanaDeployment", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[resourceId('Microsoft.DocumentDb/databaseAccounts', variables('cosmosDbName'))]", + "[resourceId('Microsoft.ContainerService/managedClusters', parameters('kubernetesClusterName'))]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), 'nested/grafana.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "grafanaVMName": { + "value": "[variables('grafanaVMName')]" }, - "parameters": { - "grafanaVMName": { - "value": "[variables('grafanaVMName')]" - }, - "spClientId": { - "value": "[parameters('spClientId')]" - }, - "spClientSecret": { - "value": "[parameters('spClientSecret')]" - }, - "linuxAdminUsername": { - "value": "[parameters('linuxAdminUsername')]" - }, - "linuxAdminPassword": { - "value": "[parameters('linuxAdminPassword')]" - }, - "dnsPrefix": { - "value": "[parameters('grafanaDnsPrefix')]" - }, - "subnetId": { - "value": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]" - }, - "cosmosDbName": { - "value": "[parameters('cosmosDbName')]" - }, - "kubernetesClusterName": { - "value": "[parameters('kubernetesClusterName')]" - }, - "_artifactsLocation": { - "value": "[parameters('_artifactsLocation')]" - }, - "_artifactsLocationSasToken": { - "value": "[parameters('_artifactsLocationSasToken')]" - } + "spClientId": { + "value": "[parameters('spClientId')]" + }, + "spClientSecret": { + "value": "[parameters('spClientSecret')]" + }, + "linuxAdminUsername": { + "value": "[parameters('linuxAdminUsername')]" + }, + "linuxAdminPassword": { + "value": "[parameters('linuxAdminPassword')]" + }, + "dnsPrefix": { + "value": "[parameters('grafanaDnsPrefix')]" + }, + "subnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]" + }, + "cosmosDbName": { + "value": "[parameters('cosmosDbName')]" + }, + "kubernetesClusterName": { + "value": "[parameters('kubernetesClusterName')]" + }, + "_artifactsLocation": { + "value": "[parameters('_artifactsLocation')]" + }, + "_artifactsLocationSasToken": { + "value": "[parameters('_artifactsLocationSasToken')]" } } } - ], - "outputs": { - "jenkinsURL": { - "type": "string", - "value": "[reference('jenkinsDeployment').outputs.jenkinsURL.value]" - }, - "jenkinsSSH": { - "type": "string", - "value": "[reference('jenkinsDeployment').outputs.jenkinsSSH.value]" - }, - "azureContainerRegistryUrl": { - "type": "string", - "value": "[reference(resourceId('Microsoft.ContainerRegistry/registries', variables('acrName'))).loginServer]" - }, - "kubernetesControlPlaneFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.ContainerService/managedClusters/', parameters('kubernetesClusterName'))).fqdn]" - }, - "grafanaUrl": { - "type": "string", - "value": "[reference('grafanaDeployment').outputs.grafanaURL.value]" - } } - } \ No newline at end of file + ], + "outputs": { + "jenkinsURL": { + "type": "string", + "value": "[reference('jenkinsDeployment').outputs.jenkinsURL.value]" + }, + "jenkinsSSH": { + "type": "string", + "value": "[reference('jenkinsDeployment').outputs.jenkinsSSH.value]" + }, + "azureContainerRegistryUrl": { + "type": "string", + "value": "[reference(resourceId('Microsoft.ContainerRegistry/registries', variables('acrName'))).loginServer]" + }, + "kubernetesControlPlaneFQDN": { + "type": "string", + "value": "[reference(concat('Microsoft.ContainerService/managedClusters/', parameters('kubernetesClusterName'))).fqdn]" + }, + "grafanaUrl": { + "type": "string", + "value": "[reference('grafanaDeployment').outputs.grafanaURL.value]" + } + } +} diff --git a/jenkins-cicd-container/azuredeploy.parameters.json b/jenkins-cicd-container/azuredeploy.parameters.json index 23b0ed9d48df..6811c9189bab 100644 --- a/jenkins-cicd-container/azuredeploy.parameters.json +++ b/jenkins-cicd-container/azuredeploy.parameters.json @@ -1,39 +1,39 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "spClientId": { - "value": "GEN-UNIQUE" - }, - "spClientSecret": { - "value": "GEN-PASSWORD" - }, - "linuxAdminUsername": { - "value": "GEN-UNIQUE" - }, - "linuxAdminPassword": { - "value": "GEN-PASSWORD" - }, - "linuxSSHPublicKey": { - "value": "GEN-SSH-PUB-KEY" - }, - "cosmosDbName": { - "value": "GEN-UNIQUE" - }, - "acrName": { - "value": "GEN-UNIQUE" - }, - "jenkinsDnsPrefix": { - "value": "GEN-UNIQUE" - }, - "grafanaDnsPrefix": { - "value": "GEN-UNIQUE" - }, - "kubernetesDnsPrefix": { - "value": "GEN-UNIQUE" - }, - "kubernetesClusterName": { - "value": "GEN-UNIQUE" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "spClientId": { + "value": "GEN-UNIQUE" + }, + "spClientSecret": { + "value": "GEN-PASSWORD" + }, + "linuxAdminUsername": { + "value": "GEN-UNIQUE" + }, + "linuxAdminPassword": { + "value": "GEN-PASSWORD" + }, + "linuxSSHPublicKey": { + "value": "GEN-SSH-PUB-KEY" + }, + "cosmosDbName": { + "value": "GEN-UNIQUE" + }, + "acrName": { + "value": "GEN-UNIQUE" + }, + "jenkinsDnsPrefix": { + "value": "GEN-UNIQUE" + }, + "grafanaDnsPrefix": { + "value": "GEN-UNIQUE" + }, + "kubernetesDnsPrefix": { + "value": "GEN-UNIQUE" + }, + "kubernetesClusterName": { + "value": "GEN-UNIQUE" } -} \ No newline at end of file + } +} diff --git a/jenkins-cicd-container/nested/grafana.json b/jenkins-cicd-container/nested/grafana.json index 49371a90176b..7678ec2ae0aa 100755 --- a/jenkins-cicd-container/nested/grafana.json +++ b/jenkins-cicd-container/nested/grafana.json @@ -20,7 +20,7 @@ }, "dnsPrefix": { "type": "string" - }, + }, "subnetId": { "type": "string" }, @@ -35,6 +35,13 @@ }, "_artifactsLocationSasToken": { "type": "securestring" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -49,7 +56,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -61,7 +68,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -99,7 +106,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" ], @@ -117,7 +124,7 @@ } } } - ], + ], "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('securityGroupName'))]" } @@ -127,7 +134,7 @@ "name": "[parameters('grafanaVMName')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -167,7 +174,7 @@ "type": "extensions", "name": "installGrafana", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('grafanaVMName'))]" ], @@ -188,7 +195,7 @@ } } ] - } + } ], "outputs": { "grafanaURL": { @@ -196,4 +203,4 @@ "value": "[concat('http://', reference(variables('publicIPAddressName')).dnsSettings.fqdn, ':3000')]" } } -} \ No newline at end of file +} diff --git a/jenkins-cicd-container/nested/jenkins.json b/jenkins-cicd-container/nested/jenkins.json index ea116d7a31ed..02b92ec26faa 100644 --- a/jenkins-cicd-container/nested/jenkins.json +++ b/jenkins-cicd-container/nested/jenkins.json @@ -1,217 +1,224 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "jenkinsVMName": { - "type": "string", - "defaultValue": "jenkins" - }, - "spClientId": { - "type": "string" - }, - "spClientSecret": { - "type": "securestring" - }, - "linuxAdminUsername": { - "type": "string" - }, - "linuxAdminPassword": { - "type": "securestring" - }, - "dnsPrefix": { - "type": "string" - }, - "subnetId": { - "type": "string" - }, - "gitRepository": { - "type": "string" - }, - "acrServer": { - "type": "string" - }, - "acrUsername":{ - "type": "string" - }, - "acrPassword":{ - "type": "string" - }, - "mongoDbURI": { - "type": "string" - }, - "kubernetesResourceGroupName": { - "type": "string" - }, - "kubernetesClusterName": { - "type": "string" - }, - "_artifactsLocation": { - "type": "string" - }, - "_artifactsLocationSasToken": { - "type": "securestring" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "jenkinsVMName": { + "type": "string", + "defaultValue": "jenkins" }, - "variables": { - "nicName": "[concat(parameters('jenkinsVMName'), '-nic')]", - "publicIPAddressName": "[concat(parameters('jenkinsVMName'), '-ip')]", - "vmName": "[concat(parameters('jenkinsVMName'), '')]", - "vmExtensionName": "[concat(parameters('jenkinsVMName'), '-ini')]", - "securityGroupName": "[concat(parameters('jenkinsVMName'), '-nsg')]" - }, - "resources": [ - { - "apiVersion": "2017-10-01", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[parameters('dnsPrefix')]" - } - } - }, - { - "apiVersion": "2017-10-01", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "ssh-rule", - "properties": { - "description": "Allow SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 100, - "direction": "Inbound" - } - }, - { - "name": "http-rule", - "properties": { - "description": "Allow HTTP", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "80", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 101, - "direction": "Inbound" - } - } - ] + "spClientId": { + "type": "string" + }, + "spClientSecret": { + "type": "securestring" + }, + "linuxAdminUsername": { + "type": "string" + }, + "linuxAdminPassword": { + "type": "securestring" + }, + "dnsPrefix": { + "type": "string" + }, + "subnetId": { + "type": "string" + }, + "gitRepository": { + "type": "string" + }, + "acrServer": { + "type": "string" + }, + "acrUsername": { + "type": "string" + }, + "acrPassword": { + "type": "string" + }, + "mongoDbURI": { + "type": "string" + }, + "kubernetesResourceGroupName": { + "type": "string" + }, + "kubernetesClusterName": { + "type": "string" + }, + "_artifactsLocation": { + "type": "string" + }, + "_artifactsLocationSasToken": { + "type": "securestring" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "nicName": "[concat(parameters('jenkinsVMName'), '-nic')]", + "publicIPAddressName": "[concat(parameters('jenkinsVMName'), '-ip')]", + "vmName": "[concat(parameters('jenkinsVMName'), '')]", + "vmExtensionName": "[concat(parameters('jenkinsVMName'), '-ini')]", + "securityGroupName": "[concat(parameters('jenkinsVMName'), '-nsg')]" + }, + "resources": [ + { + "apiVersion": "2017-10-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[parameters('dnsPrefix')]" } - }, - { - "apiVersion": "2016-09-01", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[parameters('subnetId')]" - } - } + } + }, + { + "apiVersion": "2017-10-01", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('securityGroupName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "ssh-rule", + "properties": { + "description": "Allow SSH", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" } - ], - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('securityGroupName'))]" - } - } - }, - { - "apiVersion": "2017-12-01", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "Standard_DS1_v2" }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('linuxAdminUsername')]", - "adminPassword": "[parameters('linuxAdminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "Canonical", - "offer": "UbuntuServer", - "sku": "16.04-LTS", - "version": "latest" - }, - "osDisk": { - "createOption": "fromImage", - "managedDisk": { - "storageAccountType": "Premium_LRS" - } + { + "name": "http-rule", + "properties": { + "description": "Allow HTTP", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "80", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 101, + "direction": "Inbound" } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" - } - ] } - }, - "resources": [ + ] + } + }, + { + "apiVersion": "2016-09-01", + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('nicName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" + ], + "properties": { + "ipConfigurations": [ { - "type": "extensions", - "name": "[variables('vmExtensionName')]", - "apiVersion": "2017-12-01", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" - ], + "name": "ipconfig1", "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'), 'scripts/jenkins/jenkins-acr-aks.sh', parameters('_artifactsLocationSasToken'))]" - ] + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" }, - "protectedSettings": { - "commandToExecute": "[concat('./jenkins-acr-aks.sh -jf \"', reference(variables('publicIPAddressName')).dnsSettings.fqdn, '\" -u \"', parameters('linuxAdminUsername') , '\" -g \"', parameters('gitRepository') , '\" -r \"https://', parameters('acrServer'), '\" -ru \"', parameters('acrUsername'), '\" -rp \"', parameters('acrPassword'), '\" -subid \"', subscription().subscriptionId, '\" -tid \"', subscription().tenantId, '\" -spid \"', parameters('spClientId'), '\" -ss \"', parameters('spClientSecret'), '\" -gn \"', parameters('kubernetesResourceGroupName'), '\" -cn \"', parameters('kubernetesClusterName'), '\" -mu \"', parameters('mongoDbURI'), '\" -al \"', parameters('_artifactsLocation'), '\" -st \"', parameters('_artifactsLocationSasToken'), '\"' )]" + "subnet": { + "id": "[parameters('subnetId')]" } } } - ] + ], + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('securityGroupName'))]" + } } - ], - "outputs": { - "jenkinsURL": { - "type": "string", - "value": "[concat('http://', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]" + }, + { + "apiVersion": "2017-12-01", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[parameters('linuxAdminUsername')]", + "adminPassword": "[parameters('linuxAdminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "createOption": "fromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" + } + ] + } }, - "jenkinsSSH": { - "type": "string", - "value": "[concat('ssh -L 8080:localhost:8080 ', parameters('linuxAdminUsername'), '@', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]" - } + "resources": [ + { + "type": "extensions", + "name": "[variables('vmExtensionName')]", + "apiVersion": "2017-12-01", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'), 'scripts/jenkins/jenkins-acr-aks.sh', parameters('_artifactsLocationSasToken'))]" + ] + }, + "protectedSettings": { + "commandToExecute": "[concat('./jenkins-acr-aks.sh -jf \"', reference(variables('publicIPAddressName')).dnsSettings.fqdn, '\" -u \"', parameters('linuxAdminUsername') , '\" -g \"', parameters('gitRepository') , '\" -r \"https://', parameters('acrServer'), '\" -ru \"', parameters('acrUsername'), '\" -rp \"', parameters('acrPassword'), '\" -subid \"', subscription().subscriptionId, '\" -tid \"', subscription().tenantId, '\" -spid \"', parameters('spClientId'), '\" -ss \"', parameters('spClientSecret'), '\" -gn \"', parameters('kubernetesResourceGroupName'), '\" -cn \"', parameters('kubernetesClusterName'), '\" -mu \"', parameters('mongoDbURI'), '\" -al \"', parameters('_artifactsLocation'), '\" -st \"', parameters('_artifactsLocationSasToken'), '\"' )]" + } + } + } + ] + } + ], + "outputs": { + "jenkinsURL": { + "type": "string", + "value": "[concat('http://', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]" + }, + "jenkinsSSH": { + "type": "string", + "value": "[concat('ssh -L 8080:localhost:8080 ', parameters('linuxAdminUsername'), '@', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]" } - } \ No newline at end of file + } +} diff --git a/jenkins-cicd-vmss/nested/jenkins.json b/jenkins-cicd-vmss/nested/jenkins.json index 01be8d6b6e29..648675f44d2d 100644 --- a/jenkins-cicd-vmss/nested/jenkins.json +++ b/jenkins-cicd-vmss/nested/jenkins.json @@ -98,6 +98,13 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -121,7 +128,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -133,7 +140,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NSG - Front End" }, @@ -174,7 +181,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('frontEndNSGName'))]" ], @@ -201,7 +208,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" @@ -228,13 +235,13 @@ "apiVersion": "2017-12-01", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" ], "properties": { "hardwareProfile": { - "vmSize": "Standard_DS1_v2" + "vmSize": "Standard_DS1_v2" }, "osProfile": { "computerName": "[variables('vmName')]", @@ -270,7 +277,7 @@ "type": "extensions", "name": "[variables('vmExtensionName')]", "apiVersion": "2017-12-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" ], @@ -285,7 +292,7 @@ ] }, "protectedSettings": { - "commandToExecute": "[concat('./' , variables('_extensionScript'), ' -jf \"', reference(variables('publicIPAddressName')).dnsSettings.fqdn, '\" -jpi \"', variables('vmPrivateIP'), '\" -jrt \"', parameters('jenkinsReleaseType'), '\" -su \"', subscription().subscriptionId, '\" -t \"', subscription().tenantId, '\" -i \"', parameters('clientId'), '\" -s \"', parameters('clientSecret'), '\" -rg \"', parameters('VMResourceGroup'), '\" -l \"', resourceGroup().location, '\" -irg \"', resourceGroup().name, '\" -im \"', variables('vmImageName'), '\" -vd \"', parameters('VMDnsPrefix'), '\" -vu \"', parameters('VMAdminUsername'), '\" -vp \"', parameters('VMAdminPassword'), '\" -rr \"', parameters('repositoryUrl'), '\" -wi \"', parameters('OMSWorkspaceId'), '\" -wk \"', parameters('OMSWorkspaceKey'), '\" -al \"', parameters('_artifactsLocation'), '\" -st \"', parameters('_artifactsLocationSasToken'), '\"')]" + "commandToExecute": "[concat('./' , variables('_extensionScript'), ' -jf \"', reference(variables('publicIPAddressName')).dnsSettings.fqdn, '\" -jpi \"', variables('vmPrivateIP'), '\" -jrt \"', parameters('jenkinsReleaseType'), '\" -su \"', subscription().subscriptionId, '\" -t \"', subscription().tenantId, '\" -i \"', parameters('clientId'), '\" -s \"', parameters('clientSecret'), '\" -rg \"', parameters('VMResourceGroup'), '\" -l \"', parameters('location'), '\" -irg \"', resourceGroup().name, '\" -im \"', variables('vmImageName'), '\" -vd \"', parameters('VMDnsPrefix'), '\" -vu \"', parameters('VMAdminUsername'), '\" -vp \"', parameters('VMAdminPassword'), '\" -rr \"', parameters('repositoryUrl'), '\" -wi \"', parameters('OMSWorkspaceId'), '\" -wk \"', parameters('OMSWorkspaceKey'), '\" -al \"', parameters('_artifactsLocation'), '\" -st \"', parameters('_artifactsLocationSasToken'), '\"')]" } } } diff --git a/jenkins-cicd-webapp/azuredeploy.json b/jenkins-cicd-webapp/azuredeploy.json index 677c237f0952..07cd7a025490 100644 --- a/jenkins-cicd-webapp/azuredeploy.json +++ b/jenkins-cicd-webapp/azuredeploy.json @@ -91,6 +91,13 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -110,7 +117,7 @@ "kind": "Storage", "name": "[variables('storageAccountName')]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { @@ -121,9 +128,9 @@ "kind": "app", "name": "[variables('servicePlanName')]", "apiVersion": "2016-09-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { - "name": "[variables('servicePlanName')]" + "name": "[variables('servicePlanName')]" } }, { @@ -131,7 +138,7 @@ "kind": "app", "name": "[variables('webAppName')]", "apiVersion": "2016-08-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Web/serverfarms', variables('servicePlanName'))]" ], @@ -143,28 +150,28 @@ "type": "config", "name": "web", "apiVersion": "2016-08-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.Web/sites', variables('webAppName'))]" + "[resourceId('Microsoft.Web/sites', variables('webAppName'))]" ], "properties": { - "javaVersion": "1.8", - "javaContainer": "TOMCAT", - "javaContainerVersion": "9.0" + "javaVersion": "1.8", + "javaContainer": "TOMCAT", + "javaContainerVersion": "9.0" } }, { - "apiVersion":"2016-08-01", - "name":"connectionstrings", - "type":"config", - "dependsOn":[ - "[resourceId('Microsoft.Web/sites', variables('webAppName'))]" + "apiVersion": "2016-08-01", + "name": "connectionstrings", + "type": "config", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('webAppName'))]" ], "properties": { - "defaultConnection": { - "value":"[concat('Database=', variables('mySqlDbName'), ';Data Source=', variables('mySqlServerName'), '.mysql.database.azure.com;User Id=', parameters('mySqlAdminLogin'),'@', variables('mySqlServerName'),';Password=', parameters('mySqlAdminPassword'))]", - "type":"MySql" - } + "defaultConnection": { + "value": "[concat('Database=', variables('mySqlDbName'), ';Data Source=', variables('mySqlServerName'), '.mysql.database.azure.com;User Id=', parameters('mySqlAdminLogin'),'@', variables('mySqlServerName'),';Password=', parameters('mySqlAdminPassword'))]", + "type": "MySql" + } } } ] @@ -176,61 +183,61 @@ "apiVersion": "2015-05-01", "location": "eastus", "tags": { - "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', variables('webAppName'))]": "Resource" + "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', variables('webAppName'))]": "Resource" }, "properties": { - "ApplicationId": "[variables('appInsightsName')]" + "ApplicationId": "[variables('appInsightsName')]" } }, - { - "type":"Microsoft.DBforMySQL/servers", - "apiVersion":"2017-04-30-preview", - "location":"[resourceGroup().location]", - "name":"[variables('mySqlServerName')]", - "properties":{ - "version":"5.7", - "storageMB":51200, - "administratorLogin":"[parameters('mySqlAdminLogin')]", - "administratorLoginPassword":"[parameters('mySqlAdminPassword')]" + { + "type": "Microsoft.DBforMySQL/servers", + "apiVersion": "2017-04-30-preview", + "location": "[parameters('location')]", + "name": "[variables('mySqlServerName')]", + "properties": { + "version": "5.7", + "storageMB": 51200, + "administratorLogin": "[parameters('mySqlAdminLogin')]", + "administratorLoginPassword": "[parameters('mySqlAdminPassword')]" }, - "sku":{ - "name":"MYSQLB50", - "tier":"Basic", - "capacity":50 + "sku": { + "name": "MYSQLB50", + "tier": "Basic", + "capacity": 50 }, - "resources":[ - { - "type":"firewallrules", - "apiVersion":"2017-04-30-preview", - "location":"[resourceGroup().location]", - "name":"[concat(variables('mySqlServerName'),'Firewall')]", - "dependsOn":[ - "[resourceId('Microsoft.DBforMySQL/servers', variables('mySqlServerName'))]" - ], - "properties":{ - "startIpAddress":"0.0.0.0", - "endIpAddress":"255.255.255.255" - } - }, - { - "name":"[variables('mySqlDbName')]", - "type":"databases", - "apiVersion":"2017-04-30-preview", - "dependsOn":[ - "[resourceId('Microsoft.DBforMySQL/servers', variables('mySqlServerName'))]" - ], - "properties":{ - "charset":"utf8", - "collation":"utf8_general_ci" - } - } + "resources": [ + { + "type": "firewallrules", + "apiVersion": "2017-04-30-preview", + "location": "[parameters('location')]", + "name": "[concat(variables('mySqlServerName'),'Firewall')]", + "dependsOn": [ + "[resourceId('Microsoft.DBforMySQL/servers', variables('mySqlServerName'))]" + ], + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + }, + { + "name": "[variables('mySqlDbName')]", + "type": "databases", + "apiVersion": "2017-04-30-preview", + "dependsOn": [ + "[resourceId('Microsoft.DBforMySQL/servers', variables('mySqlServerName'))]" + ], + "properties": { + "charset": "utf8", + "collation": "utf8_general_ci" + } + } ] }, { "apiVersion": "2017-05-10", "name": "jenkinsDeployment", "type": "Microsoft.Resources/deployments", - "dependsOn": [ + "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" ], "properties": { diff --git a/jenkins-cicd-webapp/nested/jenkins.json b/jenkins-cicd-webapp/nested/jenkins.json index f544161f42e5..cc1f39e77d45 100644 --- a/jenkins-cicd-webapp/nested/jenkins.json +++ b/jenkins-cicd-webapp/nested/jenkins.json @@ -79,6 +79,13 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -102,7 +109,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -114,7 +121,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NSG - Front End" }, @@ -149,19 +156,19 @@ } }, { - "name": "AllowAgentInBound", - "properties": { - "protocol": "*", - "sourcePortRange": "*", - "destinationPortRange": "[variables('agentPort')]", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 200, - "direction": "Inbound", - "sourceAddressPrefixes": [], - "destinationAddressPrefixes": [] - } + "name": "AllowAgentInBound", + "properties": { + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "[variables('agentPort')]", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 200, + "direction": "Inbound", + "sourceAddressPrefixes": [], + "destinationAddressPrefixes": [] + } } ] } @@ -170,7 +177,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('frontEndNSGName'))]" ], @@ -197,7 +204,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" @@ -224,13 +231,13 @@ "apiVersion": "2017-12-01", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" ], "properties": { "hardwareProfile": { - "vmSize": "Standard_DS1_v2" + "vmSize": "Standard_DS1_v2" }, "osProfile": { "computerName": "[variables('vmName')]", @@ -266,7 +273,7 @@ "type": "extensions", "name": "[variables('vmExtensionName')]", "apiVersion": "2017-12-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" ], diff --git a/jenkins-on-ubuntu/azuredeploy.json b/jenkins-on-ubuntu/azuredeploy.json index 884659b56051..4a25e4ddb98f 100644 --- a/jenkins-on-ubuntu/azuredeploy.json +++ b/jenkins-on-ubuntu/azuredeploy.json @@ -61,6 +61,13 @@ "metadata": { "description": "The size of the virtual machines used when provisioning Jenkins slave node(s)" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { diff --git a/jenkins-on-ubuntu/jenkmaster-resources.json b/jenkins-on-ubuntu/jenkmaster-resources.json index 0e8cea846740..f2254305a5ec 100644 --- a/jenkins-on-ubuntu/jenkmaster-resources.json +++ b/jenkins-on-ubuntu/jenkmaster-resources.json @@ -34,6 +34,13 @@ }, "staticIp": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -45,7 +52,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -83,7 +90,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'PublicIp')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -95,14 +102,14 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/availabilitySets", "name": "[concat(parameters('namespace'), 'set')]", - "location": "[resourceGroup().location]", - "properties": { } + "location": "[parameters('location')]", + "properties": {} }, { "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), parameters('vmbasename'), 'PublicIp')]" ], @@ -131,7 +138,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]" ], @@ -168,7 +175,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/jenkInstall')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], diff --git a/jenkins-on-ubuntu/jenkslave-resources.json b/jenkins-on-ubuntu/jenkslave-resources.json index 1622794fc85e..bef334c17386 100644 --- a/jenkins-on-ubuntu/jenkslave-resources.json +++ b/jenkins-on-ubuntu/jenkslave-resources.json @@ -28,6 +28,13 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -38,14 +45,14 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/availabilitySets", "name": "[concat(parameters('namespace'), 'set')]", - "location": "[resourceGroup().location]", - "properties": { } + "location": "[parameters('location')]", + "properties": {} }, { "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -64,7 +71,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" ], @@ -101,7 +108,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/jenkInstall')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), parameters('vmbasename'), 'vm')]", "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" diff --git a/jenkins-on-ubuntu/shared-resources.json b/jenkins-on-ubuntu/shared-resources.json index 42d100bbe1a1..84a45c8be517 100644 --- a/jenkins-on-ubuntu/shared-resources.json +++ b/jenkins-on-ubuntu/shared-resources.json @@ -13,6 +13,13 @@ "metadata": { "Description": "A shared storage account for images" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -21,7 +28,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -30,7 +37,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ diff --git a/kafka-on-ubuntu/azuredeploy.json b/kafka-on-ubuntu/azuredeploy.json index c0059ed7508a..3b12e6b5b64a 100644 --- a/kafka-on-ubuntu/azuredeploy.json +++ b/kafka-on-ubuntu/azuredeploy.json @@ -123,6 +123,13 @@ "metadata": { "description": "T-shirt size of the Kafka cluster" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -222,7 +229,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat('niczoo', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[variables('numberOfZookeeperInstances')]" @@ -249,7 +256,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nic', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[variables('numberOfKafkaInstances')]" @@ -276,7 +283,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat('zookprvm', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualZookeeperMachineLoop", "count": "[variables('numberOfZookeeperInstances')]" @@ -329,7 +336,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat('brokervm', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineLoop", "count": "[variables('numberOfKafkaInstances')]" @@ -383,7 +390,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('zookprvm', copyindex(), '/installzoo')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineExtensionsLoop", "count": "[variables('numberOfZookeeperInstances')]" @@ -394,9 +401,9 @@ ], "properties": { "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "[concat(variables('scriptUrl'), 'kafka-cluster-install.sh')]" @@ -409,7 +416,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('brokervm', copyindex(), '/installkafka')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineExtensionsLoop", "count": "[variables('numberOfKafkaInstances')]" @@ -419,10 +426,10 @@ "[concat('Microsoft.Network/networkInterfaces/', 'nic', copyindex())]" ], "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "[concat(variables('scriptUrl'), 'kafka-cluster-install.sh')]" diff --git a/kafka-on-ubuntu/jumpbox-resources-enabled.json b/kafka-on-ubuntu/jumpbox-resources-enabled.json index 93282d4528dc..591ffe4dbb70 100644 --- a/kafka-on-ubuntu/jumpbox-resources-enabled.json +++ b/kafka-on-ubuntu/jumpbox-resources-enabled.json @@ -61,12 +61,17 @@ "metadata": { "Description": "The global VM name prefix" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "vmStorageAccountContainerName": "vhd", - "vmSourceImageName": "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_2_LTS-amd64-server-20150309-en-us-30GB", - "sourceImageName": "[concat('/',subscription().subscriptionId,'/services/images/',variables('vmSourceImageName'))]", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',parameters('subnetName'))]", "vmSize": "Standard_A0" @@ -76,7 +81,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "publicIP", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -85,7 +90,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "nicJumpbox", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', 'publicIP')]" ], @@ -110,7 +115,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "jumpbox", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicJumpbox')]" ], diff --git a/kafka-on-ubuntu/shared-resources.json b/kafka-on-ubuntu/shared-resources.json index c928267ab0a1..1bc2beb64b7e 100644 --- a/kafka-on-ubuntu/shared-resources.json +++ b/kafka-on-ubuntu/shared-resources.json @@ -36,6 +36,13 @@ "metadata": { "Description": "Address space for the virtual network subnet" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -47,7 +54,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -56,7 +63,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/availabilitySets", "name": "kafkaCluserAS", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": "[variables('platformFaultDomainCount')]", "platformUpdateDomainCount": "[variables('platformUpdateDomainCount')]" @@ -66,7 +73,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ diff --git a/kafka-ubuntu-multidisks/azuredeploy.json b/kafka-ubuntu-multidisks/azuredeploy.json index d57be80a80ec..a0ee1cafab7c 100644 --- a/kafka-ubuntu-multidisks/azuredeploy.json +++ b/kafka-ubuntu-multidisks/azuredeploy.json @@ -57,6 +57,13 @@ "metadata": { "description": "Virtual network name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { diff --git a/kafka-ubuntu-multidisks/datastore-16disk-resources.json b/kafka-ubuntu-multidisks/datastore-16disk-resources.json index 5646d036fb59..234f5d971ddf 100644 --- a/kafka-ubuntu-multidisks/datastore-16disk-resources.json +++ b/kafka-ubuntu-multidisks/datastore-16disk-resources.json @@ -19,12 +19,19 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "namespace": "[parameters('commonSettings').namespace]", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(parameters('storageSettings').name, variables('namespace'))]", + "vmName": "[concat(variables('namespace'), 'vm')]", "nicName": "[concat(variables('namespace'), 'nic')]", "adminUsername": "[parameters('commonSettings').adminUsername]", @@ -38,7 +45,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicCopyLoop", "count": "[variables('vmCount')]" @@ -62,7 +69,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyindex())]" ], @@ -268,7 +275,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyindex(), '/install_kafka')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), copyindex())]" ], @@ -278,9 +285,9 @@ }, "properties": { "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, "settings": { "fileUris": "[parameters('osSettings').scripts]", "commandToExecute": "[concat('bash kafka-cluster-install.sh -b ',copyindex(),' -c ', variables('zCount'),' -i ', variables('zSubnet'))]" diff --git a/kafka-ubuntu-multidisks/datastore-2disk-resources.json b/kafka-ubuntu-multidisks/datastore-2disk-resources.json index 7c429d36637c..41afe9548d1d 100644 --- a/kafka-ubuntu-multidisks/datastore-2disk-resources.json +++ b/kafka-ubuntu-multidisks/datastore-2disk-resources.json @@ -19,12 +19,18 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "namespace": "[parameters('commonSettings').namespace]", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(parameters('storageSettings').name, variables('namespace'))]", "vmName": "[concat(variables('namespace'), 'vm')]", "nicName": "[concat(variables('namespace'), 'nic')]", "adminUsername": "[parameters('commonSettings').adminUsername]", @@ -38,7 +44,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicCopyLoop", "count": "[variables('vmCount')]" @@ -62,7 +68,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyindex())]" ], @@ -128,7 +134,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyindex(), '/install_kafka')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), copyindex())]" ], @@ -138,9 +144,9 @@ }, "properties": { "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, "settings": { "fileUris": "[parameters('osSettings').scripts]", "commandToExecute": "[concat('bash kafka-cluster-install.sh -b ',copyindex(),' -c ', variables('zCount'),' -i ', variables('zSubnet'))]" diff --git a/kafka-ubuntu-multidisks/datastore-8disk-resources.json b/kafka-ubuntu-multidisks/datastore-8disk-resources.json index 6490601c8a3c..2b11d35b4d38 100644 --- a/kafka-ubuntu-multidisks/datastore-8disk-resources.json +++ b/kafka-ubuntu-multidisks/datastore-8disk-resources.json @@ -19,12 +19,18 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "namespace": "[parameters('commonSettings').namespace]", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(parameters('storageSettings').name, variables('namespace'))]", "vmName": "[concat(variables('namespace'), 'vm')]", "nicName": "[concat(variables('namespace'), 'nic')]", "adminUsername": "[parameters('commonSettings').adminUsername]", @@ -38,7 +44,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicCopyLoop", "count": "[variables('vmCount')]" @@ -62,7 +68,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyindex())]" ], @@ -188,7 +194,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyindex(), '/install_kafka')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), copyindex())]" ], @@ -198,9 +204,9 @@ }, "properties": { "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, "settings": { "fileUris": "[parameters('osSettings').scripts]", "commandToExecute": "[concat('bash kafka-cluster-install.sh -b ',copyindex(),' -c ', variables('zCount'),' -i ', variables('zSubnet'))]" diff --git a/kafka-ubuntu-multidisks/jumpbox-resources.json b/kafka-ubuntu-multidisks/jumpbox-resources.json index e1b2a6d13f20..2171508a3f62 100644 --- a/kafka-ubuntu-multidisks/jumpbox-resources.json +++ b/kafka-ubuntu-multidisks/jumpbox-resources.json @@ -19,10 +19,16 @@ }, "dnsName": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "vmStorageAccountContainerName": "vhd", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", "storageAccountName": "[parameters('storageSettings').name]", "nicName": "[concat(parameters('commonSettings').namespace, 'nic')]", @@ -35,7 +41,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -47,7 +53,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIpName'))]" ], @@ -72,7 +78,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], diff --git a/kafka-ubuntu-multidisks/shared-resources.json b/kafka-ubuntu-multidisks/shared-resources.json index 3ae859f2f21e..b82bda693a49 100644 --- a/kafka-ubuntu-multidisks/shared-resources.json +++ b/kafka-ubuntu-multidisks/shared-resources.json @@ -10,6 +10,13 @@ }, "networkSettings": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -18,7 +25,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[concat(parameters('storageSettings').name, copyindex())]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "dbStoragePoolLoop", "count": "[parameters('storageSettings').count]" @@ -31,7 +38,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').vnetName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -64,7 +71,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('availabilitySetSettings').name]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": "[parameters('availabilitySetSettings').fdCount]", "platformUpdateDomainCount": "[parameters('availabilitySetSettings').udCount]" diff --git a/kafka-ubuntu-multidisks/zookeeper-resources.json b/kafka-ubuntu-multidisks/zookeeper-resources.json index 719d736d2da1..c950e8bbc4c9 100644 --- a/kafka-ubuntu-multidisks/zookeeper-resources.json +++ b/kafka-ubuntu-multidisks/zookeeper-resources.json @@ -19,12 +19,18 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "namespace": "[parameters('commonSettings').namespace]", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(parameters('storageSettings').name, variables('namespace'))]", "vmName": "[concat(variables('namespace'), 'vm')]", "nicName": "[concat(variables('namespace'), 'nic')]", "adminUsername": "[parameters('commonSettings').adminUsername]", @@ -36,7 +42,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicCopyLoop", "count": "[variables('vmCount')]" @@ -60,7 +66,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyindex())]" ], @@ -104,7 +110,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyindex(), '/install_zookeeper')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), copyindex())]" ], diff --git a/kemp-loadmaster-ha-pair/azuredeploy.json b/kemp-loadmaster-ha-pair/azuredeploy.json index 61070b13ba1d..2f7471ed2be9 100644 --- a/kemp-loadmaster-ha-pair/azuredeploy.json +++ b/kemp-loadmaster-ha-pair/azuredeploy.json @@ -1,359 +1,365 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "balPassword": { - "type": "securestring", - "metadata": { - "description": "Password for bal account" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "balPassword": { + "type": "securestring", + "metadata": { + "description": "Password for bal account" } - }, - "variables": { - "availabilitySetName": "AvSet", - "vmNamePrefix": "KEMPVLM", - "loadBalancerName": "AzureLB", - "adminUsername": "bal", - "storageAccountType": "Standard_LRS", - "virtualNetworkName": "VLM_Network", - "subnetName": "Subnet1", - "vmSize": "Standard_A1", - "networkinterfacename": "[concat(variables('vmNamePrefix'),'-NIC')]", - "networksecurityname": "[concat(variables('vmNamePrefix'),'-NSG')]", - "publicIPAddressName": "[concat(variables('vmNamePrefix'),'-PIP')]", - "dnsNameforLBIP": "[concat('vlm',uniqueString(resourceGroup().id))]", - "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/Subnets', variables('virtualNetworkName'), variables('subnetName'))]", - "numberOfInstances": 2, - "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName'))]", - "imageSKU": "basic-byol", - "publicIPAddressType": "Dynamic", - "publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]", - "imageOffer": "vlm-azure", - "imagePublisher": "kemptech", - "imageVersion": "latest", - "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", - "frontEndIPConfigID": "[concat(variables('lbID'),'/frontendIPConfigurations/loadBalancerFrontEnd')]", - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[variables('imageSku')]", - "version": "[variables('imageVersion')]" - }, - "imagePlan": { - "name": "[variables('imageSku')]", - "product": "[variables('imageOffer')]", - "publisher": "[variables('imagePublisher')]" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." } - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "comments": "This storage account is used to store the VM disks.", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": {} - }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('availabilitySetName')]", - "comments": "The Availability Set ensures at least one KEMP LoadMaster will be available during either a planned or unplanned maintenance event.", - "location": "[resourceGroup().location]" - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "comments": "This the virtual network that all resources will be deployed to.", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "10.0.2.0/24" - } - } - ] - } + } + }, + "variables": { + "availabilitySetName": "AvSet", + "vmNamePrefix": "KEMPVLM", + "loadBalancerName": "AzureLB", + "adminUsername": "bal", + "virtualNetworkName": "VLM_Network", + "subnetName": "Subnet1", + "vmSize": "Standard_A1", + "networkinterfacename": "[concat(variables('vmNamePrefix'),'-NIC')]", + "networksecurityname": "[concat(variables('vmNamePrefix'),'-NSG')]", + "publicIPAddressName": "[concat(variables('vmNamePrefix'),'-PIP')]", + "dnsNameforLBIP": "[concat('vlm',uniqueString(resourceGroup().id))]", + "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/Subnets', variables('virtualNetworkName'), variables('subnetName'))]", + "numberOfInstances": 2, + "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName'))]", + "imageSKU": "basic-byol", + "publicIPAddressType": "Dynamic", + "publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]", + "imageOffer": "vlm-azure", + "imagePublisher": "kemptech", + "imageVersion": "latest", + "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", + "frontEndIPConfigID": "[concat(variables('lbID'),'/frontendIPConfigurations/loadBalancerFrontEnd')]", + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[variables('imageSku')]", + "version": "[variables('imageVersion')]" + }, + "imagePlan": { + "name": "[variables('imageSku')]", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + } + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "comments": "This storage account is used to store the VM disks.", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "comments": "This is the public IP address that will be assigned to the Azure Load Balancer.", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]", - "dnsSettings": { - "domainNameLabel": "[variables('dnsNameforLBIP')]" + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Compute/availabilitySets", + "name": "[variables('availabilitySetName')]", + "comments": "The Availability Set ensures at least one KEMP LoadMaster will be available during either a planned or unplanned maintenance event.", + "location": "[parameters('location')]" + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "comments": "This the virtual network that all resources will be deployed to.", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "10.0.2.0/24" } - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('networksecurityname')]", - "comments": "This Network Security Group (NSG) will limit the TCP ports open to the KEMP LoadMasters.", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "[variables('networksecurityname')]" - }, - "properties": { - "securityRules": [ - { - "name": "wui-rule", - "properties": { - "description": "Allow WUI", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "8443", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 100, - "direction": "Inbound" - } - }, - { - "name": "ssh-rule", - "properties": { - "description": "Allow SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 101, - "direction": "Inbound" - } - }, - { - "name": "ssl-rule", - "properties": { - "description": "Allow SSL", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "443", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 103, - "direction": "Inbound" - } - }, - { - "name": "web-rule", - "properties": { - "description": "Allow WEB", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "80", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 104, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('networkinterfacename'), copyindex())]", - "comments": "A Network Interface will be created for each of the KEMP LoadMasters.", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoop", - "count": "[variables('numberOfInstances')]" - }, - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", - "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'))]", - "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'), '/inboundNatRules/', 'VLM-MGMT', copyIndex())]", - "[concat('Microsoft.Network/networkSecurityGroups/', variables('networksecurityname'))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[variables('subnetRef')]" - }, - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('networksecurityname'))]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('lbID'), '/backendAddressPools/BackendPool1')]" - } - ], - "loadBalancerInboundNatRules": [ - { - "id": "[concat(variables('lbID'),'/inboundNatRules/VLM-MGMT', copyindex())]" - } - ] - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/loadBalancers", - "name": "[variables('loadBalancerName')]", - "comments": "This Azure Load Balancer will be used to direct traffic to the active KEMP LoadMaster in the HA Pair.", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "LoadBalancerFrontend", - "properties": { - "publicIPAddress": { - "id": "[variables('publicIPAddressID')]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "BackendPool1" - } - ], - "loadBalancingRules": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName')), '/frontendIpConfigurations/LoadBalancerFrontend')]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName')), '/backendAddressPools/BackendPool1')]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName')), '/probes/VLM-Health-Probe')]" - }, - "protocol": "Tcp", - "frontendPort": 8444, - "backendPort": 8444, - "idleTimeoutInMinutes": 15 - }, - "Name": "HealthCheck" - } - ], - "probes": [ - { - "properties": { - "protocol": "Http", - "port": 8444, - "requestPath": "/", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "VLM-Health-Probe" - } - ] - } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "comments": "This is the public IP address that will be assigned to the Azure Load Balancer.", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "[variables('publicIPAddressType')]", + "dnsSettings": { + "domainNameLabel": "[variables('dnsNameforLBIP')]" + } + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('networksecurityname')]", + "comments": "This Network Security Group (NSG) will limit the TCP ports open to the KEMP LoadMasters.", + "location": "[parameters('location')]", + "tags": { + "displayName": "[variables('networksecurityname')]" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/loadBalancers/inboundNatRules", - "name": "[concat(variables('loadBalancerName'), '/', 'VLM-MGMT', copyIndex())]", - "comments": "This will create inbound rules to access the KEMP LoadMaster web user interface (WUI).", - "location": "[resourceGroup().location]", - "copy": { - "name": "lbNatLoop", - "count": "[variables('numberOfInstances')]" - }, - "dependsOn": [ - "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'))]" - ], - "properties": { - "frontendIPConfiguration": { - "id": "[variables('frontEndIPConfigID')]" - }, - "protocol": "tcp", - "frontendPort": "[copyIndex(8441)]", - "backendPort": 8443, - "enableFloatingIP": false - } + "properties": { + "securityRules": [ + { + "name": "wui-rule", + "properties": { + "description": "Allow WUI", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "8443", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" + } + }, + { + "name": "ssh-rule", + "properties": { + "description": "Allow SSH", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 101, + "direction": "Inbound" + } + }, + { + "name": "ssl-rule", + "properties": { + "description": "Allow SSL", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 103, + "direction": "Inbound" + } + }, + { + "name": "web-rule", + "properties": { + "description": "Allow WEB", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "80", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 104, + "direction": "Inbound" + } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('networkinterfacename'), copyindex())]", + "comments": "A Network Interface will be created for each of the KEMP LoadMasters.", + "location": "[parameters('location')]", + "copy": { + "name": "nicLoop", + "count": "[variables('numberOfInstances')]" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('vmNamePrefix'), copyindex())]", - "comments": "This will create two KEMP LoadMasters.", - "plan": "[variables('imagePlan')]", - "copy": { - "name": "virtualMachineLoop", - "count": "[variables('numberOfInstances')]" - }, - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'), copyindex())]", - "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]" - ], - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('availabilitySetName'))]" - }, - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", + "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'))]", + "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'), '/inboundNatRules/', 'VLM-MGMT', copyIndex())]", + "[concat('Microsoft.Network/networkSecurityGroups/', variables('networksecurityname'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[variables('subnetRef')]" + }, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('networksecurityname'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[concat(variables('lbID'), '/backendAddressPools/BackendPool1')]" + } + ], + "loadBalancerInboundNatRules": [ + { + "id": "[concat(variables('lbID'),'/inboundNatRules/VLM-MGMT', copyindex())]" + } + ] + } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/loadBalancers", + "name": "[variables('loadBalancerName')]", + "comments": "This Azure Load Balancer will be used to direct traffic to the active KEMP LoadMaster in the HA Pair.", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", + "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontend", + "properties": { + "publicIPAddress": { + "id": "[variables('publicIPAddressID')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "BackendPool1" + } + ], + "loadBalancingRules": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName')), '/frontendIpConfigurations/LoadBalancerFrontend')]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName')), '/backendAddressPools/BackendPool1')]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName')), '/probes/VLM-Health-Probe')]" + }, + "protocol": "Tcp", + "frontendPort": 8444, + "backendPort": 8444, + "idleTimeoutInMinutes": 15 }, - "osProfile": { - "computerName": "[concat(variables('vmNamePrefix'), copyIndex())]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[parameters('balPassword')]" + "Name": "HealthCheck" + } + ], + "probes": [ + { + "properties": { + "protocol": "Http", + "port": 8444, + "requestPath": "/", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[variables('imageSKU')]", - "version": "[variables('imageVersion')]" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),'2016-01-01').primaryEndpoints.blob, 'vhds/osdisk', copyindex(), '.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } + "name": "VLM-Health-Probe" + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/loadBalancers/inboundNatRules", + "name": "[concat(variables('loadBalancerName'), '/', 'VLM-MGMT', copyIndex())]", + "comments": "This will create inbound rules to access the KEMP LoadMaster web user interface (WUI).", + "location": "[parameters('location')]", + "copy": { + "name": "lbNatLoop", + "count": "[variables('numberOfInstances')]" + }, + "dependsOn": [ + "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'))]" + ], + "properties": { + "frontendIPConfiguration": { + "id": "[variables('frontEndIPConfigID')]" + }, + "protocol": "tcp", + "frontendPort": "[copyIndex(8441)]", + "backendPort": 8443, + "enableFloatingIP": false + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[concat(variables('vmNamePrefix'), copyindex())]", + "comments": "This will create two KEMP LoadMasters.", + "plan": "[variables('imagePlan')]", + "copy": { + "name": "virtualMachineLoop", + "count": "[variables('numberOfInstances')]" + }, + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'), copyindex())]", + "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]" + ], + "properties": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('availabilitySetName'))]" + }, + "hardwareProfile": { + "vmSize": "[variables('vmSize')]" + }, + "osProfile": { + "computerName": "[concat(variables('vmNamePrefix'), copyIndex())]", + "adminUsername": "[variables('adminUsername')]", + "adminPassword": "[parameters('balPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[variables('imageSKU')]", + "version": "[variables('imageVersion')]" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),'2016-01-01').primaryEndpoints.blob, 'vhds/osdisk', copyindex(), '.vhd')]" }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('networkInterfaceName'),copyindex()))]" - } - ] + "caching": "ReadWrite", + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('networkInterfaceName'),copyindex()))]" } - } - } - ], - "outputs": { - "FQDN": { - "type": "string", - "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName')),'2015-06-15').dnsSettings.fqdn]" + ] + } } - } + } + ], + "outputs": { + "FQDN": { + "type": "string", + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName')),'2015-06-15').dnsSettings.fqdn]" + } + } } diff --git a/kemp-loadmaster-multinic/azuredeploy.json b/kemp-loadmaster-multinic/azuredeploy.json index 54250412efb9..a35fa7754862 100644 --- a/kemp-loadmaster-multinic/azuredeploy.json +++ b/kemp-loadmaster-multinic/azuredeploy.json @@ -1,211 +1,217 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "balPassword": { - "type": "securestring", - "metadata": { - "description": "Password for bal account" - } - }, - "existingvirtualNetworkResourceGroup": { - "type": "string", - "metadata": { - "description": "Name of the resource group that contains the existing virutal network." - } - }, - "existingvirtualNetworkName": { - "type": "string", - "metadata": { - "description": "Name of the existing virutal network the KEMP LoadMaster will be deployed to." - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "balPassword": { + "type": "securestring", + "metadata": { + "description": "Password for bal account" + } + }, + "existingvirtualNetworkResourceGroup": { + "type": "string", + "metadata": { + "description": "Name of the resource group that contains the existing virutal network." + } + }, + "existingvirtualNetworkName": { + "type": "string", + "metadata": { + "description": "Name of the existing virutal network the KEMP LoadMaster will be deployed to." + } + }, + "existingsubnetName1": { + "type": "string", + "metadata": { + "description": "Name of the existing subnet in the virtual network you want to use" + } + }, + "existingsubnetName2": { + "type": "string", + "metadata": { + "description": "Name of the existing subnet in the virtual network you want to use" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "publicIPAddressType": "Dynamic", + "vmName": "VLM-MultiNIC", + "vmSize": "Standard_A3", + "adminUsername": "bal", + "subnetRef1": "[resourceId(parameters('existingvirtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks/subnets', parameters('existingvirtualNetworkName'), parameters('existingsubnetName1'))]", + "subnetRef2": "[resourceId(parameters('existingvirtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks/subnets', parameters('existingvirtualNetworkName'), parameters('existingsubnetName2'))]", + "nicName1": "NIC1", + "nicName2": "NIC2", + "dnsNameForPublicIP": "[concat('vlm',uniqueString(resourceGroup().id))]", + "imageOffer": "vlm-azure", + "imagePublisher": "kemptech", + "imageVersion": "latest", + "imageSKU": "basic-byol", + "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", + "publicIPAddressName": "[variables('vmName')]", + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[variables('imageSku')]", + "version": "[variables('imageVersion')]" + }, + "imagePlan": { + "name": "[variables('imageSku')]", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + } + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "comments": "This storage account is used to store the VM disk.", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" }, - "existingsubnetName1": { - "type": "string", - "metadata": { - "description": "Name of the existing subnet in the virtual network you want to use" - } + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "comments": "This is the public IP assigned to the NIC on Existing Subnet 1.", + "location": "[parameters('location')]", + "tags": { + "displayName": "PublicIPAddress" }, - "existingsubnetName2": { - "type": "string", - "metadata": { - "description": "Name of the existing subnet in the virtual network you want to use" - } + "properties": { + "publicIPAllocationMethod": "[variables('publicIPAddressType')]", + "dnsSettings": { + "domainNameLabel": "[variables('dnsNameForPublicIP')]" + } } - }, - "variables": { - "publicIPAddressType": "Dynamic", - "vmName": "VLM-MultiNIC", - "vmSize": "Standard_A3", - "adminUsername": "bal", - "subnetRef1": "[resourceId(parameters('existingvirtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks/subnets', parameters('existingvirtualNetworkName'), parameters('existingsubnetName1'))]", - "subnetRef2": "[resourceId(parameters('existingvirtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks/subnets', parameters('existingvirtualNetworkName'), parameters('existingsubnetName2'))]", - "nicName1": "NIC1", - "nicName2": "NIC2", - "dnsNameForPublicIP": "[concat('vlm',uniqueString(resourceGroup().id))]", - "storageAccountType": "Standard_LRS", - "imageOffer": "vlm-azure", - "imagePublisher": "kemptech", - "imageVersion": "latest", - "imageSKU": "basic-byol", - "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", - "publicIPAddressName": "[variables('vmName')]", - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[variables('imageSku')]", - "version": "[variables('imageVersion')]" + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('nicName1')]", + "comments": "This creates the NIC on Existing Subnet 1.", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" + ], + "tags": { + "displayName": "NetworkInterface" }, - "imagePlan": { - "name": "[variables('imageSku')]", - "product": "[variables('imageOffer')]", - "publisher": "[variables('imagePublisher')]" + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" + }, + "subnet": { + "id": "[variables('subnetRef1')]" + } + } + } + ] } - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "comments": "This storage account is used to store the VM disk.", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": {} + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('nicName2')]", + "comments": "This creates the NIC on Existing Subnet 2.", + "location": "[parameters('location')]", + "tags": { + "displayName": "NetworkInterface2" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "comments": "This is the public IP assigned to the NIC on Existing Subnet 1.", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "PublicIPAddress" - }, - "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]", - "dnsSettings": { - "domainNameLabel": "[variables('dnsNameForPublicIP')]" + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[variables('subnetRef2')]" + } } - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName1')]", - "comments": "This creates the NIC on Existing Subnet 1.", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" - ], - "tags": { - "displayName": "NetworkInterface" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[variables('subnetRef1')]" - } - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName2')]", - "comments": "This creates the NIC on Existing Subnet 2.", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "NetworkInterface2" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[variables('subnetRef2')]" - } - } - } - ] - } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('vmName')]", + "comments": "This creates the KEMP LoadMaster with multiple interfaces.", + "plan": "[variables('imagePlan')]", + "location": "[parameters('location')]", + "tags": { + "displayName": "VirtualMachine" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "comments": "This creates the KEMP LoadMaster with multiple interfaces.", - "plan": "[variables('imagePlan')]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "VirtualMachine" - }, - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('nicName1'))]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('nicName2'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[parameters('balPassword')]" + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', variables('nicName1'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('nicName2'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[variables('vmSize')]" + }, + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[variables('adminUsername')]", + "adminPassword": "[parameters('balPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[variables('imageSKU')]", + "version": "[variables('imageVersion')]" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),'2016-01-01').primaryEndpoints.blob, 'vhds/osdisk.vhd')]" }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[variables('imageSKU')]", - "version": "[variables('imageVersion')]" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),'2016-01-01').primaryEndpoints.blob, 'vhds/osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } + "caching": "ReadWrite", + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName1'))]", + "properties": { + "primary": true + } }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName1'))]", - "properties": { - "primary": true - } - }, - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName2'))]", - "properties": { - "primary": false - } - } - ] + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName2'))]", + "properties": { + "primary": false + } } - } - } - ], - "outputs": { - "FQDN": { - "type": "string", - "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName')),'2015-06-15').dnsSettings.fqdn]" + ] + } } - } + } + ], + "outputs": { + "FQDN": { + "type": "string", + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName')),'2015-06-15').dnsSettings.fqdn]" + } + } } diff --git a/lamp-app/azuredeploy.json b/lamp-app/azuredeploy.json index fc7353f37186..54f7e1c77929 100644 --- a/lamp-app/azuredeploy.json +++ b/lamp-app/azuredeploy.json @@ -44,6 +44,13 @@ "metadata": { "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values: 12.04.5-LTS, 14.04.2-LTS, 15.10." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -62,15 +69,14 @@ "vmSize": "Standard_A2", "virtualNetworkName": "MyVNET", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "apiVersion": "2015-06-15" + "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageAccountNamePrefix')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -79,7 +85,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -91,7 +97,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -112,7 +118,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -138,7 +144,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountNamePrefix'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -181,7 +187,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -201,4 +207,4 @@ } } ] -} \ No newline at end of file +} diff --git a/lap-mysql-ubuntu/azuredeploy.json b/lap-mysql-ubuntu/azuredeploy.json index 1846fa5dba13..ce3cc27d6077 100644 --- a/lap-mysql-ubuntu/azuredeploy.json +++ b/lap-mysql-ubuntu/azuredeploy.json @@ -55,6 +55,13 @@ "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": { @@ -221,4 +228,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/lap-mysql-ubuntu/lamplap-resources.json b/lap-mysql-ubuntu/lamplap-resources.json index f831d24bc50e..fc949fc021fa 100644 --- a/lap-mysql-ubuntu/lamplap-resources.json +++ b/lap-mysql-ubuntu/lamplap-resources.json @@ -31,6 +31,13 @@ }, "staticIp": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -47,7 +54,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -85,7 +92,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -97,14 +104,14 @@ "apiVersion": "2017-12-01", "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2017-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('publicIpName')]", "[variables('securityGroupName')]" @@ -134,7 +141,7 @@ "apiVersion": "2017-12-01", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nicName')]", "[variables('availabilitySetName')]" @@ -181,7 +188,7 @@ "apiVersion": "2017-12-01", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '/lampInstall')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('vmName')]" ], @@ -198,4 +205,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/lap-mysql-ubuntu/lampmysql-resources.json b/lap-mysql-ubuntu/lampmysql-resources.json index 0041d3618531..be9faf7fd3c2 100644 --- a/lap-mysql-ubuntu/lampmysql-resources.json +++ b/lap-mysql-ubuntu/lampmysql-resources.json @@ -28,6 +28,13 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -42,14 +49,14 @@ "apiVersion": "2017-12-01", "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -69,7 +76,7 @@ "apiVersion": "2017-12-01", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nicName')]", "[variables('availabilitySetName')]" @@ -116,7 +123,7 @@ "apiVersion": "2017-12-01", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '/lampInstall')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('vmName')]" ], @@ -133,4 +140,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/lap-mysql-ubuntu/shared-resources.json b/lap-mysql-ubuntu/shared-resources.json index 54e9f65b2d1d..99e0fd2569dd 100644 --- a/lap-mysql-ubuntu/shared-resources.json +++ b/lap-mysql-ubuntu/shared-resources.json @@ -7,18 +7,24 @@ "metadata": { "Description": "Network settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15" + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -27,7 +33,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -45,4 +51,4 @@ } } ] -} \ No newline at end of file +} diff --git a/lap-neo4j-ubuntu/azuredeploy.json b/lap-neo4j-ubuntu/azuredeploy.json index bc05f37ffc1e..039b68224b0d 100644 --- a/lap-neo4j-ubuntu/azuredeploy.json +++ b/lap-neo4j-ubuntu/azuredeploy.json @@ -56,6 +56,13 @@ "metadata": { "description": "The size of the virtual machines used when provisioning Neo4J node(s)" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -64,7 +71,6 @@ "lanpLapTemplateUrl": "[concat(variables('templateBaseUrl'), 'lanplap-resources.json')]", "lanpneo4jTemplateUrl": "[concat(variables('templateBaseUrl'), 'lanpneo4j-resources.json')]", "namespace": "lanp-", - "apiVersion": "2015-01-01", "virtualNetworkName": "myVNET", "networkSettings": { "virtualNetworkName": "myVNET", @@ -224,4 +230,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/lap-neo4j-ubuntu/nested/lanplap-resources.json b/lap-neo4j-ubuntu/nested/lanplap-resources.json index f3fc6a0e3175..8a16e08b17f3 100644 --- a/lap-neo4j-ubuntu/nested/lanplap-resources.json +++ b/lap-neo4j-ubuntu/nested/lanplap-resources.json @@ -31,11 +31,17 @@ }, "staticIp": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "apiVersion": "2015-06-15", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, @@ -44,7 +50,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -82,7 +88,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'PublicIp')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -94,14 +100,14 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[concat(parameters('namespace'), 'set')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), parameters('vmbasename'), 'PublicIp')]" ], @@ -130,7 +136,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]" ], @@ -167,7 +173,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/lampInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], @@ -184,4 +190,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/lap-neo4j-ubuntu/nested/lanpneo4j-resources.json b/lap-neo4j-ubuntu/nested/lanpneo4j-resources.json index b8b6f97e95ba..b31d880337f6 100644 --- a/lap-neo4j-ubuntu/nested/lanpneo4j-resources.json +++ b/lap-neo4j-ubuntu/nested/lanpneo4j-resources.json @@ -28,26 +28,32 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15" + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[concat(parameters('namespace'), 'set')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -67,7 +73,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" ], @@ -104,7 +110,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/lampInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), parameters('vmbasename'), 'vm')]", "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" @@ -122,4 +128,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/lap-neo4j-ubuntu/nested/shared-resources.json b/lap-neo4j-ubuntu/nested/shared-resources.json index d880d41a9c37..4358858d44e4 100644 --- a/lap-neo4j-ubuntu/nested/shared-resources.json +++ b/lap-neo4j-ubuntu/nested/shared-resources.json @@ -7,18 +7,24 @@ "metadata": { "Description": "Network settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15" + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -27,7 +33,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "myVNet", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -45,4 +51,4 @@ } } ] -} \ No newline at end of file +} diff --git a/managed-disk-performance-meter/azuredeploy.json b/managed-disk-performance-meter/azuredeploy.json index 55063aa97cf2..87e68df658d4 100644 --- a/managed-disk-performance-meter/azuredeploy.json +++ b/managed-disk-performance-meter/azuredeploy.json @@ -135,6 +135,13 @@ "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": { @@ -159,7 +166,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, @@ -169,7 +176,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -178,7 +185,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -199,7 +206,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('publicIPAddressName')]", "[variables('virtualNetworkName')]" @@ -225,7 +232,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NSG" }, @@ -255,7 +262,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('storageAccountName')]", "[variables('nicName')]" @@ -311,7 +318,7 @@ "dependsOn": [ "[variables('vmName')]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.OSTCExtensions", "type": "CustomScriptForLinux", @@ -334,4 +341,4 @@ "value": "[trim(split(reference('CustomScriptExtension').instanceView.statuses[0].message, '\n')[2])]" } } -} \ No newline at end of file +} diff --git a/managed-disk-raid-performance-meter/azuredeploy.json b/managed-disk-raid-performance-meter/azuredeploy.json index e810f47638b0..532c0114b7a0 100644 --- a/managed-disk-raid-performance-meter/azuredeploy.json +++ b/managed-disk-raid-performance-meter/azuredeploy.json @@ -146,6 +146,13 @@ "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": { @@ -232,7 +239,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, @@ -242,7 +249,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -251,7 +258,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -272,7 +279,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('publicIPAddressName')]", "[variables('virtualNetworkName')]" @@ -298,7 +305,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NSG" }, @@ -328,7 +335,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('storageAccountName')]", "[variables('nicName')]" @@ -377,7 +384,7 @@ "dependsOn": [ "[variables('vmName')]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.OSTCExtensions", "type": "CustomScriptForLinux", @@ -400,4 +407,4 @@ "value": "[trim(split(reference('CustomScriptExtension').instanceView.statuses[0].message, '\n')[2])]" } } -} \ No newline at end of file +} diff --git a/manifold-endpoint/azuredeploy.json b/manifold-endpoint/azuredeploy.json index 99db23a73de4..3ada5ff0c35f 100644 --- a/manifold-endpoint/azuredeploy.json +++ b/manifold-endpoint/azuredeploy.json @@ -36,6 +36,13 @@ "metadata": { "description": "Size of VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -53,7 +60,6 @@ "vmStorageAccountContainerName": "vhds", "vmName": "[parameters('vmDnsPrefix')]", "virtualNetworkName": "manifoldEndpointVnet", - "apiVersion": "2015-06-15", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'manifold')]" @@ -63,7 +69,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -72,7 +78,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -84,7 +90,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -105,7 +111,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -131,7 +137,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -174,7 +180,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -192,4 +198,4 @@ } } ] -} \ No newline at end of file +} diff --git a/matlab-cluster/azuredeploy.json b/matlab-cluster/azuredeploy.json index 1bdeeda2ef67..d3d5c5f76c27 100644 --- a/matlab-cluster/azuredeploy.json +++ b/matlab-cluster/azuredeploy.json @@ -24,54 +24,54 @@ "vmSizeClient": { "type": "string", "allowedValues": [ - "Standard_A0", - "Standard_A1", - "Standard_A2", - "Standard_A3", - "Standard_A4", - "Standard_A5", - "Standard_A6", - "Standard_A7", - "Standard_D1", - "Standard_D2", - "Standard_D3", - "Standard_D4", - "Standard_D11", - "Standard_D12", - "Standard_D13", - "Standard_D14", - "Standard_D1_v2", - "Standard_D2_v2", - "Standard_D3_v2", - "Standard_D4_v2", - "Standard_D5_v2", - "Standard_D11_v2", - "Standard_D12_v2", - "Standard_D13_v2", - "Standard_D14_v2", - "Standard_DS1", - "Standard_DS2", - "Standard_DS3", - "Standard_DS4", - "Standard_DS11", - "Standard_DS12", - "Standard_DS13", - "Standard_DS14", - "Standard_G1", - "Standard_G2", - "Standard_G3", - "Standard_G4", - "Standard_G5", - "Standard_GS1", - "Standard_GS2", - "Standard_GS3", - "Standard_GS4", - "Standard_GS5", - "Standard_A8", - "Standard_A9", - "Standard_A10", - "Standard_A11" - ], + "Standard_A0", + "Standard_A1", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_D1", + "Standard_D2", + "Standard_D3", + "Standard_D4", + "Standard_D11", + "Standard_D12", + "Standard_D13", + "Standard_D14", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_DS1", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS11", + "Standard_DS12", + "Standard_DS13", + "Standard_DS14", + "Standard_G1", + "Standard_G2", + "Standard_G3", + "Standard_G4", + "Standard_G5", + "Standard_GS1", + "Standard_GS2", + "Standard_GS3", + "Standard_GS4", + "Standard_GS5", + "Standard_A8", + "Standard_A9", + "Standard_A10", + "Standard_A11" + ], "metadata": { "description": "Size of the Matlab client nodes." } @@ -79,54 +79,54 @@ "vmSizeMJS": { "type": "string", "allowedValues": [ - "Standard_A0", - "Standard_A1", - "Standard_A2", - "Standard_A3", - "Standard_A4", - "Standard_A5", - "Standard_A6", - "Standard_A7", - "Standard_D1", - "Standard_D2", - "Standard_D3", - "Standard_D4", - "Standard_D11", - "Standard_D12", - "Standard_D13", - "Standard_D14", - "Standard_D1_v2", - "Standard_D2_v2", - "Standard_D3_v2", - "Standard_D4_v2", - "Standard_D5_v2", - "Standard_D11_v2", - "Standard_D12_v2", - "Standard_D13_v2", - "Standard_D14_v2", - "Standard_DS1", - "Standard_DS2", - "Standard_DS3", - "Standard_DS4", - "Standard_DS11", - "Standard_DS12", - "Standard_DS13", - "Standard_DS14", - "Standard_G1", - "Standard_G2", - "Standard_G3", - "Standard_G4", - "Standard_G5", - "Standard_GS1", - "Standard_GS2", - "Standard_GS3", - "Standard_GS4", - "Standard_GS5", - "Standard_A8", - "Standard_A9", - "Standard_A10", - "Standard_A11" - ], + "Standard_A0", + "Standard_A1", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_D1", + "Standard_D2", + "Standard_D3", + "Standard_D4", + "Standard_D11", + "Standard_D12", + "Standard_D13", + "Standard_D14", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_DS1", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS11", + "Standard_DS12", + "Standard_DS13", + "Standard_DS14", + "Standard_G1", + "Standard_G2", + "Standard_G3", + "Standard_G4", + "Standard_G5", + "Standard_GS1", + "Standard_GS2", + "Standard_GS3", + "Standard_GS4", + "Standard_GS5", + "Standard_A8", + "Standard_A9", + "Standard_A10", + "Standard_A11" + ], "metadata": { "description": "Size of the MJS node." } @@ -134,54 +134,54 @@ "vmSizeWorker": { "type": "string", "allowedValues": [ - "Standard_A0", - "Standard_A1", - "Standard_A2", - "Standard_A3", - "Standard_A4", - "Standard_A5", - "Standard_A6", - "Standard_A7", - "Standard_D1", - "Standard_D2", - "Standard_D3", - "Standard_D4", - "Standard_D11", - "Standard_D12", - "Standard_D13", - "Standard_D14", - "Standard_D1_v2", - "Standard_D2_v2", - "Standard_D3_v2", - "Standard_D4_v2", - "Standard_D5_v2", - "Standard_D11_v2", - "Standard_D12_v2", - "Standard_D13_v2", - "Standard_D14_v2", - "Standard_DS1", - "Standard_DS2", - "Standard_DS3", - "Standard_DS4", - "Standard_DS11", - "Standard_DS12", - "Standard_DS13", - "Standard_DS14", - "Standard_G1", - "Standard_G2", - "Standard_G3", - "Standard_G4", - "Standard_G5", - "Standard_GS1", - "Standard_GS2", - "Standard_GS3", - "Standard_GS4", - "Standard_GS5", - "Standard_A8", - "Standard_A9", - "Standard_A10", - "Standard_A11" - ], + "Standard_A0", + "Standard_A1", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_D1", + "Standard_D2", + "Standard_D3", + "Standard_D4", + "Standard_D11", + "Standard_D12", + "Standard_D13", + "Standard_D14", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_DS1", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS11", + "Standard_DS12", + "Standard_DS13", + "Standard_DS14", + "Standard_G1", + "Standard_G2", + "Standard_G3", + "Standard_G4", + "Standard_G5", + "Standard_GS1", + "Standard_GS2", + "Standard_GS3", + "Standard_GS4", + "Standard_GS5", + "Standard_A8", + "Standard_A9", + "Standard_A10", + "Standard_A11" + ], "metadata": { "description": "Size of the worker nodes." } @@ -217,13 +217,17 @@ "metadata": { "description": "This is the container URL that will hold all VHDs for the VMs" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "imagePublisher": "MicrosoftWindowsServer", - "imageOffer": "WindowsServer", - "windowsOSVersion": "2012-R2-Datacenter", - "OSDiskName": "osdisk", + "publicIPAddressType": "Dynamic", "publicIPAddressName": "publicips", "clientVMName": "client", @@ -266,7 +270,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSecurityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -290,7 +294,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" ], @@ -317,7 +321,7 @@ "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2015-06-15", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -329,7 +333,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), '_client')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('networkSettings').virtualNetworkName)]" @@ -356,7 +360,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('clientVMName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), '_client')]" ], @@ -396,7 +400,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "apiVersion": "2015-06-15", "name": "[concat(variables('clientVMName'), '/Installation')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('clientVMName'))]" ], @@ -417,7 +421,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('networkSettings').virtualNetworkName)]" ], @@ -440,7 +444,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('masterVMName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -480,7 +484,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "apiVersion": "2015-06-15", "name": "[concat(variables('masterVMName'), '/Installation')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('masterVMName'))]" ], @@ -493,7 +497,7 @@ "fileUris": [ "[variables('scriptName')]" ], - "commandToExecute": "[concat(variables('installationCLI'), ' ', parameters('dnsLabelPrefix'), ' ', resourceGroup().location, ' master ', parameters('numWorkerOnMJS'))]" + "commandToExecute": "[concat(variables('installationCLI'), ' ', parameters('dnsLabelPrefix'), ' ', parameters('location'), ' master ', parameters('numWorkerOnMJS'))]" } } }, @@ -501,7 +505,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), 'worker', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('networkSettings').virtualNetworkName)]" ], @@ -528,7 +532,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('workerVMName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), 'worker', copyindex())]" ], @@ -572,7 +576,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('workerVMName'), copyindex(), '/Installation')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('workerVMName'), copyindex())]" ], @@ -589,7 +593,7 @@ "fileUris": [ "[variables('scriptName')]" ], - "commandToExecute": "[concat(variables('installationCLI'), ' ', parameters('dnsLabelPrefix'), ' ', resourceGroup().location, ' ', parameters('numWorkersWorker'))]" + "commandToExecute": "[concat(variables('installationCLI'), ' ', parameters('dnsLabelPrefix'), ' ', parameters('location'), ' ', parameters('numWorkersWorker'))]" } } } diff --git a/mcafee-extension-windows-vm/azuredeploy.json b/mcafee-extension-windows-vm/azuredeploy.json index 127288a65c7d..e44f96be566a 100644 --- a/mcafee-extension-windows-vm/azuredeploy.json +++ b/mcafee-extension-windows-vm/azuredeploy.json @@ -108,6 +108,13 @@ "metadata": { "description": "Extension name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -120,7 +127,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -129,7 +136,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } @@ -138,7 +145,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -159,7 +166,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" @@ -185,7 +192,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]" @@ -228,7 +235,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/', parameters('vmExtensionName'))]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], diff --git a/media-service-output-primary-key/azuredeploy.json b/media-service-output-primary-key/azuredeploy.json index 8480b9e59a80..7835b77a8826 100644 --- a/media-service-output-primary-key/azuredeploy.json +++ b/media-service-output-primary-key/azuredeploy.json @@ -1,61 +1,68 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "uniqueResourcePrefix": "[uniqueString(resourceGroup().id)]", + "storage": { + "name": "[concat(variables('uniqueResourcePrefix'), 'psstorage')]", + "sku": "Premium_LRS" }, - "variables": { - "uniqueResourcePrefix" : "[uniqueString(resourceGroup().id)]", - "storage" : { - "name" : "[concat(variables('uniqueResourcePrefix'), 'psstorage')]", - "sku" : "Premium_LRS" - }, - "mediaService" : { - "name" : "[concat(variables('uniqueResourcePrefix'), 'mediaserv')]" - } + "mediaService": { + "name": "[concat(variables('uniqueResourcePrefix'), 'mediaserv')]" + } + }, + "outputs": { + "mediaServiceFullInfo": { + "type": "object", + "value": "[listKeys(resourceId('Microsoft.Media/mediaservices', variables('mediaService').name), providers('Microsoft.Media', 'mediaservices')'2015-10-01'0])]" }, - "outputs": { - "mediaServiceFullInfo": { - "type": "object", - "value": "[listKeys(resourceId('Microsoft.Media/mediaservices', variables('mediaService').name), providers('Microsoft.Media', 'mediaservices')'2015-10-01'0])]" - }, - "mediaServicePrimaryKey": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Media/mediaservices', variables('mediaService').name), providers('Microsoft.Media', 'mediaservices')'2015-10-01'0]).primaryKey]" - } + "mediaServicePrimaryKey": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Media/mediaservices', variables('mediaService').name), providers('Microsoft.Media', 'mediaservices')'2015-10-01'0]).primaryKey]" + } + }, + "resources": [ + { + "comments": "Storage used by Media Service", + "type": "Microsoft.Storage/storageAccounts", + "sku": { + "name": "[variables('storage').sku]" + }, + "kind": "Storage", + "name": "[variables('storage').name]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "tags": {}, + "properties": {}, + "resources": [], + "dependsOn": [] }, - "resources" : [ - { - "comments": "Storage used by Media Service", - "type": "Microsoft.Storage/storageAccounts", - "sku": { - "name": "[variables('storage').sku]" - }, - "kind": "Storage", - "name": "[variables('storage').name]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "tags": {}, - "properties": {}, - "resources": [], - "dependsOn": [] + { + "type": "Microsoft.Media/mediaservices", + "name": "[variables('mediaService').name]", + "apiVersion": "2015-10-01", + "location": "[parameters('location')]", + "properties": { + "storageAccounts": [ + { + "id": "[resourceId('Microsoft.Storage/storageAccounts', variables('storage').name)]", + "isPrimary": true + } + ] }, - { - "type": "Microsoft.Media/mediaservices", - "name": "[variables('mediaService').name]", - "apiVersion": "2015-10-01", - "location": "[resourceGroup().location]", - "properties": { - "storageAccounts": [ - { - "id": "[resourceId('Microsoft.Storage/storageAccounts', variables('storage').name)]", - "isPrimary": true - } - ] - }, - "resources": [], - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('storage').name)]" - ] - } - ] + "resources": [], + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storage').name)]" + ] + } + ] } diff --git a/memcached-multi-vm-ubuntu/azuredeploy.json b/memcached-multi-vm-ubuntu/azuredeploy.json index b40c7acc05b5..e250ebc5430c 100644 --- a/memcached-multi-vm-ubuntu/azuredeploy.json +++ b/memcached-multi-vm-ubuntu/azuredeploy.json @@ -89,6 +89,13 @@ "metadata": { "description": "Address prefix for the Memcached subnet" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -110,7 +117,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -119,7 +126,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -146,7 +153,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "publicip", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -158,7 +165,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "nicapache", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" ], @@ -183,7 +190,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicmemcached', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "memcachedNicLoop", "count": "[parameters('numberOfMemcachedInstances')]" @@ -209,7 +216,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('domainName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicapache')]", "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]" @@ -247,7 +254,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('memcachedMachineNamePrefix'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "memcachedVmLoop", "count": "[parameters('numberOfMemcachedInstances')]" @@ -289,7 +296,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('memcachedMachineNamePrefix'), copyindex(), '/install_memcached')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "extensionLoop", "count": "[parameters('numberOfMemcachedInstances')]" @@ -300,9 +307,9 @@ ], "properties": { "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "[variables('scriptUrlInstallMemcached')]" @@ -315,15 +322,15 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('domainName'), '/install_apache')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('domainName'))]" ], "properties": { "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "[variables('scriptUrlInstallApache')]" diff --git a/minecraft-on-ubuntu/azuredeploy.json b/minecraft-on-ubuntu/azuredeploy.json index 57e55edb7ebd..141211d63224 100644 --- a/minecraft-on-ubuntu/azuredeploy.json +++ b/minecraft-on-ubuntu/azuredeploy.json @@ -126,6 +126,13 @@ "metadata": { "description": "Add a seed for your world" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -137,23 +144,20 @@ "addressPrefix": "10.0.0.0/16", "subnetName": "subnet", "subnetPrefix": "10.0.0.0/24", - "storageAccountType": "Standard_LRS", "publicIPAddressName": "minecraftpublicip", "publicIPAddressType": "Dynamic", "ubuntuOSVersion": "16.04-LTS", "vmName": "minecraftvm", "virtualNetworkName": "minecraftvnet", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "computeApiVersion": "2017-03-30", - "networkApiVersion": "2017-04-01" + "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]" }, "resources": [ { "apiVersion": "2017-04-01", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSecurityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -191,7 +195,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -203,7 +207,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" ], @@ -230,7 +234,7 @@ "apiVersion": "2017-04-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -256,7 +260,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -295,7 +299,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -313,4 +317,4 @@ } } ] -} \ No newline at end of file +} diff --git a/mongodb-high-availability/arbiter-resources.json b/mongodb-high-availability/arbiter-resources.json index cc0081512bad..25f7e211ae05 100644 --- a/mongodb-high-availability/arbiter-resources.json +++ b/mongodb-high-availability/arbiter-resources.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "nicArbiter", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -52,7 +59,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "vmArbiter", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicArbiter')]" ], @@ -89,7 +96,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "vmArbiter/installmongodb", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmArbiter')]" ], diff --git a/mongodb-high-availability/azuredeploy.json b/mongodb-high-availability/azuredeploy.json index 4eb1d4f54cb3..2d188f1c6b68 100644 --- a/mongodb-high-availability/azuredeploy.json +++ b/mongodb-high-availability/azuredeploy.json @@ -133,6 +133,13 @@ "metadata": { "description": "The shared secret key for the MongoDB replica set" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -494,4 +501,4 @@ } } ] -} \ No newline at end of file +} diff --git a/mongodb-high-availability/jumpbox-resources.json b/mongodb-high-availability/jumpbox-resources.json index bd6e6031a3bf..b3c2b6196df6 100644 --- a/mongodb-high-availability/jumpbox-resources.json +++ b/mongodb-high-availability/jumpbox-resources.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -36,7 +43,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -60,7 +67,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "jumpboxPublicIP", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -69,7 +76,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "jumpboxNIC", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', 'jumpboxPublicIP')]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('securityGroupName'))]" @@ -98,7 +105,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "jumpboxVM", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'jumpboxNIC')]" ], @@ -133,4 +140,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mongodb-high-availability/member-resources-D1.json b/mongodb-high-availability/member-resources-D1.json index c2c612301194..e92d59d2e407 100644 --- a/mongodb-high-availability/member-resources-D1.json +++ b/mongodb-high-availability/member-resources-D1.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -53,7 +60,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -115,7 +122,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-high-availability/member-resources-D11.json b/mongodb-high-availability/member-resources-D11.json index 4c25ac6f2be5..4c69e8a21efe 100644 --- a/mongodb-high-availability/member-resources-D11.json +++ b/mongodb-high-availability/member-resources-D11.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -53,7 +60,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -135,7 +142,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-high-availability/member-resources-D12.json b/mongodb-high-availability/member-resources-D12.json index c4b3e27b0aa5..1503186fa475 100644 --- a/mongodb-high-availability/member-resources-D12.json +++ b/mongodb-high-availability/member-resources-D12.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -53,7 +60,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -175,7 +182,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-high-availability/member-resources-D13.json b/mongodb-high-availability/member-resources-D13.json index 1f5f654899a4..83989c9c0fd4 100644 --- a/mongodb-high-availability/member-resources-D13.json +++ b/mongodb-high-availability/member-resources-D13.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -53,7 +60,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -255,7 +262,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-high-availability/member-resources-D14.json b/mongodb-high-availability/member-resources-D14.json index b326ea854d6a..7db1dc709cdd 100644 --- a/mongodb-high-availability/member-resources-D14.json +++ b/mongodb-high-availability/member-resources-D14.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -53,7 +60,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -415,7 +422,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-high-availability/member-resources-D2.json b/mongodb-high-availability/member-resources-D2.json index aa64457b600e..8b037fcddbe9 100644 --- a/mongodb-high-availability/member-resources-D2.json +++ b/mongodb-high-availability/member-resources-D2.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -53,7 +60,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -135,7 +142,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-high-availability/member-resources-D3.json b/mongodb-high-availability/member-resources-D3.json index 6bdeade0ae1d..dcd50dedaf56 100644 --- a/mongodb-high-availability/member-resources-D3.json +++ b/mongodb-high-availability/member-resources-D3.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -53,7 +60,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -175,7 +182,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-high-availability/member-resources-D4.json b/mongodb-high-availability/member-resources-D4.json index 1f5f654899a4..83989c9c0fd4 100644 --- a/mongodb-high-availability/member-resources-D4.json +++ b/mongodb-high-availability/member-resources-D4.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -53,7 +60,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -255,7 +262,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-high-availability/shared-resources.json b/mongodb-high-availability/shared-resources.json index 44570d14745c..795677913d3f 100644 --- a/mongodb-high-availability/shared-resources.json +++ b/mongodb-high-availability/shared-resources.json @@ -19,6 +19,13 @@ "metadata": { "Description": "Network settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -26,7 +33,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[concat(parameters('storageSettings').vhdStorageAccountName, copyindex())]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "storageAccountsLoop", "count": "[parameters('storageSettings').storageAccountCount]" @@ -39,14 +46,14 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('commonSettings').availabilitySetName]", - "location": "[resourceGroup().location]", - "properties": { } + "location": "[parameters('location')]", + "properties": {} }, { "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -64,4 +71,4 @@ } } ] -} \ No newline at end of file +} diff --git a/mongodb-nodejs-high-availability/arbiter-resources.json b/mongodb-nodejs-high-availability/arbiter-resources.json index cc0081512bad..25f7e211ae05 100644 --- a/mongodb-nodejs-high-availability/arbiter-resources.json +++ b/mongodb-nodejs-high-availability/arbiter-resources.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "nicArbiter", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -52,7 +59,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "vmArbiter", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicArbiter')]" ], @@ -89,7 +96,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "vmArbiter/installmongodb", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmArbiter')]" ], diff --git a/mongodb-nodejs-high-availability/azuredeploy.json b/mongodb-nodejs-high-availability/azuredeploy.json index d6ea459032c5..971fbe0fa10a 100644 --- a/mongodb-nodejs-high-availability/azuredeploy.json +++ b/mongodb-nodejs-high-availability/azuredeploy.json @@ -124,6 +124,13 @@ "metadata": { "description": "The shared secret key for the MongoDB replica set" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -517,4 +524,4 @@ } } ] -} \ No newline at end of file +} diff --git a/mongodb-nodejs-high-availability/frontend-resource.json b/mongodb-nodejs-high-availability/frontend-resource.json index 8dca9dafa802..75d9d011fc36 100644 --- a/mongodb-nodejs-high-availability/frontend-resource.json +++ b/mongodb-nodejs-high-availability/frontend-resource.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -39,7 +46,6 @@ "vmName": "MyUbuntuVM", "vmSize": "Standard_D1", "virtualNetworkName": "[concat(parameters('networkSettings').virtualNetworkName)]", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnetRef": "[parameters('networkSettings').subnetRef]" }, "resources": [ @@ -47,7 +53,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageSettings').storageNameForFrontEnd]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -56,7 +62,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -68,7 +74,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" ], @@ -93,7 +99,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('storageSettings').storageNameForFrontEnd)]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -136,7 +142,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '/CustomScript')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/mongodb-nodejs-high-availability/jumpbox-resources.json b/mongodb-nodejs-high-availability/jumpbox-resources.json index c197836197ea..3593869ebe8f 100644 --- a/mongodb-nodejs-high-availability/jumpbox-resources.json +++ b/mongodb-nodejs-high-availability/jumpbox-resources.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -36,7 +43,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -60,7 +67,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "jumpboxPublicIP", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -69,7 +76,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "jumpboxNIC", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', 'jumpboxPublicIP')]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('securityGroupName'))]" @@ -98,7 +105,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "jumpboxVM", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'jumpboxNIC')]" ], @@ -133,4 +140,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mongodb-nodejs-high-availability/member-resources-D1.json b/mongodb-nodejs-high-availability/member-resources-D1.json index 10ceffb6a732..1a6b707be59b 100644 --- a/mongodb-nodejs-high-availability/member-resources-D1.json +++ b/mongodb-nodejs-high-availability/member-resources-D1.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -53,7 +60,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -115,7 +122,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-nodejs-high-availability/member-resources-D11.json b/mongodb-nodejs-high-availability/member-resources-D11.json index 4c25ac6f2be5..4c69e8a21efe 100644 --- a/mongodb-nodejs-high-availability/member-resources-D11.json +++ b/mongodb-nodejs-high-availability/member-resources-D11.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -53,7 +60,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -135,7 +142,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-nodejs-high-availability/member-resources-D12.json b/mongodb-nodejs-high-availability/member-resources-D12.json index c4b3e27b0aa5..1503186fa475 100644 --- a/mongodb-nodejs-high-availability/member-resources-D12.json +++ b/mongodb-nodejs-high-availability/member-resources-D12.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -33,7 +40,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -53,7 +60,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -175,7 +182,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-nodejs-high-availability/member-resources-D13.json b/mongodb-nodejs-high-availability/member-resources-D13.json index 3de428353681..eb3a54733571 100644 --- a/mongodb-nodejs-high-availability/member-resources-D13.json +++ b/mongodb-nodejs-high-availability/member-resources-D13.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -32,7 +39,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -52,7 +59,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -254,7 +261,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-nodejs-high-availability/member-resources-D14.json b/mongodb-nodejs-high-availability/member-resources-D14.json index 8ccd73ce2c4a..18aef5dff3cc 100644 --- a/mongodb-nodejs-high-availability/member-resources-D14.json +++ b/mongodb-nodejs-high-availability/member-resources-D14.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -32,7 +39,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -52,7 +59,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -414,7 +421,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-nodejs-high-availability/member-resources-D2.json b/mongodb-nodejs-high-availability/member-resources-D2.json index 5869d3db25f8..c4790094d0e7 100644 --- a/mongodb-nodejs-high-availability/member-resources-D2.json +++ b/mongodb-nodejs-high-availability/member-resources-D2.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -32,7 +39,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -52,7 +59,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -134,7 +141,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-nodejs-high-availability/member-resources-D3.json b/mongodb-nodejs-high-availability/member-resources-D3.json index 666a793f7ff8..505cb4151ce8 100644 --- a/mongodb-nodejs-high-availability/member-resources-D3.json +++ b/mongodb-nodejs-high-availability/member-resources-D3.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -32,7 +39,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -52,7 +59,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -174,7 +181,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-nodejs-high-availability/member-resources-D4.json b/mongodb-nodejs-high-availability/member-resources-D4.json index 3de428353681..eb3a54733571 100644 --- a/mongodb-nodejs-high-availability/member-resources-D4.json +++ b/mongodb-nodejs-high-availability/member-resources-D4.json @@ -25,6 +25,13 @@ "metadata": { "Description": "Machine settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -32,7 +39,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -52,7 +59,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -254,7 +261,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installmongodb')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/mongodb-nodejs-high-availability/shared-resources.json b/mongodb-nodejs-high-availability/shared-resources.json index 57792d4da6ff..c004a4b3ae1c 100644 --- a/mongodb-nodejs-high-availability/shared-resources.json +++ b/mongodb-nodejs-high-availability/shared-resources.json @@ -19,6 +19,13 @@ "metadata": { "Description": "Network settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -26,7 +33,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[concat(parameters('storageSettings').vhdStorageAccountName, copyindex())]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "storageAccountsLoop", "count": "[parameters('storageSettings').storageAccountCount]" @@ -39,14 +46,14 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('commonSettings').availabilitySetName]", - "location": "[resourceGroup().location]", - "properties": { } + "location": "[parameters('location')]", + "properties": {} }, { "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[concat(parameters('networkSettings').virtualNetworkName)]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -64,4 +71,4 @@ } } ] -} \ No newline at end of file +} diff --git a/mongodb-on-centos/azuredeploy.json b/mongodb-on-centos/azuredeploy.json index 77d8601c781a..a1fea4c83137 100644 --- a/mongodb-on-centos/azuredeploy.json +++ b/mongodb-on-centos/azuredeploy.json @@ -63,8 +63,7 @@ }, "vmName": { "type": "string", - "defaultValue": "myLinuxVM" - , + "defaultValue": "myLinuxVM", "metadata": { "description": "Name of the VM" } @@ -82,6 +81,13 @@ "metadata": { "description": "Name of the virtual network adapter" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -101,7 +107,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -110,7 +116,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -122,7 +128,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -149,7 +155,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" @@ -175,7 +181,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]" @@ -218,7 +224,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/installmongo')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], diff --git a/mongodb-on-ubuntu/azuredeploy.json b/mongodb-on-ubuntu/azuredeploy.json index 989226d22a02..6f1f198b136a 100644 --- a/mongodb-on-ubuntu/azuredeploy.json +++ b/mongodb-on-ubuntu/azuredeploy.json @@ -50,14 +50,14 @@ "vmSize": { "type": "string", "defaultValue": "Standard_A0", - "metadata": { + "metadata": { "description": "VM Size" } }, "publicIPAddressName": { "type": "string", "defaultValue": "myPublicIP", - "metadata": { + "metadata": { "description": "Public IP Address Name" } }, @@ -71,7 +71,7 @@ "virtualNetworkName": { "type": "string", "defaultValue": "myVNET", - "metadata": { + "metadata": { "description": "Virtual Network Name" } }, @@ -81,6 +81,13 @@ "metadata": { "description": "NIC Name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -100,7 +107,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -109,7 +116,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -121,7 +128,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -148,7 +155,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" @@ -174,7 +181,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]" @@ -217,7 +224,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/installmongo')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], diff --git a/mongodb-replica-set-centos/azuredeploy.json b/mongodb-replica-set-centos/azuredeploy.json index b90482d01bb7..cd7b781b9f71 100644 --- a/mongodb-replica-set-centos/azuredeploy.json +++ b/mongodb-replica-set-centos/azuredeploy.json @@ -121,6 +121,13 @@ "metadata": { "description": "The zabbix server IP which will monitor the mongodb nodes' mongodb status. Null means no zabbix server." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -339,4 +346,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mongodb-replica-set-centos/nested/disksSelector.json b/mongodb-replica-set-centos/nested/disksSelector.json index 411c4aab757d..0b78badc4e93 100644 --- a/mongodb-replica-set-centos/nested/disksSelector.json +++ b/mongodb-replica-set-centos/nested/disksSelector.json @@ -52,6 +52,13 @@ "metadata": { "description": "Size of the data disks" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -934,4 +941,3 @@ } } } - diff --git a/mongodb-replica-set-centos/nested/primary-resources.json b/mongodb-replica-set-centos/nested/primary-resources.json index ccef51e3834c..a4adbf4ff6f3 100644 --- a/mongodb-replica-set-centos/nested/primary-resources.json +++ b/mongodb-replica-set-centos/nested/primary-resources.json @@ -52,6 +52,13 @@ }, "staticIp": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -65,7 +72,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -131,7 +138,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'PublicIp')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -143,7 +150,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), parameters('vmbasename'), 'PublicIp')]" ], @@ -172,7 +179,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]" ], @@ -251,7 +258,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/primaryInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], @@ -270,4 +277,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mongodb-replica-set-centos/nested/secondary-resources.json b/mongodb-replica-set-centos/nested/secondary-resources.json index 32294884755a..eb2e82a642f7 100644 --- a/mongodb-replica-set-centos/nested/secondary-resources.json +++ b/mongodb-replica-set-centos/nested/secondary-resources.json @@ -40,6 +40,13 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -53,7 +60,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -62,7 +69,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -128,7 +135,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'PublicIp')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -140,7 +147,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), parameters('vmbasename'), 'PublicIp')]" ], @@ -168,7 +175,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" @@ -248,7 +255,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/secondaryInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), parameters('vmbasename'), 'vm')]", "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" @@ -268,4 +275,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mongodb-replica-set-centos/nested/shared-resources.json b/mongodb-replica-set-centos/nested/shared-resources.json index d821717639cb..ec4e723e289f 100644 --- a/mongodb-replica-set-centos/nested/shared-resources.json +++ b/mongodb-replica-set-centos/nested/shared-resources.json @@ -13,6 +13,13 @@ "metadata": { "Description": "namespace" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -24,7 +31,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -33,14 +40,14 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[concat(parameters('namespace'), 'set')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -58,4 +65,4 @@ } } ] -} \ No newline at end of file +} diff --git a/mongodb-sharding-centos/azuredeploy.json b/mongodb-sharding-centos/azuredeploy.json index d5c9fdc309d3..045f495d8b9e 100644 --- a/mongodb-sharding-centos/azuredeploy.json +++ b/mongodb-sharding-centos/azuredeploy.json @@ -169,6 +169,13 @@ "metadata": { "description": "The zabbix server IP which will monitor the mongodb nodes' mongodb status. Null means no zabbix server." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -922,4 +929,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mongodb-sharding-centos/nested/config-primary-resources.json b/mongodb-sharding-centos/nested/config-primary-resources.json index b1afdbc23afd..7044f8b70a60 100644 --- a/mongodb-sharding-centos/nested/config-primary-resources.json +++ b/mongodb-sharding-centos/nested/config-primary-resources.json @@ -34,11 +34,17 @@ }, "staticIp": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "apiVersion": "2015-06-15", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, @@ -47,7 +53,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -113,7 +119,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -136,7 +142,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]" ], @@ -173,7 +179,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/configPrimaryInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], @@ -192,4 +198,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mongodb-sharding-centos/nested/config-secondary-resources.json b/mongodb-sharding-centos/nested/config-secondary-resources.json index b6f20cb92e72..1aa7d7001c2f 100644 --- a/mongodb-sharding-centos/nested/config-secondary-resources.json +++ b/mongodb-sharding-centos/nested/config-secondary-resources.json @@ -28,12 +28,18 @@ }, "staticIp": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, "resources": [ @@ -41,7 +47,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -107,7 +113,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -130,7 +136,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" ], @@ -167,7 +173,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/configSecondaryInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), parameters('vmbasename'), 'vm')]", "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" @@ -187,4 +193,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mongodb-sharding-centos/nested/disksSelector.json b/mongodb-sharding-centos/nested/disksSelector.json index 411c4aab757d..0b78badc4e93 100644 --- a/mongodb-sharding-centos/nested/disksSelector.json +++ b/mongodb-sharding-centos/nested/disksSelector.json @@ -52,6 +52,13 @@ "metadata": { "description": "Size of the data disks" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -934,4 +941,3 @@ } } } - diff --git a/mongodb-sharding-centos/nested/replica-primary-resources.json b/mongodb-sharding-centos/nested/replica-primary-resources.json index 5110a092acd7..c570da3b0a1d 100644 --- a/mongodb-sharding-centos/nested/replica-primary-resources.json +++ b/mongodb-sharding-centos/nested/replica-primary-resources.json @@ -49,11 +49,17 @@ }, "staticIp": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "apiVersion": "2015-06-15", "storageAccountName": "[concat(uniquestring(resourceGroup().id), parameters('storageAccountBasename'))]", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, @@ -62,7 +68,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -97,7 +103,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -163,7 +169,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -186,7 +192,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]", @@ -226,7 +232,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/replicaPrimaryInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], @@ -245,4 +251,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mongodb-sharding-centos/nested/replica-secondary-resources.json b/mongodb-sharding-centos/nested/replica-secondary-resources.json index 8ad2b76e891a..725036bc79a4 100644 --- a/mongodb-sharding-centos/nested/replica-secondary-resources.json +++ b/mongodb-sharding-centos/nested/replica-secondary-resources.json @@ -40,12 +40,18 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", "storageAccountName": "[concat(uniquestring(resourceGroup().id), parameters('storageAccountBasename'))]", - "apiVersion": "2015-06-15", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, "resources": [ @@ -53,7 +59,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -88,7 +94,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -154,7 +160,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -176,7 +182,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]", @@ -216,7 +222,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/replicaSecondaryInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), parameters('vmbasename'), 'vm')]", "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" @@ -236,4 +242,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mongodb-sharding-centos/nested/router1-resources.json b/mongodb-sharding-centos/nested/router1-resources.json index c6cca9e12b4f..70199d15867f 100644 --- a/mongodb-sharding-centos/nested/router1-resources.json +++ b/mongodb-sharding-centos/nested/router1-resources.json @@ -37,11 +37,17 @@ }, "staticIp": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "apiVersion": "2015-06-15", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, @@ -50,7 +56,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -116,7 +122,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'PublicIp')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -128,7 +134,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), parameters('vmbasename'), 'PublicIp')]" ], @@ -157,7 +163,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]" ], @@ -194,7 +200,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/router1Install')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], @@ -213,4 +219,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mongodb-sharding-centos/nested/router2-resources.json b/mongodb-sharding-centos/nested/router2-resources.json index 13dea61e8b49..8abf3db0c41c 100644 --- a/mongodb-sharding-centos/nested/router2-resources.json +++ b/mongodb-sharding-centos/nested/router2-resources.json @@ -31,11 +31,17 @@ }, "staticIp": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "apiVersion": "2015-06-15", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, @@ -44,7 +50,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -110,7 +116,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'PublicIp')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -122,7 +128,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), parameters('vmbasename'), 'PublicIp')]" ], @@ -151,7 +157,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]" ], @@ -188,7 +194,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/router2Install')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], @@ -207,4 +213,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mongodb-sharding-centos/nested/shared-resources.json b/mongodb-sharding-centos/nested/shared-resources.json index d821717639cb..da6c300d4717 100644 --- a/mongodb-sharding-centos/nested/shared-resources.json +++ b/mongodb-sharding-centos/nested/shared-resources.json @@ -13,18 +13,24 @@ "metadata": { "Description": "namespace" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15" + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -33,14 +39,14 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[concat(parameters('namespace'), 'set')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -58,4 +64,4 @@ } } ] -} \ No newline at end of file +} diff --git a/moodle-scalable-cluster-ubuntu/azuredeploy.json b/moodle-scalable-cluster-ubuntu/azuredeploy.json index f0eb693eed33..2846e53c7f18 100644 --- a/moodle-scalable-cluster-ubuntu/azuredeploy.json +++ b/moodle-scalable-cluster-ubuntu/azuredeploy.json @@ -1,687 +1,693 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/moodle-scalable-cluster-ubuntu/" - }, - "_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": "" - }, - "applyScriptsSwitch": { - "defaultValue": true, - "metadata": { - "description": "Switch to process or bypass all scripts/extensions" - }, - "type": "bool" - }, - "azureBackupSwitch": { - "defaultValue": false, - "metadata": { - "description": "Switch to configure AzureBackup and enlist VM's" - }, - "type": "bool" - }, - "vnetGwDeploySwitch": { - "defaultValue": false, - "metadata": { - "description": "Switch to deploy a virtual network gateway or not" - }, - "type": "bool" - }, - "installO365pluginsSwitch": { - "defaultValue": false, - "metadata": { - "description": "Switch to install Moodle Office 365 plugins" - }, - "type": "bool" - }, - "installElasticSearchSwitch": { - "defaultValue": false, - "metadata": { - "description": "Switch to install Moodle ElasticSearch plugins & VMs" - }, - "type": "bool" - }, - "storageAccountType": { - "defaultValue": "Standard_LRS", - "allowedValues": [ - "Standard_LRS", - "Standard_GRS", - "Standard_ZRS" - ], - "metadata": { - "description": "Storage Account type" - }, - "type": "string" - }, - "dbServerType": { - "defaultValue": "mysql", - "allowedValues": [ - "mysql", - "postgres" - ], - "metadata": { - "description": "Database type" - }, - "type": "string" - }, - "fileServerType": { - "defaultValue": "gluster", - "allowedValues": [ - "gluster", - "nfs" - ], - "metadata": { - "description": "File server type: GlusterFS, Azure Files (CIFS)--disabled due to too slow perf, NFS--not highly available" - }, - "type": "string" - }, - "webServerType": { - "defaultValue": "apache", - "allowedValues": [ - "apache", - "nginx" - ], - "metadata": { - "description": "Web server type" - }, - "type": "string" - }, - "controllerVmSku": { - "defaultValue": "Standard_DS1_v2", - "metadata": { - "description": "VM size for the controller node" - }, - "type": "string" - }, - "autoscaleVmSku": { - "defaultValue": "Standard_DS2_v2", - "metadata": { - "description": "VM size for autoscaled nodes" - }, - "type": "string" - }, - "autoscaleVmCount": { - "defaultValue": 10, - "metadata": { - "description": "Maximum number of autoscaled nodes" - }, - "type": "int" - }, - "elasticVmSku": { - "defaultValue": "Standard_DS2_v2", - "metadata": { - "description": "VM size for the elastic search nodes" - }, - "type": "string" - }, - "firewallRuleName": { - "defaultValue": "open-to-the-world", - "metadata": { - "description": "Database firewall rule name" - }, - "type": "string" - }, - "gatewaySubnet": { - "allowedValues": [ - "GatewaySubnet" - ], - "defaultValue": "GatewaySubnet", - "metadata": { - "description": "name for Virtual network gateway subnet" - }, - "type": "string" - }, - "gatewayType": { - "allowedValues": [ - "Vpn", - "ER" - ], - "defaultValue": "Vpn", - "metadata": { - "description": "Virtual network gateway type" - }, - "type": "string" - }, - "glusterVmSku": { - "defaultValue": "Standard_DS2_v2", - "metadata": { - "description": "VM size for the gluster nodes" - }, - "type": "string" - }, - "fileServerDiskSize": { - "defaultValue": 127, - "metadata": { - "description": "Size per disk for gluster nodes or nfs server" - }, - "type": "int" - }, - "fileServerDiskCount": { - "defaultValue": 4, - "minValue": 2, - "maxValue": 8, - "metadata": { - "description": "Number of disks in raid0 per gluster node or nfs server" - }, - "type": "int" - }, - "moodleVersion": { - "allowedValues": [ - "MOODLE_34_STABLE", - "MOODLE_33_STABLE", - "MOODLE_32_STABLE", - "MOODLE_31_STABLE", - "MOODLE_30_STABLE", - "MOODLE_29_STABLE" - ], - "defaultValue": "MOODLE_34_STABLE", - "metadata": { - "description": "The Moodle version you want to install." - }, - "type": "string" - }, - "dbLogin": { - "defaultValue": "dbadmin", - "metadata": { - "description": "Database admin username" - }, - "type": "string" - }, - "siteURL": { - "defaultValue": "www.example.org", - "metadata": { - "description": "URL for Moodle site" - }, - "type": "string" - }, - "skuCapacityDTU": { - "allowedValues": [ - 50, - 100, - 200, - 400, - 800 - ], - "defaultValue": 50, - "metadata": { - "description": "MySql/Postgresql database trasaction units" - }, - "type": "int" - }, - "skuFamily": { - "allowedValues": [ - "SkuFamily" - ], - "defaultValue": "SkuFamily", - "metadata": { - "description": "MySql/Postgresql sku family" - }, - "type": "string" - }, - "skuName": { - "allowedValues": [ - "PGSQLB50", - "PGSQLB100", - "PGSQLS100", - "PGSQLS200", - "PGSQLS400", - "PGSQLS800", - "MYSQLB50", - "MYSQLB100", - "MYSQLS100", - "MYSQLS200", - "MYSQLS400", - "MYSQLS800" - ], - "defaultValue": "MYSQLB50", - "metadata": { - "description": "MySql/Postgresql sku name" - }, - "type": "string" - }, - "skuSizeMB": { - "defaultValue": 51200, - "metadata": { - "description": "MySql/Postgresql sku size in MB. For Basic tier, minimum 50GB, increased by 125GB up to 1TB. For Standard tier, minimum 125GB, increase by 125GB up to 1TB" - }, - "type": "int" - }, - "skuTier": { - "allowedValues": [ - "Basic", - "Standard" - ], - "defaultValue": "Basic", - "metadata": { - "description": "MySql/Postgresql sku tier" - }, - "type": "string" - }, - "sshPublicKey": { - "metadata": { - "description": "ssh public key" - }, - "type": "string" - }, - "sshUsername": { - "defaultValue": "azureadmin", - "metadata": { - "description": "ssh user name" - }, - "type": "string" - }, - "sslEnforcement": { - "allowedValues": [ - "Disabled", - "Enabled" - ], - "defaultValue": "Disabled", - "metadata": { - "description": "MySql/Postgresql SSL connection" - }, - "type": "string" - }, - "postgresVersion": { - "allowedValues": [ - "9.5", - "9.6" - ], - "defaultValue": "9.6", - "metadata": { - "description": "Postgresql version" - }, - "type": "string" - }, - "mysqlVersion": { - "allowedValues": [ - "5.6", - "5.7" - ], - "defaultValue": "5.7", - "metadata": { - "description": "Mysql version" - }, - "type": "string" - }, - "vNetAddressSpace": { - "defaultValue": "172.31.0.0", - "metadata": { - "description": "Address range for the Moodle virtual network - presumed /16 - further subneting during vnet creation" - }, - "type": "string" - }, - "vpnType": { - "allowedValues": [ - "RouteBased", - "PolicyBased" - ], - "defaultValue": "RouteBased", - "metadata": { - "description": "Virtual network gateway vpn type" - }, - "type": "string" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/moodle-scalable-cluster-ubuntu/" + }, + "_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": "" + }, + "applyScriptsSwitch": { + "defaultValue": true, + "metadata": { + "description": "Switch to process or bypass all scripts/extensions" + }, + "type": "bool" + }, + "azureBackupSwitch": { + "defaultValue": false, + "metadata": { + "description": "Switch to configure AzureBackup and enlist VM's" + }, + "type": "bool" + }, + "vnetGwDeploySwitch": { + "defaultValue": false, + "metadata": { + "description": "Switch to deploy a virtual network gateway or not" + }, + "type": "bool" + }, + "installO365pluginsSwitch": { + "defaultValue": false, + "metadata": { + "description": "Switch to install Moodle Office 365 plugins" + }, + "type": "bool" + }, + "installElasticSearchSwitch": { + "defaultValue": false, + "metadata": { + "description": "Switch to install Moodle ElasticSearch plugins & VMs" + }, + "type": "bool" + }, + "storageAccountType": { + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_ZRS" + ], + "metadata": { + "description": "Storage Account type" + }, + "type": "string" + }, + "dbServerType": { + "defaultValue": "mysql", + "allowedValues": [ + "mysql", + "postgres" + ], + "metadata": { + "description": "Database type" + }, + "type": "string" + }, + "fileServerType": { + "defaultValue": "gluster", + "allowedValues": [ + "gluster", + "nfs" + ], + "metadata": { + "description": "File server type: GlusterFS, Azure Files (CIFS)--disabled due to too slow perf, NFS--not highly available" + }, + "type": "string" + }, + "webServerType": { + "defaultValue": "apache", + "allowedValues": [ + "apache", + "nginx" + ], + "metadata": { + "description": "Web server type" + }, + "type": "string" + }, + "controllerVmSku": { + "defaultValue": "Standard_DS1_v2", + "metadata": { + "description": "VM size for the controller node" + }, + "type": "string" + }, + "autoscaleVmSku": { + "defaultValue": "Standard_DS2_v2", + "metadata": { + "description": "VM size for autoscaled nodes" + }, + "type": "string" + }, + "autoscaleVmCount": { + "defaultValue": 10, + "metadata": { + "description": "Maximum number of autoscaled nodes" + }, + "type": "int" + }, + "elasticVmSku": { + "defaultValue": "Standard_DS2_v2", + "metadata": { + "description": "VM size for the elastic search nodes" + }, + "type": "string" + }, + "firewallRuleName": { + "defaultValue": "open-to-the-world", + "metadata": { + "description": "Database firewall rule name" + }, + "type": "string" + }, + "gatewaySubnet": { + "allowedValues": [ + "GatewaySubnet" + ], + "defaultValue": "GatewaySubnet", + "metadata": { + "description": "name for Virtual network gateway subnet" + }, + "type": "string" + }, + "gatewayType": { + "allowedValues": [ + "Vpn", + "ER" + ], + "defaultValue": "Vpn", + "metadata": { + "description": "Virtual network gateway type" + }, + "type": "string" + }, + "glusterVmSku": { + "defaultValue": "Standard_DS2_v2", + "metadata": { + "description": "VM size for the gluster nodes" + }, + "type": "string" + }, + "fileServerDiskSize": { + "defaultValue": 127, + "metadata": { + "description": "Size per disk for gluster nodes or nfs server" + }, + "type": "int" + }, + "fileServerDiskCount": { + "defaultValue": 4, + "minValue": 2, + "maxValue": 8, + "metadata": { + "description": "Number of disks in raid0 per gluster node or nfs server" + }, + "type": "int" + }, + "moodleVersion": { + "allowedValues": [ + "MOODLE_34_STABLE", + "MOODLE_33_STABLE", + "MOODLE_32_STABLE", + "MOODLE_31_STABLE", + "MOODLE_30_STABLE", + "MOODLE_29_STABLE" + ], + "defaultValue": "MOODLE_34_STABLE", + "metadata": { + "description": "The Moodle version you want to install." + }, + "type": "string" + }, + "dbLogin": { + "defaultValue": "dbadmin", + "metadata": { + "description": "Database admin username" + }, + "type": "string" + }, + "siteURL": { + "defaultValue": "www.example.org", + "metadata": { + "description": "URL for Moodle site" + }, + "type": "string" + }, + "skuCapacityDTU": { + "allowedValues": [ + 50, + 100, + 200, + 400, + 800 + ], + "defaultValue": 50, + "metadata": { + "description": "MySql/Postgresql database trasaction units" + }, + "type": "int" + }, + "skuFamily": { + "allowedValues": [ + "SkuFamily" + ], + "defaultValue": "SkuFamily", + "metadata": { + "description": "MySql/Postgresql sku family" + }, + "type": "string" + }, + "skuName": { + "allowedValues": [ + "PGSQLB50", + "PGSQLB100", + "PGSQLS100", + "PGSQLS200", + "PGSQLS400", + "PGSQLS800", + "MYSQLB50", + "MYSQLB100", + "MYSQLS100", + "MYSQLS200", + "MYSQLS400", + "MYSQLS800" + ], + "defaultValue": "MYSQLB50", + "metadata": { + "description": "MySql/Postgresql sku name" + }, + "type": "string" + }, + "skuSizeMB": { + "defaultValue": 51200, + "metadata": { + "description": "MySql/Postgresql sku size in MB. For Basic tier, minimum 50GB, increased by 125GB up to 1TB. For Standard tier, minimum 125GB, increase by 125GB up to 1TB" + }, + "type": "int" + }, + "skuTier": { + "allowedValues": [ + "Basic", + "Standard" + ], + "defaultValue": "Basic", + "metadata": { + "description": "MySql/Postgresql sku tier" + }, + "type": "string" + }, + "sshPublicKey": { + "metadata": { + "description": "ssh public key" + }, + "type": "string" + }, + "sshUsername": { + "defaultValue": "azureadmin", + "metadata": { + "description": "ssh user name" + }, + "type": "string" + }, + "sslEnforcement": { + "allowedValues": [ + "Disabled", + "Enabled" + ], + "defaultValue": "Disabled", + "metadata": { + "description": "MySql/Postgresql SSL connection" + }, + "type": "string" + }, + "postgresVersion": { + "allowedValues": [ + "9.5", + "9.6" + ], + "defaultValue": "9.6", + "metadata": { + "description": "Postgresql version" + }, + "type": "string" + }, + "mysqlVersion": { + "allowedValues": [ + "5.6", + "5.7" + ], + "defaultValue": "5.7", + "metadata": { + "description": "Mysql version" + }, + "type": "string" + }, + "vNetAddressSpace": { + "defaultValue": "172.31.0.0", + "metadata": { + "description": "Address range for the Moodle virtual network - presumed /16 - further subneting during vnet creation" + }, + "type": "string" + }, + "vpnType": { + "allowedValues": [ + "RouteBased", + "PolicyBased" + ], + "defaultValue": "RouteBased", + "metadata": { + "description": "Virtual network gateway vpn type" + }, + "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "name": "pid-738e3eec-68d4-4667-8377-c05c77c21f1b", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] } + } }, - "resources": [ - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "name": "pid-738e3eec-68d4-4667-8377-c05c77c21f1b", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "name": "dbTemplate", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[variables('moodleCommon')]" - } - }, - "templateLink": { - "uri": "[concat(variables('moodleCommon').baseTemplateUrl, parameters('dbServerType'), '.json', parameters('_artifactsLocationSasToken'))]" - } - } - }, - { - "condition": "[parameters('azureBackupSwitch')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "name": "recoveryTemplate", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[variables('moodleCommon')]" - } - }, - "templateLink": { - "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'recoveryservices.json',parameters('_artifactsLocationSasToken'))]" - } - } - }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "name": "redisTemplate", - "dependsOn": [ - "Microsoft.Resources/deployments/networkTemplate" - ], - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[variables('moodleCommon')]" - } - }, - "templateLink": { - "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'redis.json',parameters('_artifactsLocationSasToken'))]" - } - } - }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "name": "networkTemplate", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[variables('moodleCommon')]" - } - }, - "templateLink": { - "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'network.json',parameters('_artifactsLocationSasToken'))]" - } - } - }, - { - "condition": "[parameters('installElasticSearchSwitch')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "Microsoft.Resources/deployments/networkTemplate", - "Microsoft.Resources/deployments/recoveryTemplate" - ], - "name": "elasticTemplate", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[variables('moodleCommon')]" - } - }, - "templateLink": { - "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'elastic.json',parameters('_artifactsLocationSasToken'))]" - } - } - }, - { - "condition": "[equals(parameters('fileServerType'),'gluster')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "Microsoft.Resources/deployments/networkTemplate", - "Microsoft.Resources/deployments/recoveryTemplate" - ], - "name": "glusterTemplate", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[variables('moodleCommon')]" - } - }, - "templateLink": { - "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'gluster.json',parameters('_artifactsLocationSasToken'))]" - } - } - }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "Microsoft.Resources/deployments/elasticTemplate", - "Microsoft.Resources/deployments/glusterTemplate", - "Microsoft.Resources/deployments/recoveryTemplate", - "Microsoft.Resources/deployments/redisTemplate", - "Microsoft.Resources/deployments/storageAccountTemplate" - ], - "name": "controllerTemplate", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[variables('moodleCommon')]" - } - }, - "templateLink": { - "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'controller.json',parameters('_artifactsLocationSasToken'))]" - } - } - }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "Microsoft.Resources/deployments/controllerTemplate", - "Microsoft.Resources/deployments/redisTemplate", - "Microsoft.Resources/deployments/dbTemplate" - ], - "name": "scaleSetTemplate", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[variables('moodleCommon')]" - } - }, - "templateLink": { - "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'webvmss.json',parameters('_artifactsLocationSasToken'))]" - } - } - }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "name": "storageAccountTemplate", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[variables('moodleCommon')]" - } - }, - "templateLink": { - "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'storageAccount.json',parameters('_artifactsLocationSasToken'))]" - } - } + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "name": "dbTemplate", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[variables('moodleCommon')]" + } + }, + "templateLink": { + "uri": "[concat(variables('moodleCommon').baseTemplateUrl, parameters('dbServerType'), '.json', parameters('_artifactsLocationSasToken'))]" } - ], - "outputs": { - "siteURL": { - "type": "string", - "value": "[variables('moodleCommon').siteURL]" - }, - "controllerInstanceIP": { - "type": "string", - "value": "[reference('controllerTemplate').outputs.controllerIP.value]" - }, - "databaseDNS": { - "type": "string", - "value": "[concat(variables('moodleCommon').dbServerType, '-', variables('moodleCommon').resourcesPrefix, '.', variables('moodleCommon').dbServerType, '.database.azure.com')]" - }, - "databaseAdminUsername": { - "type": "string", - "value": "[variables('moodleCommon').dbUsername]" - }, - "databaseAdminPassword": { - "type": "string", - "value": "[variables('moodleCommon').dbLoginPassword]" - }, - "firstFrontendVmIP": { - "type": "string", - "value": "[reference('scaleSetTemplate').outputs.webvm1IP.value]" - }, - "moodleAdminPassword": { - "type": "string", - "value": "[variables('moodleCommon').moodleAdminPass]" - }, - "moodleDbUsername": { - "type": "string", - "value": "[variables('moodleCommon').moodleDbUserAzure]" - }, - "moodleDbPassword": { - "type": "string", - "value": "[variables('moodleCommon').moodleDbPass]" - }, - "loadBalancerDNS": { - "type": "string", - "value": "[variables('moodleCommon').lbDns]" } }, - "variables": { - "documentation01": "This main-template calls multiple sub-templates to create the moodle system", - "documentation02": " recoveryservices0 - dummy template (see next statement)", - "documentation03": " recoveryservices1 - creates a recovery vault that will be subsequently used by the VM Backup - a paramter swtich controls whethe is is called or bypassed", - "documentation04": " redis - creates a redis cache", - "documentation05": " postgres / mysql - creates a postgresql / mysql server", - "documentation06": " vnet - creates a virtual network with three subnets", - "documentation07": " elastic - creates a elastic search cluster on a vm farm", - "documentation08": " gluster - creates a gluster file system on a vm farm", - "documentation09": " webvmss - creates a vm scale set", - "documentation10": " controller - creates a jumpbox and deploys code", - "documentation11": "GlusterFS Sizing guidance", - "moodleCommon": { - "baseTemplateUrl": "[concat(parameters('_artifactsLocation'), 'nested/')]", - "scriptLocation": "[concat(parameters('_artifactsLocation'), 'scripts/')]", - "artifactsSasToken": "[parameters('_artifactsLocationSasToken')]", - - "applyScriptsSwitch": "[parameters('applyScriptsSwitch')]", - "autoscaleVmCount": "[parameters('autoscaleVmCount')]", - "autoscaleVmSku": "[parameters('autoscaleVmSku')]", - "azureBackupSwitch": "[parameters( 'azureBackupSwitch')]", - "commonFunctionsScriptUri": "[concat(parameters('_artifactsLocation'),'scripts/helper_functions.sh',parameters('_artifactsLocationSasToken'))]", - "controllerVmSku": "[parameters('controllerVmSku')]", - "dbLogin": "[parameters('dbLogin')]", - "dbLoginPassword": "[concat(substring(uniqueString(resourceGroup().id, deployment().name), 2, 11), '*7', toUpper('pfiwb'))]", - "dbServerType": "[parameters('dbServerType')]", - "dbUsername": "[concat(parameters('dbLogin'), '@', parameters('dbServerType'), '-', variables('resourceprefix'))]", - "elasticVmSku": "[parameters('elasticVmSku')]", - "elasticAvailabilitySetName": "[concat('elastic-avset-',variables('resourceprefix'))]", - "elasticClusterName": "[concat('es-cluster-',variables('resourceprefix'))]", - "elasticNicName1": "[concat('elastic-vm-nic-01-',variables('resourceprefix'))]", - "elasticNicName2": "[concat('elastic-vm-nic-02-',variables('resourceprefix'))]", - "elasticNicName3": "[concat('elastic-vm-nic-03-',variables('resourceprefix'))]", - "elasticScriptFilename": "install_elastic.sh", - "elasticVm1IP": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),4)), '.20')]", - "elasticVm2IP": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),4)), '.21')]", - "elasticVm3IP": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),4)), '.22')]", - "elasticVmName": "[concat('elastic-vm-',variables('resourceprefix'))]", - "elasticVmName1": "[concat('elastic-vm-01-',variables('resourceprefix'))]", - "elasticVmName2": "[concat('elastic-vm-02-',variables('resourceprefix'))]", - "elasticVmName3": "[concat('elastic-vm-03-',variables('resourceprefix'))]", - "extBeName": "[concat('lb-backend-',variables('resourceprefix'))]", - "extFeName": "[concat('lb-frontend-',variables('resourceprefix'))]", - "extNatPool": "[concat('lb-natpool-',variables('resourceprefix'))]", - "extProbe": "[concat('lb-probe-',variables('resourceprefix'))]", - "fileServerDiskCount": "[parameters('fileServerDiskCount')]", - "fileServerDiskSize": "[parameters('fileServerDiskSize')]", - "fileServerType": "[parameters('fileServerType')]", - "firewallRuleName": "[parameters('firewallRuleName')]", - "gatewayName": "[concat('vnet-gateway-',variables('resourceprefix'))]", - "gatewayPublicIPName": "[concat('vnet-gw-ip-',variables('resourceprefix'))]", - "gatewaySubnet": "[parameters('gatewaySubnet')]", - "gatewaySubnetPrefix": "[concat(variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),2)))]", - "gatewaySubnetRange": "[concat(variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),2)), '.0/24')]", - "gatewayType": "[parameters('gatewayType')]", - "gfsNameRoot": "[concat('gluster-vm-',variables('resourceprefix'))]", - "gfxAvailabilitySetName": "[concat('gluster-avset-',variables('resourceprefix'))]", - "glusterScriptFilename": "install_gluster.sh", - "glusterVmCount": 2, - "glusterVmSku": "[parameters('glusterVmSku')]", - "installO365pluginsSwitch": "[parameters('installO365pluginsSwitch')]", - "installElasticSearchSwitch": "[parameters('installElasticSearchSwitch')]", - "jboxNicName": "[concat('jumpbox-vm-nic-',variables('resourceprefix'))]", - "jboxNsgName": "[concat('jumpbox-nsg-',variables('resourceprefix'))]", - "jboxPipName": "[concat('jumpbox-pubip-',variables('resourceprefix'))]", - "jboxVmName": "[concat('jumpbox-vm-',variables('resourceprefix'))]", - "lbDns": "[concat('lb-',variables('resourceprefix'),'.',resourceGroup().location,'.cloudapp.azure.com')]", - "lbName": "[concat('lb-',variables('resourceprefix'))]", - "lbPipName": "[concat('lb-pubip-',variables('resourceprefix'))]", - "moodleAdminPass": "[concat(toUpper('xl'), substring(uniqueString(resourceGroup().id, deployment().name), 6, 7),',1*8')]", - "moodleDbName": "moodle", - "moodleDbPass": "[concat('9#36^', substring(uniqueString(resourceGroup().id, deployment().name), 5, 8), toUpper('ercq'))]", - "moodleDbUser": "moodle", - "moodleDbUserAzure": "[concat('moodle', '@', parameters('dbServerType'), '-', variables('resourceprefix'))]", - "moodleInstallScriptFilename": "install_moodle.sh", - "moodleVersion": "[parameters('moodleVersion')]", - "mysqlVersion": "[parameters('mysqlVersion')]", - "osType": { - "offer": "UbuntuServer", - "publisher": "Canonical", - "sku": "16.04-LTS", - "version": "latest" - }, - "policyName": "[concat('policy-',variables('resourceprefix'))]", - "postgresVersion": "[parameters('postgresVersion')]", - "redisCacheName": "[concat('redis-',variables('resourceprefix'))]", - "redisDns": "[concat('redis-',variables('resourceprefix'),'.redis.cache.windows.net')]", - "resourcesPrefix": "[variables('resourceprefix')]", - "serverName": "[concat(parameters('dbServerType'), '-',variables('resourceprefix'))]", - "siteURL": "[if(or(empty(parameters('siteURL')), equals(parameters('siteURL'), 'www.example.org')), concat('lb-',variables('resourceprefix'),'.',resourceGroup().location,'.cloudapp.azure.com'), parameters('siteURL'))]", - "skuCapacityDTU": "[parameters('skuCapacityDTU')]", - "skuFamily": "[parameters('skuFamily')]", - "skuName": "[parameters('skuName')]", - "skuSizeMB": "[parameters('skuSizeMB')]", - "skuTier": "[parameters('skuTier')]", - "sshPublicKey": "[parameters('sshPublicKey')]", - "sshUsername": "[parameters('sshUsername')]", - "sslEnforcement": "[parameters('sslEnforcement')]", - "storageAccountName": "[tolower(concat('abs',variables('resourceprefix')))]", - "storageAccountType": "[parameters('storageAccountType')]", - "subnetElastic": "[concat('elastic-subnet-',variables('resourceprefix'))]", - "subnetElasticPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),4)))]", - "subnetElasticRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),4)), '.0/24')]", - "subnetRedis": "[concat('redis-subnet-',variables('resourceprefix'))]", - "subnetRedisPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),3)))]", - "subnetRedisRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),3)), '.0/24')]", - "subnetSan": "[concat('san-subnet-',variables('resourceprefix'))]", - "subnetSanPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),1)))]", - "subnetSanRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),1)), '.0/24')]", - "subnetWeb": "[concat('web-subnet-',variables('resourceprefix'))]", - "subnetWebPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),0)))]", - "subnetWebRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),0)), '.0/24')]", - "vNetAddressSpace": "[parameters('vNetAddressSpace')]", - "vaultName": "[concat('vault-',variables('resourceprefix'))]", - "vmssName": "[concat('vmss-',variables('resourceprefix'))]", - "vmssdStorageAccounttName": "[concat('vmss',uniqueString(resourceGroup().id))]", - "vnetGwDeploySwitch": "[parameters('vnetGwDeploySwitch')]", - "vnetName": "[concat('vnet-',variables('resourceprefix'))]", - "vpnType": "[parameters('vpnType')]", - "webServerSetupScriptFilename": "setup_webserver.sh", - "webServerType": "[parameters('webServerType')]" - }, - "octets": "[split(parameters('vNetAddressSpace'), '.')]", - "resourceprefix": "[substring(uniqueString(resourceGroup().id, deployment().name), 3, 6)]" + { + "condition": "[parameters('azureBackupSwitch')]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "name": "recoveryTemplate", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[variables('moodleCommon')]" + } + }, + "templateLink": { + "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'recoveryservices.json',parameters('_artifactsLocationSasToken'))]" + } + } + }, + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "name": "redisTemplate", + "dependsOn": [ + "Microsoft.Resources/deployments/networkTemplate" + ], + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[variables('moodleCommon')]" + } + }, + "templateLink": { + "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'redis.json',parameters('_artifactsLocationSasToken'))]" + } + } + }, + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "name": "networkTemplate", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[variables('moodleCommon')]" + } + }, + "templateLink": { + "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'network.json',parameters('_artifactsLocationSasToken'))]" + } + } + }, + { + "condition": "[parameters('installElasticSearchSwitch')]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "Microsoft.Resources/deployments/networkTemplate", + "Microsoft.Resources/deployments/recoveryTemplate" + ], + "name": "elasticTemplate", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[variables('moodleCommon')]" + } + }, + "templateLink": { + "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'elastic.json',parameters('_artifactsLocationSasToken'))]" + } + } + }, + { + "condition": "[equals(parameters('fileServerType'),'gluster')]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "Microsoft.Resources/deployments/networkTemplate", + "Microsoft.Resources/deployments/recoveryTemplate" + ], + "name": "glusterTemplate", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[variables('moodleCommon')]" + } + }, + "templateLink": { + "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'gluster.json',parameters('_artifactsLocationSasToken'))]" + } + } + }, + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "Microsoft.Resources/deployments/elasticTemplate", + "Microsoft.Resources/deployments/glusterTemplate", + "Microsoft.Resources/deployments/recoveryTemplate", + "Microsoft.Resources/deployments/redisTemplate", + "Microsoft.Resources/deployments/storageAccountTemplate" + ], + "name": "controllerTemplate", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[variables('moodleCommon')]" + } + }, + "templateLink": { + "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'controller.json',parameters('_artifactsLocationSasToken'))]" + } + } + }, + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "Microsoft.Resources/deployments/controllerTemplate", + "Microsoft.Resources/deployments/redisTemplate", + "Microsoft.Resources/deployments/dbTemplate" + ], + "name": "scaleSetTemplate", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[variables('moodleCommon')]" + } + }, + "templateLink": { + "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'webvmss.json',parameters('_artifactsLocationSasToken'))]" + } + } + }, + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "name": "storageAccountTemplate", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[variables('moodleCommon')]" + } + }, + "templateLink": { + "uri": "[concat(variables('moodleCommon').baseTemplateUrl,'storageAccount.json',parameters('_artifactsLocationSasToken'))]" + } + } } + ], + "outputs": { + "siteURL": { + "type": "string", + "value": "[variables('moodleCommon').siteURL]" + }, + "controllerInstanceIP": { + "type": "string", + "value": "[reference('controllerTemplate').outputs.controllerIP.value]" + }, + "databaseDNS": { + "type": "string", + "value": "[concat(variables('moodleCommon').dbServerType, '-', variables('moodleCommon').resourcesPrefix, '.', variables('moodleCommon').dbServerType, '.database.azure.com')]" + }, + "databaseAdminUsername": { + "type": "string", + "value": "[variables('moodleCommon').dbUsername]" + }, + "databaseAdminPassword": { + "type": "string", + "value": "[variables('moodleCommon').dbLoginPassword]" + }, + "firstFrontendVmIP": { + "type": "string", + "value": "[reference('scaleSetTemplate').outputs.webvm1IP.value]" + }, + "moodleAdminPassword": { + "type": "string", + "value": "[variables('moodleCommon').moodleAdminPass]" + }, + "moodleDbUsername": { + "type": "string", + "value": "[variables('moodleCommon').moodleDbUserAzure]" + }, + "moodleDbPassword": { + "type": "string", + "value": "[variables('moodleCommon').moodleDbPass]" + }, + "loadBalancerDNS": { + "type": "string", + "value": "[variables('moodleCommon').lbDns]" + } + }, + "variables": { + "documentation01": "This main-template calls multiple sub-templates to create the moodle system", + "documentation02": " recoveryservices0 - dummy template (see next statement)", + "documentation03": " recoveryservices1 - creates a recovery vault that will be subsequently used by the VM Backup - a paramter swtich controls whethe is is called or bypassed", + "documentation04": " redis - creates a redis cache", + "documentation05": " postgres / mysql - creates a postgresql / mysql server", + "documentation06": " vnet - creates a virtual network with three subnets", + "documentation07": " elastic - creates a elastic search cluster on a vm farm", + "documentation08": " gluster - creates a gluster file system on a vm farm", + "documentation09": " webvmss - creates a vm scale set", + "documentation10": " controller - creates a jumpbox and deploys code", + "documentation11": "GlusterFS Sizing guidance", + "moodleCommon": { + "baseTemplateUrl": "[concat(parameters('_artifactsLocation'), 'nested/')]", + "scriptLocation": "[concat(parameters('_artifactsLocation'), 'scripts/')]", + "artifactsSasToken": "[parameters('_artifactsLocationSasToken')]", + "applyScriptsSwitch": "[parameters('applyScriptsSwitch')]", + "autoscaleVmCount": "[parameters('autoscaleVmCount')]", + "autoscaleVmSku": "[parameters('autoscaleVmSku')]", + "azureBackupSwitch": "[parameters( 'azureBackupSwitch')]", + "commonFunctionsScriptUri": "[concat(parameters('_artifactsLocation'),'scripts/helper_functions.sh',parameters('_artifactsLocationSasToken'))]", + "controllerVmSku": "[parameters('controllerVmSku')]", + "dbLogin": "[parameters('dbLogin')]", + "dbLoginPassword": "[concat(substring(uniqueString(resourceGroup().id, deployment().name), 2, 11), '*7', toUpper('pfiwb'))]", + "dbServerType": "[parameters('dbServerType')]", + "dbUsername": "[concat(parameters('dbLogin'), '@', parameters('dbServerType'), '-', variables('resourceprefix'))]", + "elasticVmSku": "[parameters('elasticVmSku')]", + "elasticAvailabilitySetName": "[concat('elastic-avset-',variables('resourceprefix'))]", + "elasticClusterName": "[concat('es-cluster-',variables('resourceprefix'))]", + "elasticNicName1": "[concat('elastic-vm-nic-01-',variables('resourceprefix'))]", + "elasticNicName2": "[concat('elastic-vm-nic-02-',variables('resourceprefix'))]", + "elasticNicName3": "[concat('elastic-vm-nic-03-',variables('resourceprefix'))]", + "elasticScriptFilename": "install_elastic.sh", + "elasticVm1IP": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),4)), '.20')]", + "elasticVm2IP": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),4)), '.21')]", + "elasticVm3IP": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),4)), '.22')]", + "elasticVmName": "[concat('elastic-vm-',variables('resourceprefix'))]", + "elasticVmName1": "[concat('elastic-vm-01-',variables('resourceprefix'))]", + "elasticVmName2": "[concat('elastic-vm-02-',variables('resourceprefix'))]", + "elasticVmName3": "[concat('elastic-vm-03-',variables('resourceprefix'))]", + "extBeName": "[concat('lb-backend-',variables('resourceprefix'))]", + "extFeName": "[concat('lb-frontend-',variables('resourceprefix'))]", + "extNatPool": "[concat('lb-natpool-',variables('resourceprefix'))]", + "extProbe": "[concat('lb-probe-',variables('resourceprefix'))]", + "fileServerDiskCount": "[parameters('fileServerDiskCount')]", + "fileServerDiskSize": "[parameters('fileServerDiskSize')]", + "fileServerType": "[parameters('fileServerType')]", + "firewallRuleName": "[parameters('firewallRuleName')]", + "gatewayName": "[concat('vnet-gateway-',variables('resourceprefix'))]", + "gatewayPublicIPName": "[concat('vnet-gw-ip-',variables('resourceprefix'))]", + "gatewaySubnet": "[parameters('gatewaySubnet')]", + "gatewaySubnetPrefix": "[concat(variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),2)))]", + "gatewaySubnetRange": "[concat(variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),2)), '.0/24')]", + "gatewayType": "[parameters('gatewayType')]", + "gfsNameRoot": "[concat('gluster-vm-',variables('resourceprefix'))]", + "gfxAvailabilitySetName": "[concat('gluster-avset-',variables('resourceprefix'))]", + "glusterScriptFilename": "install_gluster.sh", + "glusterVmCount": 2, + "glusterVmSku": "[parameters('glusterVmSku')]", + "installO365pluginsSwitch": "[parameters('installO365pluginsSwitch')]", + "installElasticSearchSwitch": "[parameters('installElasticSearchSwitch')]", + "jboxNicName": "[concat('jumpbox-vm-nic-',variables('resourceprefix'))]", + "jboxNsgName": "[concat('jumpbox-nsg-',variables('resourceprefix'))]", + "jboxPipName": "[concat('jumpbox-pubip-',variables('resourceprefix'))]", + "jboxVmName": "[concat('jumpbox-vm-',variables('resourceprefix'))]", + "lbDns": "[concat('lb-',variables('resourceprefix'),'.',parameters('location'),'.cloudapp.azure.com')]", + "lbName": "[concat('lb-',variables('resourceprefix'))]", + "lbPipName": "[concat('lb-pubip-',variables('resourceprefix'))]", + "moodleAdminPass": "[concat(toUpper('xl'), substring(uniqueString(resourceGroup().id, deployment().name), 6, 7),',1*8')]", + "moodleDbName": "moodle", + "moodleDbPass": "[concat('9#36^', substring(uniqueString(resourceGroup().id, deployment().name), 5, 8), toUpper('ercq'))]", + "moodleDbUser": "moodle", + "moodleDbUserAzure": "[concat('moodle', '@', parameters('dbServerType'), '-', variables('resourceprefix'))]", + "moodleInstallScriptFilename": "install_moodle.sh", + "moodleVersion": "[parameters('moodleVersion')]", + "mysqlVersion": "[parameters('mysqlVersion')]", + "osType": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "policyName": "[concat('policy-',variables('resourceprefix'))]", + "postgresVersion": "[parameters('postgresVersion')]", + "redisCacheName": "[concat('redis-',variables('resourceprefix'))]", + "redisDns": "[concat('redis-',variables('resourceprefix'),'.redis.cache.windows.net')]", + "resourcesPrefix": "[variables('resourceprefix')]", + "serverName": "[concat(parameters('dbServerType'), '-',variables('resourceprefix'))]", + "siteURL": "[if(or(empty(parameters('siteURL')), equals(parameters('siteURL'), 'www.example.org')), concat('lb-',variables('resourceprefix'),'.',parameters('location'),'.cloudapp.azure.com'), parameters('siteURL'))]", + "skuCapacityDTU": "[parameters('skuCapacityDTU')]", + "skuFamily": "[parameters('skuFamily')]", + "skuName": "[parameters('skuName')]", + "skuSizeMB": "[parameters('skuSizeMB')]", + "skuTier": "[parameters('skuTier')]", + "sshPublicKey": "[parameters('sshPublicKey')]", + "sshUsername": "[parameters('sshUsername')]", + "sslEnforcement": "[parameters('sslEnforcement')]", + "storageAccountName": "[tolower(concat('abs',variables('resourceprefix')))]", + "storageAccountType": "[parameters('storageAccountType')]", + "subnetElastic": "[concat('elastic-subnet-',variables('resourceprefix'))]", + "subnetElasticPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),4)))]", + "subnetElasticRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),4)), '.0/24')]", + "subnetRedis": "[concat('redis-subnet-',variables('resourceprefix'))]", + "subnetRedisPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),3)))]", + "subnetRedisRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),3)), '.0/24')]", + "subnetSan": "[concat('san-subnet-',variables('resourceprefix'))]", + "subnetSanPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),1)))]", + "subnetSanRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),1)), '.0/24')]", + "subnetWeb": "[concat('web-subnet-',variables('resourceprefix'))]", + "subnetWebPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),0)))]", + "subnetWebRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),0)), '.0/24')]", + "vNetAddressSpace": "[parameters('vNetAddressSpace')]", + "vaultName": "[concat('vault-',variables('resourceprefix'))]", + "vmssName": "[concat('vmss-',variables('resourceprefix'))]", + "vmssdStorageAccounttName": "[concat('vmss',uniqueString(resourceGroup().id))]", + "vnetGwDeploySwitch": "[parameters('vnetGwDeploySwitch')]", + "vnetName": "[concat('vnet-',variables('resourceprefix'))]", + "vpnType": "[parameters('vpnType')]", + "webServerSetupScriptFilename": "setup_webserver.sh", + "webServerType": "[parameters('webServerType')]" + }, + "octets": "[split(parameters('vNetAddressSpace'), '.')]", + "resourceprefix": "[substring(uniqueString(resourceGroup().id, deployment().name), 3, 6)]" + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/controller.json b/moodle-scalable-cluster-ubuntu/nested/controller.json index ea8f8068f3ec..dce1932544f5 100644 --- a/moodle-scalable-cluster-ubuntu/nested/controller.json +++ b/moodle-scalable-cluster-ubuntu/nested/controller.json @@ -1,228 +1,235 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" }, - "resources": [ - { - "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').jboxPipName]", - "properties": { - "dnsSettings": { - "domainNameLabel": "[parameters('moodleCommon').jboxPipName]" - }, - "publicIPAllocationMethod": "Static" - }, - "tags": { - "displayName": "jboxpip" - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').jboxPipName]", + "properties": { + "dnsSettings": { + "domainNameLabel": "[parameters('moodleCommon').jboxPipName]" }, - { - "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').jboxNsgName]", + "publicIPAllocationMethod": "Static" + }, + "tags": { + "displayName": "jboxpip" + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').jboxNsgName]", + "properties": { + "securityRules": [ + { + "name": "Allow_SSH", "properties": { - "securityRules": [ - { - "name": "Allow_SSH", - "properties": { - "access": "Allow", - "destinationAddressPrefix": "*", - "destinationPortRange": "22", - "direction": "Inbound", - "priority": 1000, - "protocol": "Tcp", - "sourceAddressPrefix": "*", - "sourcePortRange": "*" - } - }, - { - "name": "Allow_http", - "properties": { - "access": "Allow", - "destinationAddressPrefix": "*", - "destinationPortRange": "80", - "direction": "Inbound", - "priority": 1005, - "protocol": "Tcp", - "sourceAddressPrefix": "*", - "sourcePortRange": "*" - } - } - ] - }, - "tags": { - "displayName": "JumpBox NSG" + "access": "Allow", + "destinationAddressPrefix": "*", + "destinationPortRange": "22", + "direction": "Inbound", + "priority": 1000, + "protocol": "Tcp", + "sourceAddressPrefix": "*", + "sourcePortRange": "*" } - }, - { - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2017-10-01", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', parameters('moodleCommon').jboxPipName)]" - ], - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').jboxNicName]", + }, + { + "name": "Allow_http", "properties": { - "networkSecurityGroup": { - "id": "[variables('nsgRef')]" - }, - "ipConfigurations": [ - { - "name": "ipcfgjbox", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[variables('pipRef')]" - }, - "subnet": { - "id": "[variables('subnetWebRef')]" - } - } - } - ] - }, - "tags": { - "displayName": "jboxNic" + "access": "Allow", + "destinationAddressPrefix": "*", + "destinationPortRange": "80", + "direction": "Inbound", + "priority": 1005, + "protocol": "Tcp", + "sourceAddressPrefix": "*", + "sourcePortRange": "*" } + } + ] + }, + "tags": { + "displayName": "JumpBox NSG" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2017-10-01", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/', parameters('moodleCommon').jboxPipName)]" + ], + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').jboxNicName]", + "properties": { + "networkSecurityGroup": { + "id": "[variables('nsgRef')]" }, - { - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2017-03-30", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', parameters('moodleCommon').jboxNicName)]" - ], - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').jboxVmName]", + "ipConfigurations": [ + { + "name": "ipcfgjbox", "properties": { - "hardwareProfile": { - "vmSize": "[parameters('moodleCommon').controllerVmSku]" - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[variables('nicRef')]" - } - ] - }, - "osProfile": { - "adminUsername": "[parameters('moodleCommon').sshUsername]", - "computerName": "[parameters('moodleCommon').jboxVmName]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "path": "[concat('/home/', parameters('moodleCommon').sshUsername, '/.ssh/authorized_keys')]", - "keyData": "[parameters('moodleCommon').sshPublicKey]" - } - ] - } - } - }, - "storageProfile": { - "imageReference": "[parameters('moodleCommon').osType]", - "osDisk": { - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "Standard_LRS" - }, - "name": "[parameters('moodleCommon').jboxVmName]" - }, - "dataDisks": "[take(variables('nfsDiskArray'),if(equals(parameters('moodleCommon').fileServerType,'nfs'), parameters('moodleCommon').fileServerDiskCount, 0))]" - } - }, - "tags": { - "displayName": "Jumpbox (controller) Virtual Machine" + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[variables('pipRef')]" + }, + "subnet": { + "id": "[variables('subnetWebRef')]" + } } + } + ] + }, + "tags": { + "displayName": "jboxNic" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2017-03-30", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', parameters('moodleCommon').jboxNicName)]" + ], + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').jboxVmName]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('moodleCommon').controllerVmSku]" }, - { - "condition": "[parameters('moodleCommon').applyScriptsSwitch]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('moodleCommon').jboxVmName)]" - ], - "name": "[concat(parameters('moodleCommon').jboxVmName,'-ScriptProcessor')]", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[parameters('moodleCommon')]" - } - }, - "templateLink": { - "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'controllerconfig.json',parameters('moodleCommon').artifactsSasToken)]" - } + "networkProfile": { + "networkInterfaces": [ + { + "id": "[variables('nicRef')]" } + ] }, - { - "condition": "[parameters('moodleCommon').azureBackupSwitch]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/',parameters('moodleCommon').jboxVmName)]" - ], - "name": "[concat(parameters('moodleCommon').jboxVmName,'-Backup')]", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[parameters('moodleCommon')]" - }, - "vmName": { - "value": "[parameters('moodleCommon').jboxVmName]" - } - }, - "templateLink": { - "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'recoveryservicesEnlist.json',parameters('moodleCommon').artifactsSasToken)]" + "osProfile": { + "adminUsername": "[parameters('moodleCommon').sshUsername]", + "computerName": "[parameters('moodleCommon').jboxVmName]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[concat('/home/', parameters('moodleCommon').sshUsername, '/.ssh/authorized_keys')]", + "keyData": "[parameters('moodleCommon').sshPublicKey]" } + ] } + } + }, + "storageProfile": { + "imageReference": "[parameters('moodleCommon').osType]", + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "name": "[parameters('moodleCommon').jboxVmName]" + }, + "dataDisks": "[take(variables('nfsDiskArray'),if(equals(parameters('moodleCommon').fileServerType,'nfs'), parameters('moodleCommon').fileServerDiskCount, 0))]" } - ], - "variables": { - "documentation01": "This sub-template drives the controller/jump-box which is used as the access-point for other moodle VM's ", - "documentation02": "It expects certain values in the 'common' datastructure.", - "documentation03": " vnetName - name of virtual network", - "documentation04": " subnetWeb - name of subnet for controller (and vm scale set)", - "documentation06": " jboxPipName - name of Public IP address for the jumpbox (note that none of the other VM's get a PIP - just the jumpbox", - "documentation07": " jboxNicName - name of the network interface (all VM's must hae a nic) to crate, tied to the public IP address", - "documentation08": " jboxNsgName - name of the network security group, regulating access to/from the jumpbox", - "documentation09": "This sub-template calls other sub-templates", - "documentation10": " controllerconfig - conditionally applies post-deployment script on the VM", - "documentation18": " recoveryservicesEnlist - conditionally enlists the VM into the backup regimen", - "nicRef": "[resourceId('Microsoft.Network/networkInterfaces', parameters('moodleCommon').jboxNicName)]", - "nsgRef": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('moodleCommon').jboxNsgName)]", - "pipRef": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').jboxPipName)]", - "subnetWebRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('moodleCommon').vnetName, parameters('moodleCommon').subnetWeb)]", - "copy": [ - { - "name": "nfsDiskArray", - "count": 8, - "input": { - "managedDisk": { - "storageAccountType": "Premium_LRS" - }, - "diskSizeGB": "[parameters('moodleCommon').fileServerDiskSize]", - "lun": "[copyIndex('nfsDiskArray')]", - "createOption": "Empty" - } - } - ] + }, + "tags": { + "displayName": "Jumpbox (controller) Virtual Machine" + } + }, + { + "condition": "[parameters('moodleCommon').applyScriptsSwitch]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('moodleCommon').jboxVmName)]" + ], + "name": "[concat(parameters('moodleCommon').jboxVmName,'-ScriptProcessor')]", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[parameters('moodleCommon')]" + } + }, + "templateLink": { + "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'controllerconfig.json',parameters('moodleCommon').artifactsSasToken)]" + } + } }, - "outputs": { - "controllerIP": { - "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').jboxPipName), '2017-10-01').ipAddress]", - "type": "string" + { + "condition": "[parameters('moodleCommon').azureBackupSwitch]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',parameters('moodleCommon').jboxVmName)]" + ], + "name": "[concat(parameters('moodleCommon').jboxVmName,'-Backup')]", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[parameters('moodleCommon')]" + }, + "vmName": { + "value": "[parameters('moodleCommon').jboxVmName]" + } + }, + "templateLink": { + "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'recoveryservicesEnlist.json',parameters('moodleCommon').artifactsSasToken)]" + } + } + } + ], + "variables": { + "documentation01": "This sub-template drives the controller/jump-box which is used as the access-point for other moodle VM's ", + "documentation02": "It expects certain values in the 'common' datastructure.", + "documentation03": " vnetName - name of virtual network", + "documentation04": " subnetWeb - name of subnet for controller (and vm scale set)", + "documentation06": " jboxPipName - name of Public IP address for the jumpbox (note that none of the other VM's get a PIP - just the jumpbox", + "documentation07": " jboxNicName - name of the network interface (all VM's must hae a nic) to crate, tied to the public IP address", + "documentation08": " jboxNsgName - name of the network security group, regulating access to/from the jumpbox", + "documentation09": "This sub-template calls other sub-templates", + "documentation10": " controllerconfig - conditionally applies post-deployment script on the VM", + "documentation18": " recoveryservicesEnlist - conditionally enlists the VM into the backup regimen", + "nicRef": "[resourceId('Microsoft.Network/networkInterfaces', parameters('moodleCommon').jboxNicName)]", + "nsgRef": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('moodleCommon').jboxNsgName)]", + "pipRef": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').jboxPipName)]", + "subnetWebRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('moodleCommon').vnetName, parameters('moodleCommon').subnetWeb)]", + "copy": [ + { + "name": "nfsDiskArray", + "count": 8, + "input": { + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "diskSizeGB": "[parameters('moodleCommon').fileServerDiskSize]", + "lun": "[copyIndex('nfsDiskArray')]", + "createOption": "Empty" } + } + ] + }, + "outputs": { + "controllerIP": { + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').jboxPipName), '2017-10-01').ipAddress]", + "type": "string" } + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/controllerconfig.json b/moodle-scalable-cluster-ubuntu/nested/controllerconfig.json index 0b7ac1aad5ed..097fac358c31 100644 --- a/moodle-scalable-cluster-ubuntu/nested/controllerconfig.json +++ b/moodle-scalable-cluster-ubuntu/nested/controllerconfig.json @@ -1,55 +1,62 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" }, - "resources": [ - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "name": "[concat(parameters('moodleCommon').jboxVmName,'/','install_moodle')]", - "properties": { - "autoUpgradeMinorVersion": true, - "publisher": "Microsoft.Azure.Extensions", - "settings": { - "fileUris": [ - "[variables('scriptUri')]", - "[parameters('moodleCommon').commonFunctionsScriptUri]" - ] - }, - "protectedSettings":{ - "commandToExecute": "[concat('bash ', parameters('moodleCommon').moodleInstallScriptFilename, ' ', parameters('moodleCommon').moodleVersion, ' ', concat(parameters('moodleCommon').gfsNameRoot, '0'), ' ', 'data', ' ', parameters('moodleCommon').siteURL, ' ', concat(parameters('moodleCommon').dbServerType, '-', parameters('moodleCommon').resourcesPrefix, '.', parameters('moodleCommon').dbServerType, '.database.azure.com'), ' ', parameters('moodleCommon').moodleDbName, ' ', parameters('moodleCommon').moodleDbUser, ' ', parameters('moodleCommon').moodleDbPass, ' ', parameters('moodleCommon').moodleAdminPass, ' ', concat(parameters('moodleCommon').dbLogin, '@', parameters('moodleCommon').dbServerType, '-', parameters('moodleCommon').resourcesPrefix), ' ', parameters('moodleCommon').dbLoginPassword, ' ', parameters('moodleCommon').storageAccountName, ' ', listKeys(variables('storageAccountId'), '2017-06-01').keys[0].value, ' ', parameters('moodleCommon').moodleDbUserAzure, ' ', parameters('moodleCommon').redisDns, ' ', listKeys(variables('redisResourceId'), '2016-04-01').primaryKey, ' ', parameters('moodleCommon').elasticVm1IP, ' ', parameters('moodleCommon').installO365pluginsSwitch, ' ', parameters('moodleCommon').installElasticSearchSwitch, ' ', parameters('moodleCommon').dbServerType, ' ', parameters('moodleCommon').fileServerType)]" - }, - "type": "CustomScript", - "typeHandlerVersion": "2.0" - }, - "tags": { - "displayName": "install_moodle" - } - } - ], - "variables": { - "documentation01": "This sub-template applies a specific post-deployment script to the controller vm", - "documentation02": "It expects certain values in the 'common' datastructure.", - "documentation03": " scriptLocation - web URI", - "documentation04": " moodleInstallScriptFilename - name of script file", - "documentation05": " siteURL - URL of the website", - "documentation06": " gfsNameRoot - nameroot of gluster farm - note that the code applies a 0 to get to the first node", - "documentation07": " jboxVmName - name of the controller/jumpb ox VM", - "documentation08": " dbServerType - postgres or mysql", - "documentation09": " moodleDbName - database name for moodle", - "documentation10": " moodleDbUser - database user for moodle", - "documentation11": " moodleDbPass - database password for moodleDbUser", - "documentation12": " moodleAdminPass - password for moodle admin user", - "scriptUri": "[concat(parameters('moodleCommon').scriptLocation,parameters('moodleCommon').moodleInstallScriptFilename,parameters('moodleCommon').artifactsSasToken)]", - "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', parameters('moodleCommon').storageAccountName)]", - "redisResourceId": "[resourceId('Microsoft.Cache/Redis', parameters('moodleCommon').redisCacheName)]" + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "name": "[concat(parameters('moodleCommon').jboxVmName,'/','install_moodle')]", + "properties": { + "autoUpgradeMinorVersion": true, + "publisher": "Microsoft.Azure.Extensions", + "settings": { + "fileUris": [ + "[variables('scriptUri')]", + "[parameters('moodleCommon').commonFunctionsScriptUri]" + ] + }, + "protectedSettings": { + "commandToExecute": "[concat('bash ', parameters('moodleCommon').moodleInstallScriptFilename, ' ', parameters('moodleCommon').moodleVersion, ' ', concat(parameters('moodleCommon').gfsNameRoot, '0'), ' ', 'data', ' ', parameters('moodleCommon').siteURL, ' ', concat(parameters('moodleCommon').dbServerType, '-', parameters('moodleCommon').resourcesPrefix, '.', parameters('moodleCommon').dbServerType, '.database.azure.com'), ' ', parameters('moodleCommon').moodleDbName, ' ', parameters('moodleCommon').moodleDbUser, ' ', parameters('moodleCommon').moodleDbPass, ' ', parameters('moodleCommon').moodleAdminPass, ' ', concat(parameters('moodleCommon').dbLogin, '@', parameters('moodleCommon').dbServerType, '-', parameters('moodleCommon').resourcesPrefix), ' ', parameters('moodleCommon').dbLoginPassword, ' ', parameters('moodleCommon').storageAccountName, ' ', listKeys(variables('storageAccountId'), '2017-06-01').keys[0].value, ' ', parameters('moodleCommon').moodleDbUserAzure, ' ', parameters('moodleCommon').redisDns, ' ', listKeys(variables('redisResourceId'), '2016-04-01').primaryKey, ' ', parameters('moodleCommon').elasticVm1IP, ' ', parameters('moodleCommon').installO365pluginsSwitch, ' ', parameters('moodleCommon').installElasticSearchSwitch, ' ', parameters('moodleCommon').dbServerType, ' ', parameters('moodleCommon').fileServerType)]" + }, + "type": "CustomScript", + "typeHandlerVersion": "2.0" + }, + "tags": { + "displayName": "install_moodle" + } + } + ], + "variables": { + "documentation01": "This sub-template applies a specific post-deployment script to the controller vm", + "documentation02": "It expects certain values in the 'common' datastructure.", + "documentation03": " scriptLocation - web URI", + "documentation04": " moodleInstallScriptFilename - name of script file", + "documentation05": " siteURL - URL of the website", + "documentation06": " gfsNameRoot - nameroot of gluster farm - note that the code applies a 0 to get to the first node", + "documentation07": " jboxVmName - name of the controller/jumpb ox VM", + "documentation08": " dbServerType - postgres or mysql", + "documentation09": " moodleDbName - database name for moodle", + "documentation10": " moodleDbUser - database user for moodle", + "documentation11": " moodleDbPass - database password for moodleDbUser", + "documentation12": " moodleAdminPass - password for moodle admin user", + "scriptUri": "[concat(parameters('moodleCommon').scriptLocation,parameters('moodleCommon').moodleInstallScriptFilename,parameters('moodleCommon').artifactsSasToken)]", + "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', parameters('moodleCommon').storageAccountName)]", + "redisResourceId": "[resourceId('Microsoft.Cache/Redis', parameters('moodleCommon').redisCacheName)]" + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/elastic.json b/moodle-scalable-cluster-ubuntu/nested/elastic.json index b5ec1e59e02a..e7a5e8c96080 100644 --- a/moodle-scalable-cluster-ubuntu/nested/elastic.json +++ b/moodle-scalable-cluster-ubuntu/nested/elastic.json @@ -1,387 +1,391 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" }, - "resources": [ - { - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').elasticNicName1]", + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').elasticNicName1]", + "properties": { + "ipConfigurations": [ + { + "name": "ipcfg-elastic1", "properties": { - "ipConfigurations": [ - { - "name": "ipcfg-elastic1", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[parameters('moodleCommon').elasticVm1IP]", - "subnet": { - "id": "[variables('subnetElasticRef')]" - } - } - } - ] - }, - "tags": { - "displayName": "Elastic NIC 1" - } - }, - { - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2017-03-30", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', parameters('moodleCommon').elasticNicName1)]" - ], - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').elasticVmName1]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('moodleCommon').elasticVmSku]" - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[variables('nicRef1')]" - } - ] - }, - "osProfile": { - "adminUsername": "[parameters('moodleCommon').sshUsername]", - "computerName": "[parameters('moodleCommon').elasticVmName1]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "path": "[concat('/home/', parameters('moodleCommon').sshUsername, '/.ssh/authorized_keys')]", - "keyData": "[parameters('moodleCommon').sshPublicKey]" - } - ] - } - } - }, - "storageProfile": { - "dataDisks": [], - "imageReference": "[parameters('moodleCommon').osType]", - "osDisk": { - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "Standard_LRS" - }, - "name": "[parameters('moodleCommon').elasticVmName1]" - } - } - }, - "tags": { - "displayName": "Elastic Search Virtual Machine" + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[parameters('moodleCommon').elasticVm1IP]", + "subnet": { + "id": "[variables('subnetElasticRef')]" + } } + } + ] + }, + "tags": { + "displayName": "Elastic NIC 1" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2017-03-30", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', parameters('moodleCommon').elasticNicName1)]" + ], + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').elasticVmName1]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('moodleCommon').elasticVmSku]" }, - { - "condition": "[parameters('moodleCommon').applyScriptsSwitch]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('moodleCommon').elasticVmName1)]" - ], - "name": "[concat(parameters('moodleCommon').elasticVmName1,'-ScriptProcessor')]", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[parameters('moodleCommon')]" - } - - }, - "templateLink": { - "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'elasticconfig.json',parameters('moodleCommon').artifactsSasToken)]" - } + "networkProfile": { + "networkInterfaces": [ + { + "id": "[variables('nicRef1')]" } + ] }, - { - "condition": "[parameters('moodleCommon').azureBackupSwitch]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/',parameters('moodleCommon').elasticVmName1)]" - ], - "name": "[concat(parameters('moodleCommon').elasticVmName1,'-Backup')]", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[parameters('moodleCommon')]" - }, - "vmName": { - "value": "[parameters('moodleCommon').elasticVmName1]" - } - }, - "templateLink": { - "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'recoveryservicesEnlist.json',parameters('moodleCommon').artifactsSasToken)]" + "osProfile": { + "adminUsername": "[parameters('moodleCommon').sshUsername]", + "computerName": "[parameters('moodleCommon').elasticVmName1]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[concat('/home/', parameters('moodleCommon').sshUsername, '/.ssh/authorized_keys')]", + "keyData": "[parameters('moodleCommon').sshPublicKey]" } + ] } + } }, - { - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').elasticNicName2]", - "properties": { - "ipConfigurations": [ - { - "name": "ipcfg-elastic2", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[parameters('moodleCommon').elasticVm2IP]", - "subnet": { - "id": "[variables('subnetElasticRef')]" - } - } - } - ] + "storageProfile": { + "dataDisks": [], + "imageReference": "[parameters('moodleCommon').osType]", + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" }, - "tags": { - "displayName": "Elastic NIC 2" - } + "name": "[parameters('moodleCommon').elasticVmName1]" + } + } + }, + "tags": { + "displayName": "Elastic Search Virtual Machine" + } + }, + { + "condition": "[parameters('moodleCommon').applyScriptsSwitch]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('moodleCommon').elasticVmName1)]" + ], + "name": "[concat(parameters('moodleCommon').elasticVmName1,'-ScriptProcessor')]", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[parameters('moodleCommon')]" + } + }, + "templateLink": { + "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'elasticconfig.json',parameters('moodleCommon').artifactsSasToken)]" + } + } + }, + { + "condition": "[parameters('moodleCommon').azureBackupSwitch]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',parameters('moodleCommon').elasticVmName1)]" + ], + "name": "[concat(parameters('moodleCommon').elasticVmName1,'-Backup')]", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[parameters('moodleCommon')]" + }, + "vmName": { + "value": "[parameters('moodleCommon').elasticVmName1]" + } }, - { - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2017-03-30", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', parameters('moodleCommon').elasticNicName2)]" - ], - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').elasticVmName2]", + "templateLink": { + "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'recoveryservicesEnlist.json',parameters('moodleCommon').artifactsSasToken)]" + } + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').elasticNicName2]", + "properties": { + "ipConfigurations": [ + { + "name": "ipcfg-elastic2", "properties": { - "hardwareProfile": { - "vmSize": "[parameters('moodleCommon').elasticVmSku]" - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[variables('nicRef2')]" - } - ] - }, - "osProfile": { - "adminUsername": "[parameters('moodleCommon').sshUsername]", - "computerName": "[parameters('moodleCommon').elasticVmName2]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "path": "[concat('/home/', parameters('moodleCommon').sshUsername, '/.ssh/authorized_keys')]", - "keyData": "[parameters('moodleCommon').sshPublicKey]" - } - ] - } - } - }, - "storageProfile": { - "dataDisks": [], - "imageReference": "[parameters('moodleCommon').osType]", - "osDisk": { - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "Standard_LRS" - }, - "name": "[parameters('moodleCommon').elasticVmName2]" - } - } - }, - "tags": { - "displayName": "Elastic Search Virtual Machine" + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[parameters('moodleCommon').elasticVm2IP]", + "subnet": { + "id": "[variables('subnetElasticRef')]" + } } + } + ] + }, + "tags": { + "displayName": "Elastic NIC 2" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2017-03-30", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', parameters('moodleCommon').elasticNicName2)]" + ], + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').elasticVmName2]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('moodleCommon').elasticVmSku]" }, - { - "condition": "[parameters('moodleCommon').applyScriptsSwitch]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('moodleCommon').elasticVmName2)]" - ], - "name": "[concat(parameters('moodleCommon').elasticVmName2,'-ScriptProcessor')]", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[parameters('moodleCommon')]" - } - - }, - "templateLink": { - "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'elasticconfig.json',parameters('moodleCommon').artifactsSasToken)]" - } + "networkProfile": { + "networkInterfaces": [ + { + "id": "[variables('nicRef2')]" } + ] }, - { - "condition": "[parameters('moodleCommon').azureBackupSwitch]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/',parameters('moodleCommon').elasticVmName2)]" - ], - "name": "[concat(parameters('moodleCommon').elasticVmName2,'-Backup')]", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[parameters('moodleCommon')]" - }, - "vmName": { - "value": "[parameters('moodleCommon').elasticVmName2]" - } - }, - "templateLink": { - "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'recoveryservicesEnlist.json',parameters('moodleCommon').artifactsSasToken)]" + "osProfile": { + "adminUsername": "[parameters('moodleCommon').sshUsername]", + "computerName": "[parameters('moodleCommon').elasticVmName2]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[concat('/home/', parameters('moodleCommon').sshUsername, '/.ssh/authorized_keys')]", + "keyData": "[parameters('moodleCommon').sshPublicKey]" } + ] } + } }, - { - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').elasticNicName3]", - "properties": { - "ipConfigurations": [ - { - "name": "ipcfg-elastic3", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[parameters('moodleCommon').elasticVm3IP]", - "subnet": { - "id": "[variables('subnetElasticRef')]" - } - } - } - ] + "storageProfile": { + "dataDisks": [], + "imageReference": "[parameters('moodleCommon').osType]", + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" }, - "tags": { - "displayName": "Elastic NIC 2" - } + "name": "[parameters('moodleCommon').elasticVmName2]" + } + } + }, + "tags": { + "displayName": "Elastic Search Virtual Machine" + } + }, + { + "condition": "[parameters('moodleCommon').applyScriptsSwitch]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('moodleCommon').elasticVmName2)]" + ], + "name": "[concat(parameters('moodleCommon').elasticVmName2,'-ScriptProcessor')]", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[parameters('moodleCommon')]" + } }, - { - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2017-03-30", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', parameters('moodleCommon').elasticNicName3)]" - ], - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').elasticVmName3]", + "templateLink": { + "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'elasticconfig.json',parameters('moodleCommon').artifactsSasToken)]" + } + } + }, + { + "condition": "[parameters('moodleCommon').azureBackupSwitch]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',parameters('moodleCommon').elasticVmName2)]" + ], + "name": "[concat(parameters('moodleCommon').elasticVmName2,'-Backup')]", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[parameters('moodleCommon')]" + }, + "vmName": { + "value": "[parameters('moodleCommon').elasticVmName2]" + } + }, + "templateLink": { + "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'recoveryservicesEnlist.json',parameters('moodleCommon').artifactsSasToken)]" + } + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').elasticNicName3]", + "properties": { + "ipConfigurations": [ + { + "name": "ipcfg-elastic3", "properties": { - "hardwareProfile": { - "vmSize": "[parameters('moodleCommon').elasticVmSku]" - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[variables('nicRef3')]" - } - ] - }, - "osProfile": { - "adminUsername": "[parameters('moodleCommon').sshUsername]", - "computerName": "[parameters('moodleCommon').elasticVmName3]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "path": "[concat('/home/', parameters('moodleCommon').sshUsername, '/.ssh/authorized_keys')]", - "keyData": "[parameters('moodleCommon').sshPublicKey]" - } - ] - } - } - }, - "storageProfile": { - "dataDisks": [], - "imageReference": "[parameters('moodleCommon').osType]", - "osDisk": { - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "Standard_LRS" - }, - "name": "[parameters('moodleCommon').elasticVmName3]" - } - } - }, - "tags": { - "displayName": "Elastic Search Virtual Machine" + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[parameters('moodleCommon').elasticVm3IP]", + "subnet": { + "id": "[variables('subnetElasticRef')]" + } } + } + ] + }, + "tags": { + "displayName": "Elastic NIC 2" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2017-03-30", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', parameters('moodleCommon').elasticNicName3)]" + ], + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').elasticVmName3]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('moodleCommon').elasticVmSku]" }, - { - "condition": "[parameters('moodleCommon').applyScriptsSwitch]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('moodleCommon').elasticVmName3)]" - ], - "name": "[concat(parameters('moodleCommon').elasticVmName3,'-ScriptProcessor')]", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[parameters('moodleCommon')]" - } - - }, - "templateLink": { - "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'elasticconfig.json',parameters('moodleCommon').artifactsSasToken)]" - } + "networkProfile": { + "networkInterfaces": [ + { + "id": "[variables('nicRef3')]" } + ] }, - { - "condition": "[parameters('moodleCommon').azureBackupSwitch]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/',parameters('moodleCommon').elasticVmName3)]" - ], - "name": "[concat(parameters('moodleCommon').elasticVmName3,'-Backup')]", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[parameters('moodleCommon')]" - }, - "vmName": { - "value": "[parameters('moodleCommon').elasticVmName3]" - } - }, - "templateLink": { - "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'recoveryservicesEnlist.json',parameters('moodleCommon').artifactsSasToken)]" + "osProfile": { + "adminUsername": "[parameters('moodleCommon').sshUsername]", + "computerName": "[parameters('moodleCommon').elasticVmName3]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[concat('/home/', parameters('moodleCommon').sshUsername, '/.ssh/authorized_keys')]", + "keyData": "[parameters('moodleCommon').sshPublicKey]" } + ] } + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": "[parameters('moodleCommon').osType]", + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "name": "[parameters('moodleCommon').elasticVmName3]" + } + } + }, + "tags": { + "displayName": "Elastic Search Virtual Machine" + } + }, + { + "condition": "[parameters('moodleCommon').applyScriptsSwitch]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('moodleCommon').elasticVmName3)]" + ], + "name": "[concat(parameters('moodleCommon').elasticVmName3,'-ScriptProcessor')]", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[parameters('moodleCommon')]" + } + }, + "templateLink": { + "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'elasticconfig.json',parameters('moodleCommon').artifactsSasToken)]" + } + } + }, + { + "condition": "[parameters('moodleCommon').azureBackupSwitch]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',parameters('moodleCommon').elasticVmName3)]" + ], + "name": "[concat(parameters('moodleCommon').elasticVmName3,'-Backup')]", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[parameters('moodleCommon')]" + }, + "vmName": { + "value": "[parameters('moodleCommon').elasticVmName3]" + } + }, + "templateLink": { + "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'recoveryservicesEnlist.json',parameters('moodleCommon').artifactsSasToken)]" } - ], - "variables": { - "documentation01": "This sub-template drives the elastic which is used as the access-point for other moodle VM's ", - "documentation02": "It expects certain values in the 'common' datastructure.", - "documentation03": " vnetName - name of the virtual network", - "documentation04": " subnetElastic - name of subnet for elastic (and vm scale set)", - "documentation06": " elasticNicName1 - name of the eastlic vm 1 network interface", - "documentation07": " elasticNicName2 - name of the eastlic vm 2 network interface", - "documentation08": " elasticNicName3 - name of the eastlic vm 3 network interface", - "documentation09": " elasticVmName1 - name of the eastlic vm 1", - "documentation10": " elasticVmName2 - name of the eastlic vm 2", - "documentation11": " elasticVmName3 - name of the eastlic vm 3", - "documentation12": " elasticVm1IP - IP of the eastlic vm 1", - "documentation13": " elasticVm2IP - IP of the eastlic vm 2", - "documentation14": " elasticVm3IP - IP of the eastlic vm 3", - "documentation15": "This sub-template calls other sub-templates", - "documentation16": " elasticconfig - conditionally applies post-deployment script on the VM", - "documentation17": " recoveryservicesEnlist - conditionally enlists the VM into the backup regimen", - "nicRef1": "[resourceId('Microsoft.Network/networkInterfaces', parameters('moodleCommon').elasticNicName1)]", - "nicRef2": "[resourceId('Microsoft.Network/networkInterfaces', parameters('moodleCommon').elasticNicName2)]", - "nicRef3": "[resourceId('Microsoft.Network/networkInterfaces', parameters('moodleCommon').elasticNicName3)]", - "subnetElasticRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('moodleCommon').vnetName, parameters('moodleCommon').subnetElastic)]" + } } + ], + "variables": { + "documentation01": "This sub-template drives the elastic which is used as the access-point for other moodle VM's ", + "documentation02": "It expects certain values in the 'common' datastructure.", + "documentation03": " vnetName - name of the virtual network", + "documentation04": " subnetElastic - name of subnet for elastic (and vm scale set)", + "documentation06": " elasticNicName1 - name of the eastlic vm 1 network interface", + "documentation07": " elasticNicName2 - name of the eastlic vm 2 network interface", + "documentation08": " elasticNicName3 - name of the eastlic vm 3 network interface", + "documentation09": " elasticVmName1 - name of the eastlic vm 1", + "documentation10": " elasticVmName2 - name of the eastlic vm 2", + "documentation11": " elasticVmName3 - name of the eastlic vm 3", + "documentation12": " elasticVm1IP - IP of the eastlic vm 1", + "documentation13": " elasticVm2IP - IP of the eastlic vm 2", + "documentation14": " elasticVm3IP - IP of the eastlic vm 3", + "documentation15": "This sub-template calls other sub-templates", + "documentation16": " elasticconfig - conditionally applies post-deployment script on the VM", + "documentation17": " recoveryservicesEnlist - conditionally enlists the VM into the backup regimen", + "nicRef1": "[resourceId('Microsoft.Network/networkInterfaces', parameters('moodleCommon').elasticNicName1)]", + "nicRef2": "[resourceId('Microsoft.Network/networkInterfaces', parameters('moodleCommon').elasticNicName2)]", + "nicRef3": "[resourceId('Microsoft.Network/networkInterfaces', parameters('moodleCommon').elasticNicName3)]", + "subnetElasticRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('moodleCommon').vnetName, parameters('moodleCommon').subnetElastic)]" + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/elasticconfig.json b/moodle-scalable-cluster-ubuntu/nested/elasticconfig.json index f1890d6be4b2..89caa16bab3d 100644 --- a/moodle-scalable-cluster-ubuntu/nested/elasticconfig.json +++ b/moodle-scalable-cluster-ubuntu/nested/elasticconfig.json @@ -1,92 +1,99 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" }, - "resources": [ - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "name": "[concat(parameters('moodleCommon').elasticVmName1,'/','install_elastic')]", - "properties": { - "autoUpgradeMinorVersion": true, - "publisher": "Microsoft.Azure.Extensions", - "settings": { - "fileUris": [ - "[variables('scriptUri')]" - ] - }, - "protectedSettings":{ - "commandToExecute": "[variables('cmdExec')]" - }, - "type": "CustomScript", - "typeHandlerVersion": "2.0" - }, - "tags": { - "displayName": "install_elastic" - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "name": "[concat(parameters('moodleCommon').elasticVmName1,'/','install_elastic')]", + "properties": { + "autoUpgradeMinorVersion": true, + "publisher": "Microsoft.Azure.Extensions", + "settings": { + "fileUris": [ + "[variables('scriptUri')]" + ] + }, + "protectedSettings": { + "commandToExecute": "[variables('cmdExec')]" + }, + "type": "CustomScript", + "typeHandlerVersion": "2.0" + }, + "tags": { + "displayName": "install_elastic" + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "name": "[concat(parameters('moodleCommon').elasticVmName2,'/','install_elastic')]", + "properties": { + "autoUpgradeMinorVersion": true, + "publisher": "Microsoft.Azure.Extensions", + "settings": { + "fileUris": [ + "[variables('scriptUri')]" + ] + }, + "protectedSettings": { + "commandToExecute": "[variables('cmdExec')]" + }, + "type": "CustomScript", + "typeHandlerVersion": "2.0" + }, + "tags": { + "displayName": "install_elastic" + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "name": "[concat(parameters('moodleCommon').elasticVmName3,'/','install_elastic')]", + "properties": { + "autoUpgradeMinorVersion": true, + "publisher": "Microsoft.Azure.Extensions", + "settings": { + "fileUris": [ + "[variables('scriptUri')]" + ] }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "name": "[concat(parameters('moodleCommon').elasticVmName2,'/','install_elastic')]", - "properties": { - "autoUpgradeMinorVersion": true, - "publisher": "Microsoft.Azure.Extensions", - "settings": { - "fileUris": [ - "[variables('scriptUri')]" - ] - }, - "protectedSettings":{ - "commandToExecute": "[variables('cmdExec')]" - }, - "type": "CustomScript", - "typeHandlerVersion": "2.0" - }, - "tags": { - "displayName": "install_elastic" - } + "protectedSettings": { + "commandToExecute": "[variables('cmdExec')]" }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "name": "[concat(parameters('moodleCommon').elasticVmName3,'/','install_elastic')]", - "properties": { - "autoUpgradeMinorVersion": true, - "publisher": "Microsoft.Azure.Extensions", - "settings": { - "fileUris": [ - "[variables('scriptUri')]" - ] - }, - "protectedSettings":{ - "commandToExecute": "[variables('cmdExec')]" - }, - "type": "CustomScript", - "typeHandlerVersion": "2.0" - }, - "tags": { - "displayName": "install_elastic" - } - } - ], - "variables": { - "cmdExec": "[concat('bash ', parameters('moodleCommon').elasticScriptFilename, ' ', parameters('moodleCommon').elasticClusterName, ' ', parameters('moodleCommon').elasticVm1IP, ' ', parameters('moodleCommon').elasticVm2IP, ' ', parameters('moodleCommon').elasticVm3IP)]", - "documentation01": "This sub-template applies a specific post-deployment script to the controller vm", - "documentation02": "It expects certain values in the 'common' datastructure.", - "documentation03": " scriptLocation - web URI", - "documentation04": " elasticScriptFilename - name of script file", - "documentation05": " elasticVmName - name of the elastic search vm generic name", - "scriptUri": "[concat(parameters('moodleCommon').scriptLocation,parameters('moodleCommon').elasticScriptFilename,parameters('moodleCommon').artifactsSasToken)]" + "type": "CustomScript", + "typeHandlerVersion": "2.0" + }, + "tags": { + "displayName": "install_elastic" + } } + ], + "variables": { + "cmdExec": "[concat('bash ', parameters('moodleCommon').elasticScriptFilename, ' ', parameters('moodleCommon').elasticClusterName, ' ', parameters('moodleCommon').elasticVm1IP, ' ', parameters('moodleCommon').elasticVm2IP, ' ', parameters('moodleCommon').elasticVm3IP)]", + "documentation01": "This sub-template applies a specific post-deployment script to the controller vm", + "documentation02": "It expects certain values in the 'common' datastructure.", + "documentation03": " scriptLocation - web URI", + "documentation04": " elasticScriptFilename - name of script file", + "documentation05": " elasticVmName - name of the elastic search vm generic name", + "scriptUri": "[concat(parameters('moodleCommon').scriptLocation,parameters('moodleCommon').elasticScriptFilename,parameters('moodleCommon').artifactsSasToken)]" + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/gluster.json b/moodle-scalable-cluster-ubuntu/nested/gluster.json index 24c3e2e397e8..c30c78464b17 100644 --- a/moodle-scalable-cluster-ubuntu/nested/gluster.json +++ b/moodle-scalable-cluster-ubuntu/nested/gluster.json @@ -1,64 +1,71 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Compute/availabilitySets", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').gfxAvailabilitySetName]", + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 5 + }, + "sku": { + "name": "Aligned" + }, + "tags": { + "displayName": "Gluster Availability Set" + } }, - "resources": [ - { - "type": "Microsoft.Compute/availabilitySets", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').gfxAvailabilitySetName]", - "properties": { - "platformFaultDomainCount": 2, - "platformUpdateDomainCount": 5 - }, - "sku": { - "name": "Aligned" - }, - "tags": { - "displayName": "Gluster Availability Set" - } + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "copy": { + "count": "[parameters('moodleCommon').glusterVmCount]", + "name": "vmloop" + }, + "dependsOn": [ + "[concat('Microsoft.Compute/availabilitySets/',parameters('moodleCommon').gfxAvailabilitySetName)]" + ], + "name": "[concat('glustervm',copyindex())]", + "properties": { + "mode": "Incremental", + "parameters": { + "counter": { + "value": "[copyindex()]" + }, + "moodleCommon": { + "value": "[parameters('moodleCommon')]" + } }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "copy": { - "count": "[parameters('moodleCommon').glusterVmCount]", - "name": "vmloop" - }, - "dependsOn": [ - "[concat('Microsoft.Compute/availabilitySets/',parameters('moodleCommon').gfxAvailabilitySetName)]" - ], - "name": "[concat('glustervm',copyindex())]", - "properties": { - "mode": "Incremental", - "parameters": { - "counter": { - "value": "[copyindex()]" - }, - "moodleCommon": { - "value": "[parameters('moodleCommon')]" - } - }, - "templateLink": { - "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'glustervm.json',parameters('moodleCommon').artifactsSasToken)]" - } - } + "templateLink": { + "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'glustervm.json',parameters('moodleCommon').artifactsSasToken)]" } - ], - "variables": { - "documentation1": "This sub-template drives the gluster (scale-out network-attached storage file system) creation process.", - "documentation2": "It expects certain values in the 'common' datastructure.", - "documentation4": " gfxAvailabilitySetName - name of availability set for the gluster farm", - "documentation5": " glusterVmCount - number of nodes to create", - "documentation6": "This sub-template calls other sub-templates", - "documentation7": " glustervm - number of nodes in the gluster farm" + } } + ], + "variables": { + "documentation1": "This sub-template drives the gluster (scale-out network-attached storage file system) creation process.", + "documentation2": "It expects certain values in the 'common' datastructure.", + "documentation4": " gfxAvailabilitySetName - name of availability set for the gluster farm", + "documentation5": " glusterVmCount - number of nodes to create", + "documentation6": "This sub-template calls other sub-templates", + "documentation7": " glustervm - number of nodes in the gluster farm" + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/glustervm.json b/moodle-scalable-cluster-ubuntu/nested/glustervm.json index 992d849f0f1d..c5d13d7ef7db 100644 --- a/moodle-scalable-cluster-ubuntu/nested/glustervm.json +++ b/moodle-scalable-cluster-ubuntu/nested/glustervm.json @@ -1,178 +1,185 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "counter": { - "metadata": { - "description": "from the copyindex function of calling template" - }, - "type": "int" - }, - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "counter": { + "metadata": { + "description": "from the copyindex function of calling template" + }, + "type": "int" }, - "resources": [ - { - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "name": "[variables('nicName')]", + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "name": "[variables('nicName')]", + "properties": { + "ipConfigurations": [ + { + "name": "ipcfggfs", "properties": { - "ipConfigurations": [ - { - "name": "ipcfggfs", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[variables('subnetSanRef')]" - } - } - } - ] - }, - "tags": { - "displayName": "Gluster VM NIC" + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[variables('subnetSanRef')]" + } } + } + ] + }, + "tags": { + "displayName": "Gluster VM NIC" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2017-03-30", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" + ], + "location": "[parameters('location')]", + "name": "[variables('vmName')]", + "properties": { + "availabilitySet": { + "id": "[variables('asRef')]" }, - { - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2017-03-30", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" - ], - "location": "[resourceGroup().location]", - "name": "[variables('vmName')]", - "properties": { - "availabilitySet": { - "id": "[variables('asRef')]" - }, - "hardwareProfile": { - "vmSize": "[parameters('moodleCommon').glusterVmSku]" - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[variables('nicRef')]" - } - ] - }, - "osProfile": { - "adminUsername": "[parameters('moodleCommon').sshUsername]", - "computerName": "[variables('vmName')]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "path": "[concat('/home/', parameters('moodleCommon').sshUsername, '/.ssh/authorized_keys')]", - "keyData": "[parameters('moodleCommon').sshPublicKey]" - } - ] - } - } - }, - "storageProfile": { - "imageReference": "[parameters('moodleCommon').osType]", - "osDisk": { - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "Premium_LRS" - }, - "name": "[variables('vmName')]" - }, - "copy": [ - { - "name": "dataDisks", - "count": "[parameters('moodleCommon').fileServerDiskCount]", - "input": { - "managedDisk": { - "storageAccountType": "Premium_LRS" - }, - "diskSizeGB": "[parameters('moodleCommon').fileServerDiskSize]", - "lun": "[copyIndex('dataDisks')]", - "createOption": "Empty" - } - } - ] - } - }, - "tags": { - "displayName": "Gluster Virtual Machine" + "hardwareProfile": { + "vmSize": "[parameters('moodleCommon').glusterVmSku]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[variables('nicRef')]" } + ] }, - { - "condition": "[parameters('moodleCommon').applyScriptsSwitch]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/',variables('vmName'))]" - ], - "name": "[concat(variables('vmName'),'-ScriptProcessor')]", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[parameters('moodleCommon')]" - }, - "vmName": { - "value": "[ variables('vmName')]" - }, - "vmNumber": { - "value": "[parameters('counter')]" - } - }, - "templateLink": { - "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'glustervmconfig.json',parameters('moodleCommon').artifactsSasToken)]" + "osProfile": { + "adminUsername": "[parameters('moodleCommon').sshUsername]", + "computerName": "[variables('vmName')]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[concat('/home/', parameters('moodleCommon').sshUsername, '/.ssh/authorized_keys')]", + "keyData": "[parameters('moodleCommon').sshPublicKey]" } + ] } + } }, - { - "condition": "[parameters('moodleCommon').azureBackupSwitch]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/',variables('vmName'))]" - ], - "name": "[concat(variables('vmName'),'-Backup')]", - "properties": { - "mode": "Incremental", - "parameters": { - "moodleCommon": { - "value": "[parameters('moodleCommon')]" - }, - "vmName": { - "value": "[variables('vmName')]" - } + "storageProfile": { + "imageReference": "[parameters('moodleCommon').osType]", + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "name": "[variables('vmName')]" + }, + "copy": [ + { + "name": "dataDisks", + "count": "[parameters('moodleCommon').fileServerDiskCount]", + "input": { + "managedDisk": { + "storageAccountType": "Premium_LRS" }, - "templateLink": { - "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'recoveryservicesEnlist.json',parameters('moodleCommon').artifactsSasToken)]" - } + "diskSizeGB": "[parameters('moodleCommon').fileServerDiskSize]", + "lun": "[copyIndex('dataDisks')]", + "createOption": "Empty" + } } + ] + } + }, + "tags": { + "displayName": "Gluster Virtual Machine" + } + }, + { + "condition": "[parameters('moodleCommon').applyScriptsSwitch]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',variables('vmName'))]" + ], + "name": "[concat(variables('vmName'),'-ScriptProcessor')]", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[parameters('moodleCommon')]" + }, + "vmName": { + "value": "[ variables('vmName')]" + }, + "vmNumber": { + "value": "[parameters('counter')]" + } + }, + "templateLink": { + "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'glustervmconfig.json',parameters('moodleCommon').artifactsSasToken)]" + } + } + }, + { + "condition": "[parameters('moodleCommon').azureBackupSwitch]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',variables('vmName'))]" + ], + "name": "[concat(variables('vmName'),'-Backup')]", + "properties": { + "mode": "Incremental", + "parameters": { + "moodleCommon": { + "value": "[parameters('moodleCommon')]" + }, + "vmName": { + "value": "[variables('vmName')]" + } + }, + "templateLink": { + "uri": "[concat(parameters('moodleCommon').baseTemplateUrl,'recoveryservicesEnlist.json',parameters('moodleCommon').artifactsSasToken)]" } - ], - "variables": { - "asRef": "[resourceId('Microsoft.Compute/availabilitySets', parameters('moodleCommon').gfxAvailabilitySetName)]", - "documentation01": "This sub-template create the nodes of the gluster farm", - "documentation02": "It expects certain values in the 'common' datastructure.", - "documentation04": " gfxAvailabilitySetName - name of availability set for the gluster farm", - "documentation05": " vnetName - name of virtual network", - "documentation06": " subnetSan - name of subnet for gluster", - "documentation07": " gfsNameRoot - nameroot for the gluster nodes - combined with counter to get actual name of each node - disk and nic follow the naming scheme", - "documentation08": " glusterVmSku - VM instance size for gluster nodes", - "documentation09": " sshUsername - OS accountusername", - "documentation10": " osType - an array of value that specifies the type of VM", - "documentation15": "This sub-template calls other sub-templates", - "documentation17": " glustervmconfig - conditionally applies post-deployment script on the VM", - "documentation18": " recoveryservicesEnlist - conditionally enlists the VM into the backup regimen", - "documentation19": " fileServerDiskCount - Number of disks to raid0 for the gluster mount", - "documentation20": " fileServerDiskSize - Size per disk for gluster", - "nicName": "[concat(variables('vmName'),'-nic')]", - "nicRef": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]", - "subnetSanRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('moodleCommon').vnetName, parameters('moodleCommon').subnetSan)]", - "vmName": "[concat(parameters('moodleCommon').gfsNameRoot,parameters('counter'))]" + } } + ], + "variables": { + "asRef": "[resourceId('Microsoft.Compute/availabilitySets', parameters('moodleCommon').gfxAvailabilitySetName)]", + "documentation01": "This sub-template create the nodes of the gluster farm", + "documentation02": "It expects certain values in the 'common' datastructure.", + "documentation04": " gfxAvailabilitySetName - name of availability set for the gluster farm", + "documentation05": " vnetName - name of virtual network", + "documentation06": " subnetSan - name of subnet for gluster", + "documentation07": " gfsNameRoot - nameroot for the gluster nodes - combined with counter to get actual name of each node - disk and nic follow the naming scheme", + "documentation08": " glusterVmSku - VM instance size for gluster nodes", + "documentation09": " sshUsername - OS accountusername", + "documentation10": " osType - an array of value that specifies the type of VM", + "documentation15": "This sub-template calls other sub-templates", + "documentation17": " glustervmconfig - conditionally applies post-deployment script on the VM", + "documentation18": " recoveryservicesEnlist - conditionally enlists the VM into the backup regimen", + "documentation19": " fileServerDiskCount - Number of disks to raid0 for the gluster mount", + "documentation20": " fileServerDiskSize - Size per disk for gluster", + "nicName": "[concat(variables('vmName'),'-nic')]", + "nicRef": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]", + "subnetSanRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('moodleCommon').vnetName, parameters('moodleCommon').subnetSan)]", + "vmName": "[concat(parameters('moodleCommon').gfsNameRoot,parameters('counter'))]" + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/glustervmconfig.json b/moodle-scalable-cluster-ubuntu/nested/glustervmconfig.json index 59df80deda30..471e011b5a37 100644 --- a/moodle-scalable-cluster-ubuntu/nested/glustervmconfig.json +++ b/moodle-scalable-cluster-ubuntu/nested/glustervmconfig.json @@ -1,58 +1,65 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" + }, + "vmName": { + "metadata": { + "description": "Name of VM to process script - not actually used" + }, + "type": "string" + }, + "vmNumber": { + "metadata": { + "description": "Number of the VM in the pool" + }, + "type": "int" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "name": "[concat(parameters('vmName'),'/','install_gluster')]", + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "settings": { + "fileUris": [ + "[variables('scriptUri')]" + ] }, - "vmName": { - "metadata": { - "description": "Name of VM to process script - not actually used" - }, - "type": "string" + "protectedSettings": { + "commandToExecute": "[variables('cmdExec')]" }, - "vmNumber": { - "metadata": { - "description": "Number of the VM in the pool" - }, - "type": "int" - } - }, - "resources": [ - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "name": "[concat(parameters('vmName'),'/','install_gluster')]", - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "settings": { - "fileUris": [ - "[variables('scriptUri')]" - ] - }, - "protectedSettings":{ - "commandToExecute": "[variables('cmdExec')]" - }, - "type": "CustomScript", - "typeHandlerVersion": "2.0" - }, - "tags": { - "displayName": "GfsVmExtension" - } - } - ], - "variables": { - "cmdExec": "[concat('bash ', parameters('moodleCommon').glusterScriptFilename, ' ', parameters('moodleCommon').gfsNameRoot, ' ', parameters('moodleCommon').subnetSanPrefix, ' data ', parameters('vmNumber'), ' ', parameters('moodleCommon').glusterVmCount)]", - "documentation01": "This sub-template applies a specific post-deployment script to the gluster vms", - "documentation02": "It expects certain values in the 'common' datastructure.", - "documentation03": " scriptLocation - partial web URI (equivalent to folder)", - "documentation04": " glusterScriptFilename - name of script file", - "documentation06": " gfsNameRoot - nameroot of gluster farm - note that the code applies a vmNumber to get to the specific node", - "documentation07": " glusterVmCount - database (mariadb) password", - "scriptUri": "[concat(parameters('moodleCommon').scriptLocation,parameters('moodleCommon').glusterScriptFilename,parameters('moodleCommon').artifactsSasToken)]" + "type": "CustomScript", + "typeHandlerVersion": "2.0" + }, + "tags": { + "displayName": "GfsVmExtension" + } } + ], + "variables": { + "cmdExec": "[concat('bash ', parameters('moodleCommon').glusterScriptFilename, ' ', parameters('moodleCommon').gfsNameRoot, ' ', parameters('moodleCommon').subnetSanPrefix, ' data ', parameters('vmNumber'), ' ', parameters('moodleCommon').glusterVmCount)]", + "documentation01": "This sub-template applies a specific post-deployment script to the gluster vms", + "documentation02": "It expects certain values in the 'common' datastructure.", + "documentation03": " scriptLocation - partial web URI (equivalent to folder)", + "documentation04": " glusterScriptFilename - name of script file", + "documentation06": " gfsNameRoot - nameroot of gluster farm - note that the code applies a vmNumber to get to the specific node", + "documentation07": " glusterVmCount - database (mariadb) password", + "scriptUri": "[concat(parameters('moodleCommon').scriptLocation,parameters('moodleCommon').glusterScriptFilename,parameters('moodleCommon').artifactsSasToken)]" + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/mysql.json b/moodle-scalable-cluster-ubuntu/nested/mysql.json index c2242f8d871f..ebe2e577c4fe 100644 --- a/moodle-scalable-cluster-ubuntu/nested/mysql.json +++ b/moodle-scalable-cluster-ubuntu/nested/mysql.json @@ -1,63 +1,70 @@ { - "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - } + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" }, - "resources": [ + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.DBforMySQL/servers", + "apiVersion": "2017-04-30-preview", + "kind": "", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').serverName]", + "properties": { + "administratorLogin": "[parameters('moodleCommon').dbLogin]", + "administratorLoginPassword": "[parameters('moodleCommon').dbLoginPassword]", + "sslEnforcement": "[parameters('moodleCommon').sslEnforcement]", + "storageMB": "[parameters('moodleCommon').skuSizeMB]", + "version": "[parameters('moodleCommon').mysqlVersion]" + }, + "resources": [ { - "type": "Microsoft.DBforMySQL/servers", - "apiVersion": "2017-04-30-preview", - "kind": "", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').serverName]", - "properties": { - "administratorLogin": "[parameters('moodleCommon').dbLogin]", - "administratorLoginPassword": "[parameters('moodleCommon').dbLoginPassword]", - "sslEnforcement": "[parameters('moodleCommon').sslEnforcement]", - "storageMB": "[parameters('moodleCommon').skuSizeMB]", - "version": "[parameters('moodleCommon').mysqlVersion]" - }, - "resources": [ - { - "apiVersion": "2017-04-30-preview", - "dependsOn": [ - "[concat('Microsoft.DBforMySQL/servers/', parameters('moodleCommon').serverName)]" - ], - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').firewallRuleName]", - "properties": { - "startIpAddress": "0.0.0.0", - "endIpAddress": "255.255.255.255" - }, - "type": "firewallRules" - } - ], - "sku": { - "capacity": "[parameters('moodleCommon').skuCapacityDTU]", - "family": "[parameters('moodleCommon').skuFamily]", - "name": "[parameters('moodleCommon').skuName]", - "size": "[parameters('moodleCommon').skuSizeMB]", - "tier": "[parameters('moodleCommon').skuTier]" - } + "apiVersion": "2017-04-30-preview", + "dependsOn": [ + "[concat('Microsoft.DBforMySQL/servers/', parameters('moodleCommon').serverName)]" + ], + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').firewallRuleName]", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + }, + "type": "firewallRules" } - ], - "variables": { - "documentation1": "This sub-template creates a mysql server. It expects certain values in the 'common' datastructure.", - "documentation10": " serverName - Mysql server name", - "documentation11": " mysqlVersion - Mysql version", - "documentation2": " administratorLogin - mysql admin username", - "documentation3": " administratorLoginPassword - mysql admin password", - "documentation4": " location - Mysql server location", - "documentation5": " skuCapacityDTU - Mysql database trasaction units", - "documentation6": " skuFamily - Mysql sku family", - "documentation7": " skuName - Mysql sku name", - "documentation8": " skuSizeMB - Mysql sku size in mb", - "documentation9": " skuTier - Mysql sku tier" + ], + "sku": { + "capacity": "[parameters('moodleCommon').skuCapacityDTU]", + "family": "[parameters('moodleCommon').skuFamily]", + "name": "[parameters('moodleCommon').skuName]", + "size": "[parameters('moodleCommon').skuSizeMB]", + "tier": "[parameters('moodleCommon').skuTier]" + } } + ], + "variables": { + "documentation1": "This sub-template creates a mysql server. It expects certain values in the 'common' datastructure.", + "documentation10": " serverName - Mysql server name", + "documentation11": " mysqlVersion - Mysql version", + "documentation2": " administratorLogin - mysql admin username", + "documentation3": " administratorLoginPassword - mysql admin password", + "documentation4": " location - Mysql server location", + "documentation5": " skuCapacityDTU - Mysql database trasaction units", + "documentation6": " skuFamily - Mysql sku family", + "documentation7": " skuName - Mysql sku name", + "documentation8": " skuSizeMB - Mysql sku size in mb", + "documentation9": " skuTier - Mysql sku tier" + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/network.json b/moodle-scalable-cluster-ubuntu/nested/network.json index 42c2d82ee575..e73169ff0b83 100644 --- a/moodle-scalable-cluster-ubuntu/nested/network.json +++ b/moodle-scalable-cluster-ubuntu/nested/network.json @@ -1,232 +1,239 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" }, - "resources": [ - { - "type": "Microsoft.Network/virtualNetworks", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').vnetName]", + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').vnetName]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[concat(parameters('moodleCommon').vNetAddressSpace,'/16')]" + ] + }, + "subnets": [ + { + "name": "[parameters('moodleCommon').subnetWeb]", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[concat(parameters('moodleCommon').vNetAddressSpace,'/16')]" - ] - }, - "subnets": [ - { - "name": "[parameters('moodleCommon').subnetWeb]", - "properties": { - "addressPrefix": "[parameters('moodleCommon').subnetWebRange]" - } - }, - { - "name": "[parameters('moodleCommon').subnetSan]", - "properties": { - "addressPrefix": "[parameters('moodleCommon').subnetSanRange]" - } - }, - { - "name": "[parameters('moodleCommon').subnetRedis]", - "properties": { - "addressPrefix": "[parameters('moodleCommon').subnetRedisRange]" - } - }, - { - "name": "[parameters('moodleCommon').subnetElastic]", - "properties": { - "addressPrefix": "[parameters('moodleCommon').subnetElasticRange]" - } - }, - { - "name": "[parameters('moodleCommon').gatewaySubnet]", - "properties": { - "addressPrefix": "[parameters('moodleCommon').gatewaySubnetRange]" - } - } - ] + "addressPrefix": "[parameters('moodleCommon').subnetWebRange]" } - }, - { - "condition": "[parameters('moodleCommon').vnetGwDeploySwitch]", - "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').gatewayPublicIPName]", + }, + { + "name": "[parameters('moodleCommon').subnetSan]", "properties": { - "publicIPAllocationMethod": "Dynamic" - }, - "tags": { - "displayName": "Virtual network gateway Public IP" + "addressPrefix": "[parameters('moodleCommon').subnetSanRange]" } - }, - { - "condition": "[parameters('moodleCommon').vnetGwDeploySwitch]", - "type": "Microsoft.Network/virtualNetworks/subnets", - "apiVersion": "2017-10-01", - "dependsOn": [ - "[resourceId('Microsoft.Network/virtualNetworks', parameters('moodleCommon').vnetName)]" - ], - "name": "[concat(parameters('moodleCommon').vnetName, '/', parameters('moodleCommon').gatewaySubnet)]", + }, + { + "name": "[parameters('moodleCommon').subnetRedis]", "properties": { - "addressPrefix": "[parameters('moodleCommon').gatewaySubnetRange]" + "addressPrefix": "[parameters('moodleCommon').subnetRedisRange]" } - }, - { - "condition": "[parameters('moodleCommon').vnetGwDeploySwitch]", - "type": "Microsoft.Network/virtualNetworkGateways", - "apiVersion": "2017-10-01", - "dependsOn": [ - "[resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').gatewayPublicIPName)]", - "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('moodleCommon').vnetName, parameters('moodleCommon').gatewaySubnet)]" - ], - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').gatewayName]", + }, + { + "name": "[parameters('moodleCommon').subnetElastic]", "properties": { - "activeActive": false, - "enableBgp": false, - "gatewayType": "[parameters('moodleCommon').gatewayType]", - "ipConfigurations": [ - { - "name": "vnet-Gateway-Config", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').gatewayPublicIPName)]" - }, - "subnet": { - "id": "[variables('gatewaySubnetRef')]" - } - } - } - ], - "sku": { - "name": "VpnGw1", - "tier": "VpnGw1", - "capacity": 2 - }, - "vpnType": "[parameters('moodleCommon').vpnType]" + "addressPrefix": "[parameters('moodleCommon').subnetElasticRange]" } - }, - { - "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').lbPipName]", + }, + { + "name": "[parameters('moodleCommon').gatewaySubnet]", + "properties": { + "addressPrefix": "[parameters('moodleCommon').gatewaySubnetRange]" + } + } + ] + } + }, + { + "condition": "[parameters('moodleCommon').vnetGwDeploySwitch]", + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').gatewayPublicIPName]", + "properties": { + "publicIPAllocationMethod": "Dynamic" + }, + "tags": { + "displayName": "Virtual network gateway Public IP" + } + }, + { + "condition": "[parameters('moodleCommon').vnetGwDeploySwitch]", + "type": "Microsoft.Network/virtualNetworks/subnets", + "apiVersion": "2017-10-01", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', parameters('moodleCommon').vnetName)]" + ], + "name": "[concat(parameters('moodleCommon').vnetName, '/', parameters('moodleCommon').gatewaySubnet)]", + "properties": { + "addressPrefix": "[parameters('moodleCommon').gatewaySubnetRange]" + } + }, + { + "condition": "[parameters('moodleCommon').vnetGwDeploySwitch]", + "type": "Microsoft.Network/virtualNetworkGateways", + "apiVersion": "2017-10-01", + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').gatewayPublicIPName)]", + "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('moodleCommon').vnetName, parameters('moodleCommon').gatewaySubnet)]" + ], + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').gatewayName]", + "properties": { + "activeActive": false, + "enableBgp": false, + "gatewayType": "[parameters('moodleCommon').gatewayType]", + "ipConfigurations": [ + { + "name": "vnet-Gateway-Config", "properties": { - "dnsSettings": { - "domainNameLabel": "[parameters('moodleCommon').lbName]" - }, - "publicIPAllocationMethod": "Static" - }, - "tags": { - "displayName": "Load Balancer Public IP" + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').gatewayPublicIPName)]" + }, + "subnet": { + "id": "[variables('gatewaySubnetRef')]" + } } + } + ], + "sku": { + "name": "VpnGw1", + "tier": "VpnGw1", + "capacity": 2 + }, + "vpnType": "[parameters('moodleCommon').vpnType]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').lbPipName]", + "properties": { + "dnsSettings": { + "domainNameLabel": "[parameters('moodleCommon').lbName]" }, - { - "type": "Microsoft.Network/loadBalancers", - "apiVersion": "2017-10-01", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/',parameters('moodleCommon').lbPipName)]" - ], - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').lbName]", + "publicIPAllocationMethod": "Static" + }, + "tags": { + "displayName": "Load Balancer Public IP" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2017-10-01", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/',parameters('moodleCommon').lbPipName)]" + ], + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').lbName]", + "properties": { + "backendAddressPools": [ + { + "name": "[parameters('moodleCommon').extBeName ]" + } + ], + "frontendIPConfigurations": [ + { + "name": "[parameters('moodleCommon').extFeName ]", + "properties": { + "publicIPAddress": { + "id": "[variables('pipID')]" + } + } + } + ], + "loadBalancingRules": [ + { + "name": "Http", + "properties": { + "backendAddressPool": { + "id": "[variables('extBeID')]" + }, + "backendPort": 80, + "enableFloatingIP": false, + "frontendIPConfiguration": { + "id": "[variables('extFeID')]" + }, + "frontendPort": 80, + "idleTimeoutInMinutes": 5, + "probe": { + "id": "[variables('extProbeID')]" + }, + "protocol": "Tcp" + } + }, + { + "name": "Https", + "properties": { + "backendAddressPool": { + "id": "[variables('extBeID')]" + }, + "backendPort": 443, + "enableFloatingIP": false, + "frontendIPConfiguration": { + "id": "[variables('extFeID')]" + }, + "frontendPort": 443, + "idleTimeoutInMinutes": 5, + "probe": { + "id": "[variables('extProbeID')]" + }, + "protocol": "Tcp" + } + } + ], + "probes": [ + { + "name": "[parameters('moodleCommon').extProbe ]", "properties": { - "backendAddressPools": [ - { - "name": "[parameters('moodleCommon').extBeName ]" - } - ], - "frontendIPConfigurations": [ - { - "name": "[parameters('moodleCommon').extFeName ]", - "properties": { - "publicIPAddress": { - "id": "[variables('pipID')]" - } - } - } - ], - "loadBalancingRules": [ - { - "name": "Http", - "properties": { - "backendAddressPool": { - "id": "[variables('extBeID')]" - }, - "backendPort": 80, - "enableFloatingIP": false, - "frontendIPConfiguration": { - "id": "[variables('extFeID')]" - }, - "frontendPort": 80, - "idleTimeoutInMinutes": 5, - "probe": { - "id": "[variables('extProbeID')]" - }, - "protocol": "Tcp" - } - }, - { - "name": "Https", - "properties": { - "backendAddressPool": { - "id": "[variables('extBeID')]" - }, - "backendPort": 443, - "enableFloatingIP": false, - "frontendIPConfiguration": { - "id": "[variables('extFeID')]" - }, - "frontendPort": 443, - "idleTimeoutInMinutes": 5, - "probe": { - "id": "[variables('extProbeID')]" - }, - "protocol": "Tcp" - } - } - ], - "probes": [ - { - "name": "[parameters('moodleCommon').extProbe ]", - "properties": { - "intervalInSeconds": 5, - "numberOfProbes": 3, - "port": 80, - "protocol": "Tcp" - } - } - ] + "intervalInSeconds": 5, + "numberOfProbes": 3, + "port": 80, + "protocol": "Tcp" } - } - ], - "variables": { - "documentation01": "This sub-template creates a virtual network with three subnets and then creates the moodle load-balancer with public IP/dns", - "documentation02": "It expects certain values in the 'common' datastructure.", - "documentation03": " vnetName - name of virtual network", - "documentation04": " vNetAddressSpace - base of address of 16 bit address range", - "documentation05": " subnetWeb - name of subnet inside virtual network - will be assigned the .0.0/24 range", - "documentation06": " subnetSan - name of subnet inside virtual network - will be assigned the .1.0/24 range", - "documentation07": " subnetRedis - name of subnet inside virtual network - will be assigned the .3.0/24 range", - "documentation08": " subnetElastic - name of subnet inside virtual network - will be assigned the .4.0/24 range", - "documentation09": " gatewaySubnet - name of subnet inside virtual network - will be assigned the .2.0/24 range", - "documentation10": " lbPipName - name of public IP", - "documentation11": " lbName - name of Moodl load balancer", - "extBeID": "[concat(variables('extLbID'),'/backendAddressPools/',parameters('moodleCommon').extBeName)]", - "extFeID": "[concat(variables('extLbID'),'/frontendIPConfigurations/',parameters('moodleCommon').extFeName)]", - "extLbID": "[resourceId('Microsoft.Network/loadBalancers',parameters('moodleCommon').lbName)]", - "extNatPoolID": "[concat(variables('extLbID'),'/inboundNatPools/',parameters('moodleCommon').extNatPool)]", - "extProbeID": "[concat(variables('extLbID'),'/probes/',parameters('moodleCommon').extProbe)]", - "gatewaySubnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('moodleCommon').vnetName),'/subnets/',parameters('moodleCommon').gatewaySubnet)]", - "pipID": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('moodleCommon').lbPipName)]" + } + ] + } } + ], + "variables": { + "documentation01": "This sub-template creates a virtual network with three subnets and then creates the moodle load-balancer with public IP/dns", + "documentation02": "It expects certain values in the 'common' datastructure.", + "documentation03": " vnetName - name of virtual network", + "documentation04": " vNetAddressSpace - base of address of 16 bit address range", + "documentation05": " subnetWeb - name of subnet inside virtual network - will be assigned the .0.0/24 range", + "documentation06": " subnetSan - name of subnet inside virtual network - will be assigned the .1.0/24 range", + "documentation07": " subnetRedis - name of subnet inside virtual network - will be assigned the .3.0/24 range", + "documentation08": " subnetElastic - name of subnet inside virtual network - will be assigned the .4.0/24 range", + "documentation09": " gatewaySubnet - name of subnet inside virtual network - will be assigned the .2.0/24 range", + "documentation10": " lbPipName - name of public IP", + "documentation11": " lbName - name of Moodl load balancer", + "extBeID": "[concat(variables('extLbID'),'/backendAddressPools/',parameters('moodleCommon').extBeName)]", + "extFeID": "[concat(variables('extLbID'),'/frontendIPConfigurations/',parameters('moodleCommon').extFeName)]", + "extLbID": "[resourceId('Microsoft.Network/loadBalancers',parameters('moodleCommon').lbName)]", + "extNatPoolID": "[concat(variables('extLbID'),'/inboundNatPools/',parameters('moodleCommon').extNatPool)]", + "extProbeID": "[concat(variables('extLbID'),'/probes/',parameters('moodleCommon').extProbe)]", + "gatewaySubnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('moodleCommon').vnetName),'/subnets/',parameters('moodleCommon').gatewaySubnet)]", + "pipID": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('moodleCommon').lbPipName)]" + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/postgres.json b/moodle-scalable-cluster-ubuntu/nested/postgres.json index 798959e24918..cf485a06d552 100644 --- a/moodle-scalable-cluster-ubuntu/nested/postgres.json +++ b/moodle-scalable-cluster-ubuntu/nested/postgres.json @@ -1,63 +1,70 @@ { - "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - } + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" }, - "resources": [ + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.DBforPostgreSQL/servers", + "apiVersion": "2017-04-30-preview ", + "kind": "", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').serverName]", + "properties": { + "administratorLogin": "[parameters('moodleCommon').dbLogin]", + "administratorLoginPassword": "[parameters('moodleCommon').dbLoginPassword]", + "sslEnforcement": "[parameters('moodleCommon').sslEnforcement]", + "storageMB": "[parameters('moodleCommon').skuSizeMB]", + "version": "[parameters('moodleCommon').postgresVersion]" + }, + "resources": [ { - "type": "Microsoft.DBforPostgreSQL/servers", - "apiVersion": "2017-04-30-preview ", - "kind": "", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').serverName]", - "properties": { - "administratorLogin": "[parameters('moodleCommon').dbLogin]", - "administratorLoginPassword": "[parameters('moodleCommon').dbLoginPassword]", - "sslEnforcement": "[parameters('moodleCommon').sslEnforcement]", - "storageMB": "[parameters('moodleCommon').skuSizeMB]", - "version": "[parameters('moodleCommon').postgresVersion]" - }, - "resources": [ - { - "apiVersion": "2017-04-30-preview ", - "dependsOn": [ - "[concat('Microsoft.DBforPostgreSQL/servers/', parameters('moodleCommon').serverName)]" - ], - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').firewallRuleName]", - "properties": { - "startIpAddress": "0.0.0.0", - "endIpAddress": "255.255.255.255" - }, - "type": "firewallRules" - } - ], - "sku": { - "capacity": "[parameters('moodleCommon').skuCapacityDTU]", - "family": "[parameters('moodleCommon').skuFamily]", - "name": "[parameters('moodleCommon').skuName]", - "size": "[parameters('moodleCommon').skuSizeMB]", - "tier": "[parameters('moodleCommon').skuTier]" - } + "apiVersion": "2017-04-30-preview ", + "dependsOn": [ + "[concat('Microsoft.DBforPostgreSQL/servers/', parameters('moodleCommon').serverName)]" + ], + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').firewallRuleName]", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + }, + "type": "firewallRules" } - ], - "variables": { - "documentation1": "This sub-template creates a postgresql server. It expects certain values in the 'common' datastructure.", - "documentation10": " serverName - Postgresql server name", - "documentation11": " postgresVersion - Postgresql version", - "documentation2": " administratorLogin - postgresql admin username", - "documentation3": " administratorLoginPassword - postgresql admin password", - "documentation4": " location - Postgresql server location", - "documentation5": " skuCapacityDTU - Postgresql database trasaction units", - "documentation6": " skuFamily - Postgresql sku family", - "documentation7": " skuName - Postgresql sku name", - "documentation8": " skuSizeMB - Postgresql sku size in mb", - "documentation9": " skuTier - Postgresql sku tier" + ], + "sku": { + "capacity": "[parameters('moodleCommon').skuCapacityDTU]", + "family": "[parameters('moodleCommon').skuFamily]", + "name": "[parameters('moodleCommon').skuName]", + "size": "[parameters('moodleCommon').skuSizeMB]", + "tier": "[parameters('moodleCommon').skuTier]" + } } + ], + "variables": { + "documentation1": "This sub-template creates a postgresql server. It expects certain values in the 'common' datastructure.", + "documentation10": " serverName - Postgresql server name", + "documentation11": " postgresVersion - Postgresql version", + "documentation2": " administratorLogin - postgresql admin username", + "documentation3": " administratorLoginPassword - postgresql admin password", + "documentation4": " location - Postgresql server location", + "documentation5": " skuCapacityDTU - Postgresql database trasaction units", + "documentation6": " skuFamily - Postgresql sku family", + "documentation7": " skuName - Postgresql sku name", + "documentation8": " skuSizeMB - Postgresql sku size in mb", + "documentation9": " skuTier - Postgresql sku tier" + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/recoveryservices.json b/moodle-scalable-cluster-ubuntu/nested/recoveryservices.json index 5ab98ee8d1d7..e10b5f8eb848 100644 --- a/moodle-scalable-cluster-ubuntu/nested/recoveryservices.json +++ b/moodle-scalable-cluster-ubuntu/nested/recoveryservices.json @@ -1,97 +1,104 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" }, - "resources": [ - { - "type": "Microsoft.RecoveryServices/vaults", - "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').vaultName]", - "properties": {}, - "sku": { - "name": "RS0", - "tier": "Standard" - } - }, - { - "type": "Microsoft.RecoveryServices/vaults/backupPolicies", - "apiVersion": "2017-07-01", - "dependsOn": [ - "[concat('Microsoft.RecoveryServices/vaults/', parameters('moodleCommon').vaultName)]" - ], - "location": "[resourceGroup().location]", - "name": "[concat(parameters('moodleCommon').vaultName, '/', parameters('moodleCommon').policyName)]", - "properties": { - "backupManagementType": "AzureIaasVM", - "retentionPolicy": { - "dailySchedule": { - "retentionDuration": { - "count": "[variables( 'dailyRetentionDurationCount')]", - "durationType": "Days" - }, - "retentionTimes": "[variables('scheduleRunTimes')]" - }, - "monthlySchedule": { - "retentionDuration": { - "count": "[variables('monthlyRetentionDurationCount')]", - "durationType": "Months" - }, - "retentionScheduleDaily": { - "daysOfTheMonth": [ - { - "date": 1, - "isLast": false - } - ] - }, - "retentionScheduleFormatType": "Daily", - "retentionScheduleWeekly": null, - "retentionTimes": "[variables('scheduleRunTimes')]" - }, - "retentionPolicyType": "LongTermRetentionPolicy", - "weeklySchedule": { - "daysOfTheWeek": "[variables('daysOfTheWeek')]", - "retentionDuration": { - "count": "[variables( 'weeklyRetentionDurationCount')]", - "durationType": "Weeks" - }, - "retentionTimes": "[variables('scheduleRunTimes')]" - } - }, - "schedulePolicy": { - "schedulePolicyType": "SimpleSchedulePolicy", - "scheduleRunDays": null, - "scheduleRunFrequency": "Daily", - "scheduleRunTimes": "[variables('scheduleRunTimes')]" + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.RecoveryServices/vaults", + "apiVersion": "2016-06-01", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').vaultName]", + "properties": {}, + "sku": { + "name": "RS0", + "tier": "Standard" + } + }, + { + "type": "Microsoft.RecoveryServices/vaults/backupPolicies", + "apiVersion": "2017-07-01", + "dependsOn": [ + "[concat('Microsoft.RecoveryServices/vaults/', parameters('moodleCommon').vaultName)]" + ], + "location": "[parameters('location')]", + "name": "[concat(parameters('moodleCommon').vaultName, '/', parameters('moodleCommon').policyName)]", + "properties": { + "backupManagementType": "AzureIaasVM", + "retentionPolicy": { + "dailySchedule": { + "retentionDuration": { + "count": "[variables( 'dailyRetentionDurationCount')]", + "durationType": "Days" + }, + "retentionTimes": "[variables('scheduleRunTimes')]" + }, + "monthlySchedule": { + "retentionDuration": { + "count": "[variables('monthlyRetentionDurationCount')]", + "durationType": "Months" + }, + "retentionScheduleDaily": { + "daysOfTheMonth": [ + { + "date": 1, + "isLast": false } - } + ] + }, + "retentionScheduleFormatType": "Daily", + "retentionScheduleWeekly": null, + "retentionTimes": "[variables('scheduleRunTimes')]" + }, + "retentionPolicyType": "LongTermRetentionPolicy", + "weeklySchedule": { + "daysOfTheWeek": "[variables('daysOfTheWeek')]", + "retentionDuration": { + "count": "[variables( 'weeklyRetentionDurationCount')]", + "durationType": "Weeks" + }, + "retentionTimes": "[variables('scheduleRunTimes')]" + } + }, + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunDays": null, + "scheduleRunFrequency": "Daily", + "scheduleRunTimes": "[variables('scheduleRunTimes')]" } - ], - "variables": { - "dailyRetentionDurationCount": 7, - "daysOfTheWeek": [ - "Sunday" - ], - "documentation1": "This sub-template creates a recovery services vault. It expects certain values in the 'common' datastructure.", - "documentation2": " vaultName - name of virtual network", - "documentation3": " policyName - name of backup policy inside vault", - "documentation4": "", - "documentation5": "The policy will create a daily backup with the following retentions", - "documentation6": " Daily - keep last 7 daily", - "documentation7": " Weekly - keep last 4 Sundays", - "documentation8": " Monthly - keep last 6 1st-of-the-month", - "monthlyRetentionDurationCount": 6, - "scheduleRunTimes": [ - "2017-01-01T22:30:00Z" - ], - "weeklyRetentionDurationCount": 4 + } } + ], + "variables": { + "dailyRetentionDurationCount": 7, + "daysOfTheWeek": [ + "Sunday" + ], + "documentation1": "This sub-template creates a recovery services vault. It expects certain values in the 'common' datastructure.", + "documentation2": " vaultName - name of virtual network", + "documentation3": " policyName - name of backup policy inside vault", + "documentation4": "", + "documentation5": "The policy will create a daily backup with the following retentions", + "documentation6": " Daily - keep last 7 daily", + "documentation7": " Weekly - keep last 4 Sundays", + "documentation8": " Monthly - keep last 6 1st-of-the-month", + "monthlyRetentionDurationCount": 6, + "scheduleRunTimes": [ + "2017-01-01T22:30:00Z" + ], + "weeklyRetentionDurationCount": 4 + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/recoveryservicesEnlist.json b/moodle-scalable-cluster-ubuntu/nested/recoveryservicesEnlist.json index 4b9ccccedd9f..066bcca692d4 100644 --- a/moodle-scalable-cluster-ubuntu/nested/recoveryservicesEnlist.json +++ b/moodle-scalable-cluster-ubuntu/nested/recoveryservicesEnlist.json @@ -1,41 +1,48 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - }, - "vmName": { - "metadata": { - "description": "Name of VM to enlist in AzureBackup" - }, - "type": "string" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" }, - "resources": [ - { - "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", - "apiVersion": "2016-06-01", - "location": "[resourceGroup().location]", - "name": "[concat(parameters('moodleCommon').vaultName, '/', variables('backupFabric'), '/', variables('v2VmContainer'), concat(resourceGroup().name,';',parameters('vmName')), '/', variables('v2Vm'), concat(resourceGroup().name,';',parameters('vmName')))]", - "properties": { - "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies',parameters('moodleCommon').vaultName,parameters('moodleCommon').policyName )]", - "protectedItemType": "[variables('v2VmType')]", - "sourceResourceId": "[resourceId(subscription().subscriptionId,resourceGroup().name,'Microsoft.Compute/virtualMachines',parameters('vmName'))]" - } - } - ], - "variables": { - "backupFabric": "Azure", - "documentation1": "This sub-template adds a VM to the recovery services vault. It expects certain values in the 'common' datastructure.", - "documentation2": " vaultName - name of virtual network", - "documentation3": " policyName - name of backup policy inside vault", - "documentation4": "", - "v2Vm": "vm;iaasvmcontainerv2;", - "v2VmContainer": "iaasvmcontainer;iaasvmcontainerv2;", - "v2VmType": "Microsoft.Compute/virtualMachines" + "vmName": { + "metadata": { + "description": "Name of VM to enlist in AzureBackup" + }, + "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", + "apiVersion": "2016-06-01", + "location": "[parameters('location')]", + "name": "[concat(parameters('moodleCommon').vaultName, '/', variables('backupFabric'), '/', variables('v2VmContainer'), concat(resourceGroup().name,';',parameters('vmName')), '/', variables('v2Vm'), concat(resourceGroup().name,';',parameters('vmName')))]", + "properties": { + "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies',parameters('moodleCommon').vaultName,parameters('moodleCommon').policyName )]", + "protectedItemType": "[variables('v2VmType')]", + "sourceResourceId": "[resourceId(subscription().subscriptionId,resourceGroup().name,'Microsoft.Compute/virtualMachines',parameters('vmName'))]" + } } + ], + "variables": { + "backupFabric": "Azure", + "documentation1": "This sub-template adds a VM to the recovery services vault. It expects certain values in the 'common' datastructure.", + "documentation2": " vaultName - name of virtual network", + "documentation3": " policyName - name of backup policy inside vault", + "documentation4": "", + "v2Vm": "vm;iaasvmcontainerv2;", + "v2VmContainer": "iaasvmcontainer;iaasvmcontainerv2;", + "v2VmType": "Microsoft.Compute/virtualMachines" + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/storageAccount.json b/moodle-scalable-cluster-ubuntu/nested/storageAccount.json index 6091db752d4f..8768324dc3fc 100644 --- a/moodle-scalable-cluster-ubuntu/nested/storageAccount.json +++ b/moodle-scalable-cluster-ubuntu/nested/storageAccount.json @@ -1,49 +1,56 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').storageAccountName]", - "kind": "Storage", - "sku": { - "name": "[parameters('moodleCommon').storageAccountType]" + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').storageAccountName]", + "kind": "Storage", + "sku": { + "name": "[parameters('moodleCommon').storageAccountType]" + }, + "properties": { + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true }, - "properties": { - "encryption": { - "keySource": "Microsoft.Storage", - "services": { - "blob": { - "enabled": true - }, - "file": { - "enabled": true - } - } - }, - "networkAcls": { - "bypass": "AzureServices", - "defaultAction": "Allow", - "ipRules": [], - "virtualNetworkRules": [] - }, - "supportsHttpsTrafficOnly": true + "file": { + "enabled": true } - } - ], - "variables": { - "documentation1": "This sub-template creates a storage account. It expects certain values in the 'common' datastructure.", - "documentation2": " storageAccountName - name of storage account", - "documentation3": " storageAccountType - type of storage account" + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "supportsHttpsTrafficOnly": true + } } + ], + "variables": { + "documentation1": "This sub-template creates a storage account. It expects certain values in the 'common' datastructure.", + "documentation2": " storageAccountName - name of storage account", + "documentation3": " storageAccountType - type of storage account" + } } diff --git a/moodle-scalable-cluster-ubuntu/nested/webvmss.json b/moodle-scalable-cluster-ubuntu/nested/webvmss.json index 80ee60628a20..ea3e56d94598 100644 --- a/moodle-scalable-cluster-ubuntu/nested/webvmss.json +++ b/moodle-scalable-cluster-ubuntu/nested/webvmss.json @@ -1,204 +1,211 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "moodleCommon": { - "metadata": { - "description": "Common Moodle values" - }, - "type": "object" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "moodleCommon": { + "metadata": { + "description": "Common Moodle values" + }, + "type": "object" }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').vmssdStorageAccounttName]", - "kind": "Storage", - "sku": { - "name": "Standard_LRS" - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').vmssdStorageAccounttName]", + "kind": "Storage", + "sku": { + "name": "Standard_LRS" + } + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "2017-03-30", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('moodleCommon').vmssdStorageAccounttName)]" + ], + "location": "[parameters('location')]", + "name": "[parameters('moodleCommon').vmssName]", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" }, - { - "type": "Microsoft.Compute/virtualMachineScaleSets", - "apiVersion": "2017-03-30", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', parameters('moodleCommon').vmssdStorageAccounttName)]" - ], - "location": "[resourceGroup().location]", - "name": "[parameters('moodleCommon').vmssName]", - "properties": { - "overprovision": true, - "upgradePolicy": { - "mode": "Manual" - }, - "virtualMachineProfile": { - "extensionProfile": { - "extensions": [ - { - "name": "setup_moodle", - "properties": { - "autoUpgradeMinorVersion": true, - "publisher": "Microsoft.Azure.Extensions", - "settings": { - "fileUris": [ - "[variables('scriptUri')]", - "[parameters('moodleCommon').commonFunctionsScriptUri]" - ] - }, - "protectedSettings":{ - "commandToExecute": "[concat('bash ',parameters('moodleCommon').webServerSetupScriptFilename,' ',parameters('moodleCommon').gfsNameRoot,'0', ' ','data', ' ', parameters('moodleCommon').siteURL, ' ', concat('jumpbox-vm-',parameters('moodleCommon').resourcesPrefix), ' ', parameters('moodleCommon').webServerType, ' ', parameters('moodleCommon').fileServerType, ' ', parameters('moodleCommon').storageAccountName, ' ', listKeys(variables('storageAccountId'), '2017-06-01').keys[0].value, ' ', parameters('moodleCommon').jboxVmName)]" - }, - "type": "CustomScript", - "typeHandlerVersion": "2.0" - } - } - ] - }, - "networkProfile": { - "networkInterfaceConfigurations": [ - { - "name": "vmssnic", - "properties": { - "ipConfigurations": [ - { - "name": "ipcfg_lb", - "properties": { - "loadBalancerBackendAddressPools": [ - { - "id": "[variables('extBeID')]" - } - ], - "subnet": { - "id": "[variables('subnetWebRef')]" - } - } - } - ], - "primary": true - } - } - ] - }, - "osProfile": { - "adminUsername": "[parameters('moodleCommon').sshUsername]", - "computerNamePrefix": "[parameters('moodleCommon').vmssName]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "path": "[concat('/home/', parameters('moodleCommon').sshUsername, '/.ssh/authorized_keys')]", - "keyData": "[parameters('moodleCommon').sshPublicKey]" - } - ] - } - } - }, - "storageProfile": { - "imageReference": "[parameters('moodleCommon').osType]", - "osDisk": { - "caching": "ReadOnly", - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "Standard_LRS" - } + "virtualMachineProfile": { + "extensionProfile": { + "extensions": [ + { + "name": "setup_moodle", + "properties": { + "autoUpgradeMinorVersion": true, + "publisher": "Microsoft.Azure.Extensions", + "settings": { + "fileUris": [ + "[variables('scriptUri')]", + "[parameters('moodleCommon').commonFunctionsScriptUri]" + ] + }, + "protectedSettings": { + "commandToExecute": "[concat('bash ',parameters('moodleCommon').webServerSetupScriptFilename,' ',parameters('moodleCommon').gfsNameRoot,'0', ' ','data', ' ', parameters('moodleCommon').siteURL, ' ', concat('jumpbox-vm-',parameters('moodleCommon').resourcesPrefix), ' ', parameters('moodleCommon').webServerType, ' ', parameters('moodleCommon').fileServerType, ' ', parameters('moodleCommon').storageAccountName, ' ', listKeys(variables('storageAccountId'), '2017-06-01').keys[0].value, ' ', parameters('moodleCommon').jboxVmName)]" + }, + "type": "CustomScript", + "typeHandlerVersion": "2.0" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "vmssnic", + "properties": { + "ipConfigurations": [ + { + "name": "ipcfg_lb", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('extBeID')]" + } + ], + "subnet": { + "id": "[variables('subnetWebRef')]" } + } } + ], + "primary": true } - }, - "sku": { - "capacity": 2, - "name": "[parameters('moodleCommon').autoscaleVmSku]", - "tier": "Standard" - }, - "tags": { - "displayName": "webfarm" + } + ] + }, + "osProfile": { + "adminUsername": "[parameters('moodleCommon').sshUsername]", + "computerNamePrefix": "[parameters('moodleCommon').vmssName]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[concat('/home/', parameters('moodleCommon').sshUsername, '/.ssh/authorized_keys')]", + "keyData": "[parameters('moodleCommon').sshPublicKey]" + } + ] + } } - }, - { - "type": "Microsoft.Insights/autoscaleSettings", - "apiVersion": "2015-04-01", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachineScaleSets/', parameters('moodleCommon').vmssName)]" - ], - "location": "[resourceGroup().location]", - "name": "autoscalewad", - "properties": { - "enabled": true, - "name": "autoscalewad", - "profiles": [ - { - "capacity": { - "default": "2", - "maximum": "[parameters('moodleCommon').autoscaleVmCount]", - "minimum": "2" - }, - "name": "Profile1", - "rules": [ - { - "metricTrigger": { - "metricName": "Percentage CPU", - "metricNamespace": "", - "metricResourceUri": "[variables('vmssID')]", - "operator": "GreaterThan", - "statistic": "Average", - "threshold": 80, - "timeAggregation": "Average", - "timeGrain": "PT1M", - "timeWindow": "PT5M" - }, - "scaleAction": { - "cooldown": "PT1M", - "direction": "Increase", - "type": "ChangeCount", - "value": "1" - } - }, - { - "metricTrigger": { - "metricName": "Percentage CPU", - "metricNamespace": "", - "metricResourceUri": "[variables('vmssID')]", - "operator": "LessThan", - "statistic": "Average", - "threshold": 50, - "timeAggregation": "Average", - "timeGrain": "PT1M", - "timeWindow": "PT5M" - }, - "scaleAction": { - "cooldown": "PT5M", - "direction": "Decrease", - "type": "ChangeCount", - "value": "1" - } - } - ] - } - ], - "targetResourceUri": "[variables('vmssID')]" + }, + "storageProfile": { + "imageReference": "[parameters('moodleCommon').osType]", + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } } + } } - ], - "variables": { - "dstorID": "[resourceId('Microsoft.Storage/storageAccounts',parameters('moodleCommon').vmssdStorageAccounttName)]", - "extBeID": "[concat(variables('extLbID'),'/backendAddressPools/',parameters('moodleCommon').extBeName)]", - "extFeID": "[concat(variables('extLbID'),'/frontendIPConfigurations/',parameters('moodleCommon').extFeName)]", - "extLbID": "[resourceId('Microsoft.Network/loadBalancers',parameters('moodleCommon').lbName)]", - "extProbeID": "[concat(variables('extLbID'),'/probes/',parameters('moodleCommon').extProbe )]", - "pipID": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('moodleCommon').lbPipName)]", - "scriptUri": "[concat(parameters('moodleCommon').scriptLocation,parameters('moodleCommon').webServerSetupScriptFilename,parameters('moodleCommon').artifactsSasToken)]", - "subnetWebRef": "[concat(resourceId('Microsoft.Network/virtualNetworks',parameters('moodleCommon').vnetName),'/subnets/',parameters('moodleCommon').subnetWeb)]", - "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', parameters('moodleCommon').storageAccountName)]", - "vmssID": "[resourceId('Microsoft.Compute/virtualMachineScaleSets',parameters('moodleCommon').vmssName)]", - "webvmss1NIC": "[concat('Microsoft.Compute/virtualMachineScaleSets/', parameters('moodleCommon').vmssName, '/virtualMachines/0/networkInterfaces/vmssnic')]" + }, + "sku": { + "capacity": 2, + "name": "[parameters('moodleCommon').autoscaleVmSku]", + "tier": "Standard" + }, + "tags": { + "displayName": "webfarm" + } }, - "outputs": { - "webvm1IP": { - "value": "[reference(variables('webvmss1NIC'), '2017-03-30').ipConfigurations[0].properties.privateIPAddress]", - "type": "string" - } + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "2015-04-01", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachineScaleSets/', parameters('moodleCommon').vmssName)]" + ], + "location": "[parameters('location')]", + "name": "autoscalewad", + "properties": { + "enabled": true, + "name": "autoscalewad", + "profiles": [ + { + "capacity": { + "default": "2", + "maximum": "[parameters('moodleCommon').autoscaleVmCount]", + "minimum": "2" + }, + "name": "Profile1", + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricNamespace": "", + "metricResourceUri": "[variables('vmssID')]", + "operator": "GreaterThan", + "statistic": "Average", + "threshold": 80, + "timeAggregation": "Average", + "timeGrain": "PT1M", + "timeWindow": "PT5M" + }, + "scaleAction": { + "cooldown": "PT1M", + "direction": "Increase", + "type": "ChangeCount", + "value": "1" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricNamespace": "", + "metricResourceUri": "[variables('vmssID')]", + "operator": "LessThan", + "statistic": "Average", + "threshold": 50, + "timeAggregation": "Average", + "timeGrain": "PT1M", + "timeWindow": "PT5M" + }, + "scaleAction": { + "cooldown": "PT5M", + "direction": "Decrease", + "type": "ChangeCount", + "value": "1" + } + } + ] + } + ], + "targetResourceUri": "[variables('vmssID')]" + } + } + ], + "variables": { + "dstorID": "[resourceId('Microsoft.Storage/storageAccounts',parameters('moodleCommon').vmssdStorageAccounttName)]", + "extBeID": "[concat(variables('extLbID'),'/backendAddressPools/',parameters('moodleCommon').extBeName)]", + "extFeID": "[concat(variables('extLbID'),'/frontendIPConfigurations/',parameters('moodleCommon').extFeName)]", + "extLbID": "[resourceId('Microsoft.Network/loadBalancers',parameters('moodleCommon').lbName)]", + "extProbeID": "[concat(variables('extLbID'),'/probes/',parameters('moodleCommon').extProbe )]", + "pipID": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('moodleCommon').lbPipName)]", + "scriptUri": "[concat(parameters('moodleCommon').scriptLocation,parameters('moodleCommon').webServerSetupScriptFilename,parameters('moodleCommon').artifactsSasToken)]", + "subnetWebRef": "[concat(resourceId('Microsoft.Network/virtualNetworks',parameters('moodleCommon').vnetName),'/subnets/',parameters('moodleCommon').subnetWeb)]", + "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', parameters('moodleCommon').storageAccountName)]", + "vmssID": "[resourceId('Microsoft.Compute/virtualMachineScaleSets',parameters('moodleCommon').vmssName)]", + "webvmss1NIC": "[concat('Microsoft.Compute/virtualMachineScaleSets/', parameters('moodleCommon').vmssName, '/virtualMachines/0/networkInterfaces/vmssnic')]" + }, + "outputs": { + "webvm1IP": { + "value": "[reference(variables('webvmss1NIC'), '2017-03-30').ipConfigurations[0].properties.privateIPAddress]", + "type": "string" } + } } diff --git a/multi-vm-chef-template-ubuntu-vm/azuredeploy.json b/multi-vm-chef-template-ubuntu-vm/azuredeploy.json index 510f824caeb5..9bacca902d48 100644 --- a/multi-vm-chef-template-ubuntu-vm/azuredeploy.json +++ b/multi-vm-chef-template-ubuntu-vm/azuredeploy.json @@ -85,6 +85,13 @@ "metadata": { "description": "JSON Escaped Validation Key" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -94,13 +101,11 @@ "vmName": "[parameters('vmDnsName')]", "publicIPAddressName": "chefPublicIP", "publicIPAddressType": "Dynamic", - "vmStorageAccountContainerName": "vhds", "virtualNetworkName": "MyVNET", "addressPrefix": "10.0.0.0/16", "subnet1Name": "subnet-1", "subnet1Prefix": "10.0.0.0/24", "nicName": "myVMNic", - "dnsName": "[variables('subnet1Name')]", "provider": "[toUpper('33194f91-eb5f-4110-827a-e95f640a9e46')]" }, "resources": [ @@ -108,7 +113,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('availabilitySetName')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "managed": true, "platformFaultDomainCount": 3, @@ -122,7 +127,7 @@ "apiVersion": "2017-03-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "publicIPLoop", "count": "[parameters('numberOfInstances')]" @@ -141,7 +146,7 @@ "apiVersion": "2017-03-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -165,7 +170,7 @@ "apiVersion": "2017-03-01", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[parameters('numberOfInstances')]" @@ -198,7 +203,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "vmLoop", "count": "[parameters('numberOfInstances')]" @@ -246,7 +251,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),copyIndex(),'/', variables('vmExtensionName'))]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "extensionLoop", "count": "[parameters('numberOfInstances')]" @@ -271,4 +276,4 @@ } } ] -} \ No newline at end of file +} diff --git a/mysql-ha-pxc/azuredeploy.json b/mysql-ha-pxc/azuredeploy.json index f773b07568e4..78ef5e9a2603 100644 --- a/mysql-ha-pxc/azuredeploy.json +++ b/mysql-ha-pxc/azuredeploy.json @@ -227,6 +227,13 @@ "metadata": { "description": "bash script command line" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -239,7 +246,6 @@ "ilbBackendAddressPoolName": "[concat(parameters('vmNamePrefix'), '-ilbBackendPool')]", "ilbBackendAddressPoolID": "[concat(variables('lbID'),'/backendAddressPools/', variables('ilbBackendAddressPoolName'))]", "ilbRuleName": "[concat(parameters('vmNamePrefix'), '-ilbRule')]", - "ilbRuleID": "[concat(variables('lbID'),'/loadBalancingRules/',variables('ilbRuleName'))]", "probeName": "[concat(parameters('vmNamePrefix'), '-probe')]", "probeID": "[concat(variables('lbID'),'/probes/',variables('probeName'))]", "sshIPConfigName": "[concat(parameters('vmNamePrefix'), '-sshIPCfg')]", @@ -258,9 +264,7 @@ "nicId1": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName1'))]", "nicId2": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName2'))]", "nicId3": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName3'))]", - "backEndIPConfigNic1": "[concat(variables('nicId1'),'/ipConfigurations/ipconfig1')]", - "backEndIPConfigNic2": "[concat(variables('nicId2'),'/ipConfigurations/ipconfig1')]", - "backEndIPConfigNic3": "[concat(variables('nicId3'),'/ipConfigurations/ipconfig1')]", + "vmName1": "[concat('a-', parameters('vmNamePrefix'))]", "vmName2": "[concat('k-', parameters('vmNamePrefix'))]", "vmName3": "[concat('z-', parameters('vmNamePrefix'))]", @@ -287,7 +291,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageAccount')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -296,7 +300,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('lbPublicIPName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Static", "dnsSettings": { @@ -308,14 +312,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -336,7 +340,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName1')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", "[concat('Microsoft.Network/loadBalancers/', variables('lbName'))]" @@ -370,7 +374,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName2')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", "[concat('Microsoft.Network/loadBalancers/', variables('lbName'))]" @@ -404,7 +408,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName3')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", "[concat('Microsoft.Network/loadBalancers/', variables('lbName'))]" @@ -438,7 +442,7 @@ "name": "[variables('vmName1')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]", "[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccount'))]", @@ -505,7 +509,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[variables('vmExtensionName1')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName1'))]" ], @@ -528,7 +532,7 @@ "name": "[variables('vmName2')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]", "[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccount'))]", @@ -595,7 +599,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName2'),'/', variables('vmExtensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName2'))]", "[concat('Microsoft.Compute/virtualMachines/',variables('vmName1'),'/extensions/',variables('vmExtensionName'))]" @@ -619,7 +623,7 @@ "name": "[variables('vmName3')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]", "[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccount'))]", @@ -686,7 +690,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName3'),'/', variables('vmExtensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName3'))]", "[concat('Microsoft.Compute/virtualMachines/',variables('vmName1'),'/extensions/',variables('vmExtensionName'))]" @@ -710,7 +714,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/loadBalancers", "name": "[variables('lbName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('lbPublicIPName'))]" ], diff --git a/mysql-mha-haproxy-ubuntu/azuredeploy.json b/mysql-mha-haproxy-ubuntu/azuredeploy.json index 54a6a6d407b3..c11913a76e47 100644 --- a/mysql-mha-haproxy-ubuntu/azuredeploy.json +++ b/mysql-mha-haproxy-ubuntu/azuredeploy.json @@ -80,6 +80,13 @@ "metadata": { "description": "The size of the virtual machines used when provisioning Mysql node(s)" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -90,7 +97,6 @@ "slaveTemplateUrl01": "[concat(variables('templateBaseUrl'), 'slave01-resources.json')]", "slaveTemplateUrl02": "[concat(variables('templateBaseUrl'), 'slave02-resources.json')]", "namespace": "mha-", - "apiVersion": "2015-01-01", "networkSettings": { "virtualNetworkName": "[parameters('virtualNetworkName')]", "addressPrefix": "10.0.0.0/16", @@ -367,4 +373,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mysql-mha-haproxy-ubuntu/nested/haproxy-resources.json b/mysql-mha-haproxy-ubuntu/nested/haproxy-resources.json index 9e03cb8a2df5..3258b6d3b9a5 100644 --- a/mysql-mha-haproxy-ubuntu/nested/haproxy-resources.json +++ b/mysql-mha-haproxy-ubuntu/nested/haproxy-resources.json @@ -31,11 +31,17 @@ }, "staticIp": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "apiVersion": "2015-06-15", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, @@ -44,7 +50,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -96,7 +102,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'PublicIp')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -108,14 +114,14 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[concat(parameters('namespace'), 'set')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), parameters('vmbasename'), 'PublicIp')]" ], @@ -144,7 +150,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]" ], @@ -181,7 +187,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/haproxyInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], @@ -200,4 +206,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mysql-mha-haproxy-ubuntu/nested/master-resources.json b/mysql-mha-haproxy-ubuntu/nested/master-resources.json index 045e180eda5d..8fd1eb46fd65 100644 --- a/mysql-mha-haproxy-ubuntu/nested/master-resources.json +++ b/mysql-mha-haproxy-ubuntu/nested/master-resources.json @@ -28,26 +28,32 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15" + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[concat(parameters('namespace'), 'set')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -67,7 +73,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" ], @@ -104,7 +110,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/masterInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), parameters('vmbasename'), 'vm')]", "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" @@ -124,4 +130,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mysql-mha-haproxy-ubuntu/nested/shared-resources.json b/mysql-mha-haproxy-ubuntu/nested/shared-resources.json index 54e9f65b2d1d..99e0fd2569dd 100644 --- a/mysql-mha-haproxy-ubuntu/nested/shared-resources.json +++ b/mysql-mha-haproxy-ubuntu/nested/shared-resources.json @@ -7,18 +7,24 @@ "metadata": { "Description": "Network settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15" + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -27,7 +33,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -45,4 +51,4 @@ } } ] -} \ No newline at end of file +} diff --git a/mysql-mha-haproxy-ubuntu/nested/slave01-resources.json b/mysql-mha-haproxy-ubuntu/nested/slave01-resources.json index 3f48d5d64554..6c7aefde5631 100644 --- a/mysql-mha-haproxy-ubuntu/nested/slave01-resources.json +++ b/mysql-mha-haproxy-ubuntu/nested/slave01-resources.json @@ -31,26 +31,32 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15" + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[concat(parameters('namespace'), 'set')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -70,7 +76,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" ], @@ -107,7 +113,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/slave01Install')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), parameters('vmbasename'), 'vm')]", "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" @@ -127,4 +133,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mysql-mha-haproxy-ubuntu/nested/slave02-resources.json b/mysql-mha-haproxy-ubuntu/nested/slave02-resources.json index 1dd2da580e21..e6d271f11326 100644 --- a/mysql-mha-haproxy-ubuntu/nested/slave02-resources.json +++ b/mysql-mha-haproxy-ubuntu/nested/slave02-resources.json @@ -31,26 +31,32 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15" + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[concat(parameters('namespace'), 'set')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -70,7 +76,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" ], @@ -107,7 +113,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/slave02Install')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), parameters('vmbasename'), 'vm')]", "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" @@ -127,4 +133,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/mysql-replication/azuredeploy.json b/mysql-replication/azuredeploy.json index fc919fa8f4dc..bb62a1c9f6e3 100644 --- a/mysql-replication/azuredeploy.json +++ b/mysql-replication/azuredeploy.json @@ -202,6 +202,13 @@ "metadata": { "description": "public IP name for MySQL loadbalancer" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -215,8 +222,6 @@ "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbName'))]", "ilbBackendAddressPoolName": "[concat(parameters('dnsName'), '-ilbBackendPool')]", "ilbBackendAddressPoolID": "[concat(variables('lbID'),'/backendAddressPools/', variables('ilbBackendAddressPoolName'))]", - "ilbRuleName": "[concat(parameters('dnsName'), '-ilbRule')]", - "ilbRuleID": "[concat(variables('lbID'),'/loadBalancingRules/',variables('ilbRuleName'))]", "sshIPConfigName": "[concat(parameters('dnsName'), '-sshIPCfg')]", "sshIPConfig": "[concat(variables('lbID'),'/frontendIPConfigurations/',variables('sshIPConfigName'))]", "nicName": "[concat(parameters('dnsName'), '-nic')]", @@ -264,7 +269,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -273,7 +278,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('lbPublicIPName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Static", "dnsSettings": { @@ -285,14 +290,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[variables('nodeCount')]" @@ -336,7 +341,7 @@ "name": "[concat(parameters('dnsName'), copyIndex())]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "vmLoop", "count": "[variables('nodeCount')]" @@ -407,7 +412,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('dnsName'), copyIndex(), '/setupMySQL')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "extLoop", "count": "[variables('nodeCount')]" @@ -434,7 +439,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/loadBalancers", "name": "[variables('lbName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('lbPublicIPName'))]" ], @@ -541,4 +546,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/mysql-replication/vnet-new.json b/mysql-replication/vnet-new.json index 6fea500777c8..35a313d90857 100644 --- a/mysql-replication/vnet-new.json +++ b/mysql-replication/vnet-new.json @@ -17,10 +17,16 @@ "virtualNetworkExistingRGName": { "type": "string", "defaultValue": "" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "resourceAPIVersion": "2015-06-15", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", "dbSubnet": "[concat(variables('vnetID'),'/subnets/',parameters('dbSubnetName'))]" }, @@ -29,7 +35,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -53,4 +59,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/mysql-standalone-server-ubuntu/azuredeploy.json b/mysql-standalone-server-ubuntu/azuredeploy.json index c77cb0dc5f19..1ae8e4cc2285 100644 --- a/mysql-standalone-server-ubuntu/azuredeploy.json +++ b/mysql-standalone-server-ubuntu/azuredeploy.json @@ -59,6 +59,13 @@ "metadata": { "description": "Default URI of the template folder. Override with your own URI when using a different path." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -85,7 +92,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -94,7 +101,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -106,7 +113,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -127,7 +134,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -153,7 +160,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -196,7 +203,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -216,4 +223,4 @@ } } ] -} \ No newline at end of file +} diff --git a/nagios-on-ubuntu/azuredeploy.json b/nagios-on-ubuntu/azuredeploy.json index 8e928c972fab..7c396b101d22 100644 --- a/nagios-on-ubuntu/azuredeploy.json +++ b/nagios-on-ubuntu/azuredeploy.json @@ -67,6 +67,13 @@ "metadata": { "description": "T-shirt size of the Nagios deployment" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -108,7 +115,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -117,7 +124,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -138,7 +145,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat('publicIP', copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "publicIPLoop", "count": "[variables('numberOfInstances')]" @@ -154,7 +161,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -178,7 +185,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nic', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[variables('numberOfInstances')]" @@ -212,7 +219,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat('nagiosSrv', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineLoop", "count": "[variables('numberOfInstances')]" @@ -259,7 +266,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('nagiosSrv', copyindex(), '/installnagios')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineExtensionsLoop", "count": "[variables('numberOfInstances')]" @@ -284,4 +291,4 @@ } } ] -} \ No newline at end of file +} diff --git a/neo4j-ubuntu-vm/azuredeploy.json b/neo4j-ubuntu-vm/azuredeploy.json index bea1a1e7b356..a8f4c681fb85 100644 --- a/neo4j-ubuntu-vm/azuredeploy.json +++ b/neo4j-ubuntu-vm/azuredeploy.json @@ -91,6 +91,13 @@ "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": { @@ -112,7 +119,7 @@ { "name": "[variables('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-09-01", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" @@ -143,7 +150,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSecurityGroupName')]", "apiVersion": "2017-09-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -208,7 +215,7 @@ { "name": "[variables('networkInterfaceName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-09-01", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", @@ -237,7 +244,7 @@ { "name": "[variables('publicIPAddressName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-09-01", "dependsOn": [], "tags": { @@ -253,7 +260,7 @@ { "name": "[variables('storageaccountName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-06-01", "sku": { "name": "[parameters('storageaccountType')]" @@ -267,7 +274,7 @@ { "name": "[parameters('vmName')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-03-30", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('storageaccountName'))]", @@ -323,7 +330,7 @@ { "name": "installneo4j", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-03-30", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', parameters('vmName'))]" diff --git a/netapp-ontap-sql/azuredeploy.json b/netapp-ontap-sql/azuredeploy.json index 86cd1c3ba49e..2428b3d4ce81 100644 --- a/netapp-ontap-sql/azuredeploy.json +++ b/netapp-ontap-sql/azuredeploy.json @@ -1,501 +1,509 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "defaultValue": "netappadmin", - "metadata": { - "description": "User name used for all VM's OS login" - } - }, - "adminEmailAddress": { - "type": "string", - "metadata": { - "description": "Enter Admin Email Address, used for NetApp OnCommand Manager GUI Login" - } - }, - "adminPassword": { - "type": "securestring", - "minLength": 12, - "metadata": { - "description": "Password used for VM Login(Both Jump-VM & SQL-VM) and OnCommand Manager Portal Login.SVM Password is generated automatically and exported in output, See Deployment guide for more information.Enter a password that is between 12 and 50 characters in length. The password must contain at least one English letter and one number. The password must not contain non-English letters or admin." - } - }, - "netappOntapCloudLicenseType": { - "type": "string", - "defaultValue": "Standard", - "allowedValues": [ - "Standard", - "Premium" - ], - "metadata": { - "description": "NetApp ONTAP cloud license." - } - }, - "azureADApplicationID": { - "type": "string", - "metadata": { - "description": "Azure AD App ID, Check deployment guide for permissions required" - } - }, - "azureADApplicationSecret": { - "type": "securestring", - "minLength": 12, - "metadata": { - "description": "AD App Secret." - } - }, - "sqlDataVolumeSize": { - "type": "int", - "defaultValue": 500, - "minValue": 100, - "maxValue": 2000, - "metadata": { - "description": "SQL Data volume size in GB, Min 100, Max 2000" - } - }, - "_artifactsLocation": { - "type": "string", - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/netapp-ontap-sql", - "metadata": { - "description": "Leave default if insure, 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": "Leave blank if insure, The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated.Leave blank if unsure" - }, - "defaultValue": "" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "type": "string", + "defaultValue": "netappadmin", + "metadata": { + "description": "User name used for all VM's OS login" + } + }, + "adminEmailAddress": { + "type": "string", + "metadata": { + "description": "Enter Admin Email Address, used for NetApp OnCommand Manager GUI Login" + } + }, + "adminPassword": { + "type": "securestring", + "minLength": 12, + "metadata": { + "description": "Password used for VM Login(Both Jump-VM & SQL-VM) and OnCommand Manager Portal Login.SVM Password is generated automatically and exported in output, See Deployment guide for more information.Enter a password that is between 12 and 50 characters in length. The password must contain at least one English letter and one number. The password must not contain non-English letters or admin." + } + }, + "netappOntapCloudLicenseType": { + "type": "string", + "defaultValue": "Standard", + "allowedValues": [ + "Standard", + "Premium" + ], + "metadata": { + "description": "NetApp ONTAP cloud license." + } + }, + "azureADApplicationID": { + "type": "string", + "metadata": { + "description": "Azure AD App ID, Check deployment guide for permissions required" + } + }, + "azureADApplicationSecret": { + "type": "securestring", + "minLength": 12, + "metadata": { + "description": "AD App Secret." + } + }, + "sqlDataVolumeSize": { + "type": "int", + "defaultValue": 500, + "minValue": 100, + "maxValue": 2000, + "metadata": { + "description": "SQL Data volume size in GB, Min 100, Max 2000" + } + }, + "_artifactsLocation": { + "type": "string", + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/netapp-ontap-sql", + "metadata": { + "description": "Leave default if insure, 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": "Leave blank if insure, The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated.Leave blank if unsure" + }, + "defaultValue": "" + }, + "remoteAllowedCIDR": { + "type": "string", + "minLength": 7, + "defaultValue": "0.0.0.0/0", + "metadata": { + "description": "Enter Public IP CIDR to allow for accessing the deployment.Enter in 0.0.0.0/0 format, you can always modify these later in NSG Settings" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "webNsgName": "web-nsg", + "dataNsgName": "data-nsg", + "webStorageAccountName": "[concat('webst',uniqueString(resourceGroup().id))]", + "dataStorageAccountName": "[concat('datast',uniqueString(resourceGroup().id))]", + "jumpStorageAccountName": "[concat('jumpst',uniqueString(resourceGroup().id))]", + "diagStorageAccountName": "[concat('diagstor',uniqueString(resourceGroup().id))]", + "storageAccountType": "Standard_GRS", + "virtualNetworkName": "netapp-vnet", + "vNetId": "[resourceId(concat('Microsoft.Network','/','virtualNetworks'),variables('virtualNetworkName'))]", + "dataSubnetName": "data-subnet", + "webSubnetName": "web-subnet", + "addressPrefix": "10.0.0.0/16", + "webSubnetPrefix": "10.0.1.0/24", + "dataSubnetPrefix": "10.0.2.0/24", + "OnCommandCloudManagerpublicIPAddressName": "oncommand-cloudmanager-pip", + "OnCommandCloudManagerDnsName": "[concat('oncommand',uniqueString(resourceGroup().id))]", + "OnCommandCloudManagerVmNicName": "oncommand-cloudmanager-nic", + "OnCommandCloudManagerVmName": "oncommand-cloudmanager", + "OnCommandCloudManagervmSize": "Standard_D1_v2", + "jumpVmName": "jump-vm", + "sqlVMName": "sql-vm", + "jumpVMNicName": "vm-jump-nic", + "sqlVMNicName": "vm-sql-nic", + "sqlVmSize": "Standard_D2_v2", + "jumpVmSize": "Standard_D1_v2", + "jumpVMpublicIPAddressName": "jump-vm-pip", + "jumpVMDnsName": "[concat('jumpvm',uniqueString(resourceGroup().id))]", + "sharedResourcesTemplateFileName": "shared-resources.json", + "JumpVMTemplateFileName": "jump-vm.json", + "netAppOnCommandCloudManagerVMTemplateFileName": "netapp-oncommand-cloudmanager.json", + "netAppOntapCloudTemplateFileName": "netapp-ontap-cloud.json", + "sqlCustomScriptTemplateFileName": "sql-netappotc-connect.json", + "sqlVMTemplateFileName": "sql-vm.json", + "OTCPassword": "[concat('otc',uniqueString(resourceGroup().id))]", + "netappOntapCloudLicenseStandard": { + "type": "object", + "licenseType": "azure-cot-standard-paygo", + "instanceType": "Standard_DS4_v2", + "storageType": "Standard_LRS" + }, + "netappOntapCloudLicensePremium": { + "type": "object", + "licenseType": "azure-cot-premium-paygo", + "instanceType": "Standard_DS5_v2", + "storageType": "Premium_LRS" + }, + "netappOntapVersion": "ONTAP-9.2P1.T1.azure", + "NetAppTags": { + "type": "object", + "provider": "877cfe7c-ae65-427b-a1a4-1d8b0b6fa9d4" + }, + "quickstartTags": { + "type": "object", + "name": "netapp-ontap-cloud-sql-azure" + } + }, + "resources": [ + { + "name": "shared-resources", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2016-09-01", + "comments": "Azure Resources that are shared within the infrastructure environment", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactslocation'),'/nested/', variables('sharedResourcesTemplateFileName'),parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "remoteAllowedCIDR": { - "type": "string", - "minLength": 7, - "defaultValue": "0.0.0.0/0", - "metadata": { - "description": "Enter Public IP CIDR to allow for accessing the deployment.Enter in 0.0.0.0/0 format, you can always modify these later in NSG Settings" - } + "parameters": { + "webNsgName": { + "value": "[variables('webNsgName')]" + }, + "dataNsgName": { + "value": "[variables('dataNsgName')]" + }, + "diagStorageAccountName": { + "value": "[variables('diagStorageAccountName')]" + }, + "storageAccountType": { + "value": "[variables('storageAccountType')]" + }, + "virtualNetworkName": { + "value": "[variables('virtualNetworkName')]" + }, + "dataSubnetName": { + "value": "[variables('dataSubnetName')]" + }, + "webSubnetName": { + "value": "[variables('webSubnetName')]" + }, + "addressPrefix": { + "value": "[variables('addressPrefix')]" + }, + "webSubnetPrefix": { + "value": "[variables('webSubnetPrefix')]" + }, + "dataSubnetPrefix": { + "value": "[variables('dataSubnetPrefix')]" + }, + "remoteAllowedCIDR": { + "value": "[parameters('remoteAllowedCIDR')]" + }, + "NetAppTags": { + "value": "[variables('NetAppTags')]" + }, + "quickstartTags": { + "value": "[variables('quickstartTags')]" + } } + } }, - "variables": { - "webNsgName": "web-nsg", - "dataNsgName": "data-nsg", - "webStorageAccountName": "[concat('webst',uniqueString(resourceGroup().id))]", - "dataStorageAccountName": "[concat('datast',uniqueString(resourceGroup().id))]", - "jumpStorageAccountName": "[concat('jumpst',uniqueString(resourceGroup().id))]", - "diagStorageAccountName": "[concat('diagstor',uniqueString(resourceGroup().id))]", - "storageAccountType": "Standard_GRS", - "virtualNetworkName": "netapp-vnet", - "vNetId": "[resourceId(concat('Microsoft.Network','/','virtualNetworks'),variables('virtualNetworkName'))]", - "dataSubnetName": "data-subnet", - "webSubnetName": "web-subnet", - "addressPrefix": "10.0.0.0/16", - "webSubnetPrefix": "10.0.1.0/24", - "dataSubnetPrefix": "10.0.2.0/24", - "OnCommandCloudManagerpublicIPAddressName": "oncommand-cloudmanager-pip", - "OnCommandCloudManagerDnsName": "[concat('oncommand',uniqueString(resourceGroup().id))]", - "OnCommandCloudManagerVmNicName": "oncommand-cloudmanager-nic", - "OnCommandCloudManagerVmName": "oncommand-cloudmanager", - "OnCommandCloudManagervmSize": "Standard_D1_v2", - "jumpVmName": "jump-vm", - "sqlVMName": "sql-vm", - "jumpVMNicName": "vm-jump-nic", - "sqlVMNicName": "vm-sql-nic", - "sqlVmSize": "Standard_D2_v2", - "jumpVmSize": "Standard_D1_v2", - "jumpVMpublicIPAddressName": "jump-vm-pip", - "jumpVMDnsName": "[concat('jumpvm',uniqueString(resourceGroup().id))]", - "sharedResourcesTemplateFileName": "shared-resources.json", - "JumpVMTemplateFileName": "jump-vm.json", - "netAppOnCommandCloudManagerVMTemplateFileName": "netapp-oncommand-cloudmanager.json", - "netAppOntapCloudTemplateFileName": "netapp-ontap-cloud.json", - "sqlCustomScriptTemplateFileName": "sql-netappotc-connect.json", - "sqlVMTemplateFileName": "sql-vm.json", - "OTCPassword": "[concat('otc',uniqueString(resourceGroup().id))]", - "netappOntapCloudLicenseStandard": { - "type": "object", - "licenseType": "azure-cot-standard-paygo", - "instanceType": "Standard_DS4_v2", - "storageType": "Standard_LRS" - }, - "netappOntapCloudLicensePremium": { - "type": "object", - "licenseType": "azure-cot-premium-paygo", - "instanceType": "Standard_DS5_v2", - "storageType": "Premium_LRS" + { + "name": "jump-vm", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2016-09-01", + "comments": "Jump Server deployment", + "dependsOn": [ + "Microsoft.Resources/deployments/shared-resources" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactslocation'),'/nested/', variables('JumpVMTemplateFileName'),parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "netappOntapVersion": "ONTAP-9.2P1.T1.azure", - "NetAppTags": { - "type": "object", - "provider": "877cfe7c-ae65-427b-a1a4-1d8b0b6fa9d4" - }, - "quickstartTags": { - "type": "object", - "name": "netapp-ontap-cloud-sql-azure" + "parameters": { + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "diagStorageAccountName": { + "value": "[variables('diagStorageAccountName')]" + }, + "storageAccountType": { + "value": "[variables('storageAccountType')]" + }, + "jumpStorageAccountName": { + "value": "[variables('jumpStorageAccountName')]" + }, + "vNetId": { + "value": "[variables('vNetId')]" + }, + "webSubnetName": { + "value": "[variables('webSubnetName')]" + }, + "jumpVmName": { + "value": "[variables('JumpVmName')]" + }, + "jumpVmSize": { + "value": "[variables('jumpVmSize')]" + }, + "jumpvmNicName": { + "value": "[variables('jumpvmNicName')]" + }, + "jumpvmPublicIPAddressName": { + "value": "[variables('jumpvmPublicIPAddressName')]" + }, + "jumpvmDnsName": { + "value": "[variables('jumpvmDnsName')]" + }, + "NetAppTags": { + "value": "[variables('NetAppTags')]" + }, + "quickstartTags": { + "value": "[variables('quickstartTags')]" + } } + } }, - "resources": [{ - "name": "shared-resources", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2016-09-01", - "comments": "Azure Resources that are shared within the infrastructure environment", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactslocation'),'/nested/', variables('sharedResourcesTemplateFileName'),parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "webNsgName": { - "value": "[variables('webNsgName')]" - }, - "dataNsgName": { - "value": "[variables('dataNsgName')]" - }, - "diagStorageAccountName": { - "value": "[variables('diagStorageAccountName')]" - }, - "storageAccountType": { - "value": "[variables('storageAccountType')]" - }, - "virtualNetworkName": { - "value": "[variables('virtualNetworkName')]" - }, - "dataSubnetName": { - "value": "[variables('dataSubnetName')]" - }, - "webSubnetName": { - "value": "[variables('webSubnetName')]" - }, - "addressPrefix": { - "value": "[variables('addressPrefix')]" - }, - "webSubnetPrefix": { - "value": "[variables('webSubnetPrefix')]" - }, - "dataSubnetPrefix": { - "value": "[variables('dataSubnetPrefix')]" - }, - "remoteAllowedCIDR": { - "value": "[parameters('remoteAllowedCIDR')]" - }, - "NetAppTags": { - "value": "[variables('NetAppTags')]" - }, - "quickstartTags": { - "value": "[variables('quickstartTags')]" - } - } - } - }, - { - "name": "jump-vm", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2016-09-01", - "comments": "Jump Server deployment", - "dependsOn": [ - "['Microsoft.Resources/deployments/shared-resources']" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactslocation'),'/nested/', variables('JumpVMTemplateFileName'),parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "adminUsername": { - "value": "[parameters('adminUsername')]" - }, - "adminPassword": { - "value": "[parameters('adminPassword')]" - }, - "diagStorageAccountName": { - "value": "[variables('diagStorageAccountName')]" - }, - "storageAccountType": { - "value": "[variables('storageAccountType')]" - }, - "jumpStorageAccountName": { - "value": "[variables('jumpStorageAccountName')]" - }, - "vNetId": { - "value": "[variables('vNetId')]" - }, - "webSubnetName": { - "value": "[variables('webSubnetName')]" - }, - "jumpVmName": { - "value": "[variables('JumpVmName')]" - }, - "jumpVmSize": { - "value": "[variables('jumpVmSize')]" - }, - "jumpvmNicName": { - "value": "[variables('jumpvmNicName')]" - }, - "jumpvmPublicIPAddressName": { - "value": "[variables('jumpvmPublicIPAddressName')]" - }, - "jumpvmDnsName": { - "value": "[variables('jumpvmDnsName')]" - }, - "NetAppTags": { - "value": "[variables('NetAppTags')]" - }, - "quickstartTags": { - "value": "[variables('quickstartTags')]" - } - } - } - }, - { - "name": "sql-vm", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2016-09-01", - "comments": "SQL Server Deployment", - "dependsOn": [ - "['Microsoft.Resources/deployments/shared-resources']" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactslocation'),'/nested/', variables('sqlVMTemplateFileName'),parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "adminUsername": { - "value": "[parameters('adminUsername')]" - }, - "adminPassword": { - "value": "[parameters('adminPassword')]" - }, - "diagStorageAccountName": { - "value": "[variables('diagStorageAccountName')]" - }, - "storageAccountType": { - "value": "[variables('storageAccountType')]" - }, - "dataStorageAccountName": { - "value": "[variables('dataStorageAccountName')]" - }, - "vNetId": { - "value": "[variables('vNetId')]" - }, - "dataSubnetName": { - "value": "[variables('dataSubnetName')]" - }, - "sqlVmName": { - "value": "[variables('sqlVmName')]" - }, - "sqlVmNicName": { - "value": "[variables('sqlVmNicName')]" - }, - "sqlVmSize": { - "value": "[variables('sqlVmSize')]" - }, - "_artifactsLocation": { - "value": "[parameters('_artifactsLocation')]" - }, - "_artifactsLocationSasToken": { - "value": "[parameters('_artifactsLocationSasToken')]" - }, - "NetAppTags": { - "value": "[variables('NetAppTags')]" - }, - "quickstartTags": { - "value": "[variables('quickstartTags')]" - } - } - } - }, - { - "name": "netapp-oncommand-cloudmanager", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2016-09-01", - "comments": "NetApp OnCommand Manager Deployment", - "dependsOn": [ - "['Microsoft.Resources/deployments/shared-resources']" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactslocation'),'/nested/', variables('netAppOnCommandCloudManagerVMTemplateFileName'),parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "adminUsername": { - "value": "[parameters('adminUsername')]" - }, - "adminPassword": { - "value": "[parameters('adminPassword')]" - }, - "webStorageAccountName": { - "value": "[variables('webStorageAccountName')]" - }, - "diagStorageAccountName": { - "value": "[variables('diagStorageAccountName')]" - }, - "storageAccountType": { - "value": "[variables('storageAccountType')]" - }, - "vNetId": { - "value": "[variables('vNetId')]" - }, - "webSubnetName": { - "value": "[variables('webSubnetName')]" - }, - "OnCommandCloudManagerVmName": { - "value": "[variables('OnCommandCloudManagerVmName')]" - }, - "OnCommandCloudManagervmSize": { - "value": "[variables('OnCommandCloudManagervmSize')]" - }, - "OnCommandCloudManagerVmNicName": { - "value": "[variables('OnCommandCloudManagerVmNicName')]" - }, - "OnCommandCloudManagerpublicIPAddressName": { - "value": "[variables('OnCommandCloudManagerpublicIPAddressName')]" - }, - "OnCommandCloudManagerDnsName": { - "value": "[variables('OnCommandCloudManagerDnsName')]" - }, - "NetAppTags": { - "value": "[variables('NetAppTags')]" - }, - "quickstartTags": { - "value": "[variables('quickstartTags')]" - } - } - } + { + "name": "sql-vm", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2016-09-01", + "comments": "SQL Server Deployment", + "dependsOn": [ + "Microsoft.Resources/deployments/shared-resources" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactslocation'),'/nested/', variables('sqlVMTemplateFileName'),parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "name": "netapp-ontap-cloud", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2016-09-01", - "comments": "NetApp ONTAP Cloud Env Deployment", - "dependsOn": [ - "['Microsoft.Resources/deployments/netapp-oncommand-cloudmanager']" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactslocation'),'/nested/', variables('netAppOntapCloudTemplateFileName'),parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "adminEmailAddress": { - "value": "[parameters('adminEmailAddress')]" - }, - "adminPassword": { - "value": "[parameters('adminPassword')]" - }, - "OTCPassword": { - "value": "[variables('OTCPassword')]" - }, - "dataNsgName": { - "value": "[variables('dataNsgName')]" - }, - "vNetId": { - "value": "[variables('vNetId')]" - }, - "cidr": { - "value": "[variables('AddressPrefix')]" - }, - "dataSubnetName": { - "value": "[variables('dataSubnetName')]" - }, - "OnCommandCloudManagerVmName": { - "value": "[variables('OnCommandCloudManagerVmName')]" - }, - "azureADApplicationID": { - "value": "[parameters('azureADApplicationID')]" - }, - "azureADApplicationSecret": { - "value": "[parameters('azureADApplicationSecret')]" - }, - "netappOntapCloudLicense": { - "value": "[variables(concat('netappOntapCloudLicense',parameters('netappOntapCloudLicenseType')))]" - }, - "netappOntapVersion": { - "value": "[variables('netappOntapVersion')]" - }, - "_artifactsLocation": { - "value": "[parameters('_artifactsLocation')]" - }, - "_artifactsLocationSasToken": { - "value": "[parameters('_artifactsLocationSasToken')]" - }, - "NetAppTags": { - "value": "[variables('NetAppTags')]" - }, - "quickstartTags": { - "value": "[variables('quickstartTags')]" - } - } - } + "parameters": { + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "diagStorageAccountName": { + "value": "[variables('diagStorageAccountName')]" + }, + "storageAccountType": { + "value": "[variables('storageAccountType')]" + }, + "dataStorageAccountName": { + "value": "[variables('dataStorageAccountName')]" + }, + "vNetId": { + "value": "[variables('vNetId')]" + }, + "dataSubnetName": { + "value": "[variables('dataSubnetName')]" + }, + "sqlVmName": { + "value": "[variables('sqlVmName')]" + }, + "sqlVmNicName": { + "value": "[variables('sqlVmNicName')]" + }, + "sqlVmSize": { + "value": "[variables('sqlVmSize')]" + }, + "_artifactsLocation": { + "value": "[parameters('_artifactsLocation')]" + }, + "_artifactsLocationSasToken": { + "value": "[parameters('_artifactsLocationSasToken')]" + }, + "NetAppTags": { + "value": "[variables('NetAppTags')]" + }, + "quickstartTags": { + "value": "[variables('quickstartTags')]" + } + } + } + }, + { + "name": "netapp-oncommand-cloudmanager", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2016-09-01", + "comments": "NetApp OnCommand Manager Deployment", + "dependsOn": [ + "Microsoft.Resources/deployments/shared-resources" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactslocation'),'/nested/', variables('netAppOnCommandCloudManagerVMTemplateFileName'),parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "name": "sql-netappotc-connect", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2016-09-01", - "comments": "Configure SQL Volume Extension", - "dependsOn": [ - "['Microsoft.Resources/deployments/netapp-ontap-cloud']" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactslocation'),'/nested/', variables('sqlCustomScriptTemplateFileName'),parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "adminEmailAddress": { - "value": "[parameters('adminEmailAddress')]" - }, - "adminPassword": { - "value": "[parameters('adminPassword')]" - }, - "OTCPassword": { - "value": "[variables('OTCPassword')]" - }, - "_artifactsLocation": { - "value": "[parameters('_artifactsLocation')]" - }, - "_artifactsLocationSasToken": { - "value": "[parameters('_artifactsLocationSasToken')]" - }, - "sqlVmName": { - "value": "[variables('sqlVmName')]" - }, - "sqlDataVolumeSize": { - "value": "[parameters('sqlDataVolumeSize')]" - }, - "otcIp": { - "value": "[reference('netapp-oncommand-cloudmanager').outputs.NetAppOnCommandCloudManagerPublicIP.value]" - }, - "NetAppTags": { - "value": "[variables('NetAppTags')]" - }, - "quickstartTags": { - "value": "[variables('quickstartTags')]" - } - } - } + "parameters": { + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "webStorageAccountName": { + "value": "[variables('webStorageAccountName')]" + }, + "diagStorageAccountName": { + "value": "[variables('diagStorageAccountName')]" + }, + "storageAccountType": { + "value": "[variables('storageAccountType')]" + }, + "vNetId": { + "value": "[variables('vNetId')]" + }, + "webSubnetName": { + "value": "[variables('webSubnetName')]" + }, + "OnCommandCloudManagerVmName": { + "value": "[variables('OnCommandCloudManagerVmName')]" + }, + "OnCommandCloudManagervmSize": { + "value": "[variables('OnCommandCloudManagervmSize')]" + }, + "OnCommandCloudManagerVmNicName": { + "value": "[variables('OnCommandCloudManagerVmNicName')]" + }, + "OnCommandCloudManagerpublicIPAddressName": { + "value": "[variables('OnCommandCloudManagerpublicIPAddressName')]" + }, + "OnCommandCloudManagerDnsName": { + "value": "[variables('OnCommandCloudManagerDnsName')]" + }, + "NetAppTags": { + "value": "[variables('NetAppTags')]" + }, + "quickstartTags": { + "value": "[variables('quickstartTags')]" + } } - ], - "outputs": { - "NetApp ONTAP Cloud Manager URL:": { - "type": "string", - "value": "[reference('netapp-oncommand-cloudmanager').outputs.NetAppOnCommandCloudManagerURL.value]" + } + }, + { + "name": "netapp-ontap-cloud", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2016-09-01", + "comments": "NetApp ONTAP Cloud Env Deployment", + "dependsOn": [ + "Microsoft.Resources/deployments/netapp-oncommand-cloudmanager" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactslocation'),'/nested/', variables('netAppOntapCloudTemplateFileName'),parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "Jump VM FQDN": { - "type": "string", - "value": "[reference('jump-vm').outputs.jumpVmDNSLabel.value]" + "parameters": { + "adminEmailAddress": { + "value": "[parameters('adminEmailAddress')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "OTCPassword": { + "value": "[variables('OTCPassword')]" + }, + "dataNsgName": { + "value": "[variables('dataNsgName')]" + }, + "vNetId": { + "value": "[variables('vNetId')]" + }, + "cidr": { + "value": "[variables('AddressPrefix')]" + }, + "dataSubnetName": { + "value": "[variables('dataSubnetName')]" + }, + "OnCommandCloudManagerVmName": { + "value": "[variables('OnCommandCloudManagerVmName')]" + }, + "azureADApplicationID": { + "value": "[parameters('azureADApplicationID')]" + }, + "azureADApplicationSecret": { + "value": "[parameters('azureADApplicationSecret')]" + }, + "netappOntapCloudLicense": { + "value": "[variables(concat('netappOntapCloudLicense',parameters('netappOntapCloudLicenseType')))]" + }, + "netappOntapVersion": { + "value": "[variables('netappOntapVersion')]" + }, + "_artifactsLocation": { + "value": "[parameters('_artifactsLocation')]" + }, + "_artifactsLocationSasToken": { + "value": "[parameters('_artifactsLocationSasToken')]" + }, + "NetAppTags": { + "value": "[variables('NetAppTags')]" + }, + "quickstartTags": { + "value": "[variables('quickstartTags')]" + } + } + } + }, + { + "name": "sql-netappotc-connect", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2016-09-01", + "comments": "Configure SQL Volume Extension", + "dependsOn": [ + "Microsoft.Resources/deployments/netapp-ontap-cloud" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactslocation'),'/nested/', variables('sqlCustomScriptTemplateFileName'),parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "NetApp OTC SVM Password": { - "type": "string", + "parameters": { + "adminEmailAddress": { + "value": "[parameters('adminEmailAddress')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "OTCPassword": { "value": "[variables('OTCPassword')]" + }, + "_artifactsLocation": { + "value": "[parameters('_artifactsLocation')]" + }, + "_artifactsLocationSasToken": { + "value": "[parameters('_artifactsLocationSasToken')]" + }, + "sqlVmName": { + "value": "[variables('sqlVmName')]" + }, + "sqlDataVolumeSize": { + "value": "[parameters('sqlDataVolumeSize')]" + }, + "otcIp": { + "value": "[reference('netapp-oncommand-cloudmanager').outputs.NetAppOnCommandCloudManagerPublicIP.value]" + }, + "NetAppTags": { + "value": "[variables('NetAppTags')]" + }, + "quickstartTags": { + "value": "[variables('quickstartTags')]" + } } + } + } + ], + "outputs": { + "NetApp ONTAP Cloud Manager URL:": { + "type": "string", + "value": "[reference('netapp-oncommand-cloudmanager').outputs.NetAppOnCommandCloudManagerURL.value]" + }, + "Jump VM FQDN": { + "type": "string", + "value": "[reference('jump-vm').outputs.jumpVmDNSLabel.value]" + }, + "NetApp OTC SVM Password": { + "type": "string", + "value": "[variables('OTCPassword')]" } + } } diff --git a/netapp-ontap-sql/nested/jump-vm.json b/netapp-ontap-sql/nested/jump-vm.json index a4a82e6e4c01..6a8965ca8f6c 100644 --- a/netapp-ontap-sql/nested/jump-vm.json +++ b/netapp-ontap-sql/nested/jump-vm.json @@ -1,190 +1,204 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUserName": { - "type": "string" - }, - "adminPassword": { - "type": "securestring" - }, - "diagStorageAccountName": { - "type": "string" - }, - "storageAccountType": { - "type": "string" - }, - "jumpStorageAccountName": { - "type": "string" - }, - "vnetID": { - "type": "string" - }, - "webSubnetName": { - "type": "string" - }, - "jumpVmName": { - "type": "string" - }, - "jumpvmSize": { - "type": "string" - }, - "jumpvmNicName": { - "type": "string" - }, - "jumpvmPublicIPAddressName": { - "type": "string" - }, - "jumpvmDnsName": { - "type": "string" - }, - "NetAppTags": { - "type": "object" - }, - "quickstartTags": { - "type": "object" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUserName": { + "type": "string" }, - "variables": { - "publicIPAddressType": "Static", - "vmStorageAccountContainerName": "vhds", - "OSDiskName": "jump-vm-osdisk" - }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('jumpStorageAccountName')]", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" - }, - "sku": { - "name": "[parameters('storageAccountType')]" - }, - "kind": "Storage", - "properties": {} - }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[parameters('jumpvmPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "comments": "jump-VM Public IP Address", - "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" - }, + "adminPassword": { + "type": "securestring" + }, + "diagStorageAccountName": { + "type": "string" + }, + "storageAccountType": { + "type": "string" + }, + "jumpStorageAccountName": { + "type": "string" + }, + "vnetID": { + "type": "string" + }, + "webSubnetName": { + "type": "string" + }, + "jumpVmName": { + "type": "string" + }, + "jumpvmSize": { + "type": "string" + }, + "jumpvmNicName": { + "type": "string" + }, + "jumpvmPublicIPAddressName": { + "type": "string" + }, + "jumpvmDnsName": { + "type": "string" + }, + "NetAppTags": { + "type": "object" + }, + "quickstartTags": { + "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "publicIPAddressType": "Static", + "vmStorageAccountContainerName": "vhds", + "OSDiskName": "jump-vm-osdisk" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('jumpStorageAccountName')]", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "tags": { + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[parameters('jumpvmPublicIPAddressName')]", + "location": "[parameters('location')]", + "comments": "jump-VM Public IP Address", + "tags": { + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "properties": { + "publicIPAllocationMethod": "[variables('PublicIPAddressType')]", + "dnsSettings": { + "domainNameLabel": "[parameters('jumpvmDnsName')]" + }, + "idleTimeoutInMinutes": 4 + } + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/networkInterfaces", + "name": "[parameters('jumpvmNicName')]", + "location": "[parameters('location')]", + "comments": "Jump Server nic Card", + "tags": { + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/', parameters('jumpvmpublicIPAddressName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "publicIPAllocationMethod": "[variables('PublicIPAddressType')]", - "dnsSettings": { - "domainNameLabel": "[parameters('jumpvmDnsName')]" - }, - "idleTimeoutInMinutes": 4 + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('jumpvmpublicIPAddressName'))]" + }, + "subnet": { + "id": "[concat(parameters('vnetID'), '/subnets/', parameters('webSubnetName'))]" + } } - }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/networkInterfaces", - "name": "[parameters('jumpvmNicName')]", - "location": "[resourceGroup().location]", - "comments": "Jump Server nic Card", - "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" + } + ] + } + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('jumpvmName')]", + "location": "[parameters('location')]", + "comments": "Jump Server VM ", + "tags": { + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('jumpStorageAccountName'))]", + "[concat('Microsoft.Network/networkInterfaces/', parameters('jumpvmNicName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('jumpvmSize')]" + }, + "osProfile": { + "computerName": "[parameters('jumpvmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "MicrosoftWindowsServer", + "offer": "WindowsServer", + "sku": "2012-R2-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('jumpStorageAccountName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/',variables('OSDiskName'),'.vhd')]" }, - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', parameters('jumpvmpublicIPAddressName'))]" - ], - "properties": { - "ipConfigurations": [{ - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('jumpvmpublicIPAddressName'))]" - }, - "subnet": { - "id": "[concat(parameters('vnetID'), '/subnets/', parameters('webSubnetName'))]" - } - } - }] + "caching": "ReadWrite", + "createOption": "FromImage" + }, + "dataDisks": [] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('jumpvmNicName'))]" } - }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('jumpvmName')]", - "location": "[resourceGroup().location]", - "comments": "Jump Server VM ", - "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" - }, - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', parameters('jumpStorageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', parameters('jumpvmNicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('jumpvmSize')]" - }, - "osProfile": { - "computerName": "[parameters('jumpvmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "MicrosoftWindowsServer", - "offer": "WindowsServer", - "sku": "2012-R2-Datacenter", - "version": "latest" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('jumpStorageAccountName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/',variables('OSDiskName'),'.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - }, - "dataDisks": [] - }, - "networkProfile": { - "networkInterfaces": [{ - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('jumpvmNicName'))]" - }] - } - }, - "resources": [{ - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('jumpVmName'),'/','disableservermanager')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/',parameters('jumpVmName'))]" - ], - "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" - }, - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.8", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "[concat('powershell -command',' ','\"Get-ScheduledTask -TaskName ServerManager | Disable-ScheduledTask -Verbose\"'\r\n)]" - } - } - }] + ] } - ], - "outputs": { - "jumpVmDNSLabel": { - "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',parameters('jumpvmPublicIPAddressName'))).dnsSettings.fqdn]", - "type": "string" + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('jumpVmName'),'/','disableservermanager')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',parameters('jumpVmName'))]" + ], + "tags": { + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.8", + "autoUpgradeMinorVersion": true, + "settings": { + "commandToExecute": "[concat('powershell -command',' ','\"Get-ScheduledTask -TaskName ServerManager | Disable-ScheduledTask -Verbose\"')]" + } + } } + ] + } + ], + "outputs": { + "jumpVmDNSLabel": { + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',parameters('jumpvmPublicIPAddressName'))).dnsSettings.fqdn]", + "type": "string" } + } } diff --git a/netapp-ontap-sql/nested/netapp-oncommand-cloudmanager.json b/netapp-ontap-sql/nested/netapp-oncommand-cloudmanager.json index bd2bd98ccf64..1e2ae17c85cf 100644 --- a/netapp-ontap-sql/nested/netapp-oncommand-cloudmanager.json +++ b/netapp-ontap-sql/nested/netapp-oncommand-cloudmanager.json @@ -38,11 +38,18 @@ "OnCommandCloudManagerDnsName": { "type": "string" }, - "NetAppTags":{ - "type":"object" + "NetAppTags": { + "type": "object" }, - "quickstartTags":{ - "type":"object" + "quickstartTags": { + "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -55,27 +62,27 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('webStorageAccountName')]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" }, "sku": { - "name": "[parameters('storageAccountType')]" + "name": "[parameters('storageAccountType')]" }, "kind": "Storage", - "properties": {} + "properties": {} }, { "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('OnCommandCloudManagerpublicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "OnCommandCloudManager Public IP Address", "tags": { - "quickstartName":"[parameters('quickstartTags').name]", - "provider":"[parameters('NetAppTags').provider]" - }, + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -88,15 +95,15 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('OnCommandCloudManagerVmNicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "OnCommand Manage nic ", "tags": { - "quickstartName":"[parameters('quickstartTags').name]", - "provider":"[parameters('NetAppTags').provider]" - }, + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('OnCommandCloudManagerpublicIPAddressName'))]" - ], + ], "properties": { "ipConfigurations": [ { @@ -118,12 +125,12 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('OnCommandCloudManagerVmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "OnCommand Manager VM", "tags": { - "quickstartName":"[parameters('quickstartTags').name]", - "provider":"[parameters('NetAppTags').provider]" - }, + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('webStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', parameters('OnCommandCloudManagerVmNicName'))]" @@ -157,8 +164,7 @@ "caching": "ReadWrite", "createOption": "FromImage" }, - "dataDisks": [ - ] + "dataDisks": [] }, "networkProfile": { "networkInterfaces": [ @@ -179,5 +185,5 @@ "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',parameters('OnCommandCloudManagerpublicIPAddressName'))).ipAddress]", "type": "string" } - } + } } diff --git a/netapp-ontap-sql/nested/netapp-ontap-cloud.json b/netapp-ontap-sql/nested/netapp-ontap-cloud.json index 3a89e7fff718..c9b19e4d0a6d 100644 --- a/netapp-ontap-sql/nested/netapp-ontap-cloud.json +++ b/netapp-ontap-sql/nested/netapp-ontap-cloud.json @@ -1,94 +1,103 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminEmailAddress": { - "type": "string" - }, - "adminPassword": { - "type": "securestring" - }, - "OTCPassword": { - "type": "securestring" - }, - "dataNsgName": { - "type": "string" - }, - "vNetId": { - "type": "string" - }, - "cidr": { - "type": "string" - }, - "dataSubnetName": { - "type": "string" - }, - "OnCommandCloudManagerVmName": { - "type": "string" - }, - "azureADApplicationID": { - "type": "string" - }, - "azureADApplicationSecret": { - "type": "string" - }, - "netappOntapCloudLicense": { - "type": "object" - }, - "netappOntapVersion": { - "type": "string" - }, - "_artifactsLocation": { - "type": "string" - }, - "_artifactsLocationSasToken": { - "type": "securestring" - }, - "NetAppTags": { - "type": "object" - }, - "quickstartTags": { - "type": "object" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminEmailAddress": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "OTCPassword": { + "type": "securestring" + }, + "dataNsgName": { + "type": "string" + }, + "vNetId": { + "type": "string" + }, + "cidr": { + "type": "string" + }, + "dataSubnetName": { + "type": "string" + }, + "OnCommandCloudManagerVmName": { + "type": "string" + }, + "azureADApplicationID": { + "type": "string" + }, + "azureADApplicationSecret": { + "type": "string" + }, + "netappOntapCloudLicense": { + "type": "object" + }, + "netappOntapVersion": { + "type": "string" + }, + "_artifactsLocation": { + "type": "string" + }, + "_artifactsLocationSasToken": { + "type": "securestring" + }, + "NetAppTags": { + "type": "object" + }, + "quickstartTags": { + "type": "object" }, - "variables": { - "subscriptionId": "[subscription().subscriptionId]", - "azureADTenantID": "[subscription().tenantId]", - "subnetID": "[concat(parameters('vnetID'),'/subnets/',parameters('dataSubnetName'))]", - "encodedadminPassword": "[base64(parameters('adminPassword'))]", - "encodedOTCPassword": "[base64(parameters('OTCPassword'))]", - "nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',parameters('dataNSGName'))]", - "netappOntapCloudLicenseType": "[parameters('netappOntapCloudLicense').licenseType]", - "netappOntapCloudInstanceType": "[parameters('netappOntapCloudLicense').instanceType]", - "netappOntapCloudStorageType": "[parameters('netappOntapCloudLicense').storageType]", - "otcName": "[concat('netappotc',uniqueString(resourceGroup().id))]", - "deploymentRegion": "[resourceGroup().location]", - "quickstartNameTagValue": "[parameters('quickstartTags').name]", - "quickstartProviderTagValue": "[parameters('NetAppTags').provider]", - "deployOTCScriptName": "deploy-netapp-otc.sh", - "customScriptCommand": "su -c'sh ", - "scriptClose": "'" - }, - "resources": [{ - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('OnCommandCloudManagerVmName'),'/','deployOntapCloud')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" - }, - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'),'/scripts/',variables('deployOTCScriptName'),parameters('_artifactsLocationSasToken'))]" - ], - "commandToExecute": "[concat(variables('customScriptCommand'),' ',variables('deployOTCScriptName'),' ',variables('deploymentRegion'),' ',variables('otcName'),' ',parameters('adminEmailAddress'),' ',variables('encodedadminPassword'),' ',variables('encodedOTCPassword'),' ',variables('subscriptionId'),' ',variables('azureADTenantID'),' ',parameters('azureADApplicationID'),' ',parameters('azureADApplicationSecret'),' ',parameters('vnetID'),' ',parameters('cidr'),' ',variables('subnetID'),' ',variables('nsgID'),' ',variables('netappOntapCloudLicenseType'),' ',variables('netappOntapCloudInstanceType'),' ',variables('netappOntapCloudStorageType'),' ',variables('quickstartNameTagValue'),' ',variables('quickstartProviderTagValue'),' ',parameters('netappOntapVersion'),' ',variables('scriptClose'))]" - } + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "subscriptionId": "[subscription().subscriptionId]", + "azureADTenantID": "[subscription().tenantId]", + "subnetID": "[concat(parameters('vnetID'),'/subnets/',parameters('dataSubnetName'))]", + "encodedadminPassword": "[base64(parameters('adminPassword'))]", + "encodedOTCPassword": "[base64(parameters('OTCPassword'))]", + "nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',parameters('dataNSGName'))]", + "netappOntapCloudLicenseType": "[parameters('netappOntapCloudLicense').licenseType]", + "netappOntapCloudInstanceType": "[parameters('netappOntapCloudLicense').instanceType]", + "netappOntapCloudStorageType": "[parameters('netappOntapCloudLicense').storageType]", + "otcName": "[concat('netappotc',uniqueString(resourceGroup().id))]", + "deploymentRegion": "[parameters('location')]", + "quickstartNameTagValue": "[parameters('quickstartTags').name]", + "quickstartProviderTagValue": "[parameters('NetAppTags').provider]", + "deployOTCScriptName": "deploy-netapp-otc.sh", + "customScriptCommand": "su -c'sh ", + "scriptClose": "'" + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('OnCommandCloudManagerVmName'),'/','deployOntapCloud')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "tags": { + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'),'/scripts/',variables('deployOTCScriptName'),parameters('_artifactsLocationSasToken'))]" + ], + "commandToExecute": "[concat(variables('customScriptCommand'),' ',variables('deployOTCScriptName'),' ',variables('deploymentRegion'),' ',variables('otcName'),' ',parameters('adminEmailAddress'),' ',variables('encodedadminPassword'),' ',variables('encodedOTCPassword'),' ',variables('subscriptionId'),' ',variables('azureADTenantID'),' ',parameters('azureADApplicationID'),' ',parameters('azureADApplicationSecret'),' ',parameters('vnetID'),' ',parameters('cidr'),' ',variables('subnetID'),' ',variables('nsgID'),' ',variables('netappOntapCloudLicenseType'),' ',variables('netappOntapCloudInstanceType'),' ',variables('netappOntapCloudStorageType'),' ',variables('quickstartNameTagValue'),' ',variables('quickstartProviderTagValue'),' ',parameters('netappOntapVersion'),' ',variables('scriptClose'))]" } - }] + } + } + ] } diff --git a/netapp-ontap-sql/nested/shared-resources.json b/netapp-ontap-sql/nested/shared-resources.json index 43a94d4d72fa..5cae69e0dcc6 100644 --- a/netapp-ontap-sql/nested/shared-resources.json +++ b/netapp-ontap-sql/nested/shared-resources.json @@ -1,167 +1,172 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "webNsgName": { - "type": "string" - }, - "dataNsgName": { - "type": "string" - }, - "diagStorageAccountName": { - "type": "string" - }, - "storageAccountType": { - "type": "string" - }, - "virtualNetworkName": { - "type": "string" - }, - "dataSubnetName": { - "type": "string" - }, - "webSubnetName": { - "type": "string" - }, - "addressPrefix": { - "type": "string" - }, - "webSubnetPrefix": { - "type": "string" - }, - "dataSubnetPrefix": { - "type": "string" - }, - "remoteAllowedCIDR": { - "type": "string" - }, - "NetAppTags": { - "type": "object" - }, - "quickstartTags": { - "type": "object" - } - }, - "variables": {}, - "resources": [{ - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[parameters('webNSGName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": " NSG for Web subnet", - "tags": { - "displayName": "Web NSG", - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" - }, + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "webNsgName": { + "type": "string" + }, + "dataNsgName": { + "type": "string" + }, + "diagStorageAccountName": { + "type": "string" + }, + "storageAccountType": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string" + }, + "dataSubnetName": { + "type": "string" + }, + "webSubnetName": { + "type": "string" + }, + "addressPrefix": { + "type": "string" + }, + "webSubnetPrefix": { + "type": "string" + }, + "dataSubnetPrefix": { + "type": "string" + }, + "remoteAllowedCIDR": { + "type": "string" + }, + "NetAppTags": { + "type": "object" + }, + "quickstartTags": { + "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[parameters('webNSGName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": " NSG for Web subnet", + "tags": { + "displayName": "Web NSG", + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "properties": { + "securityRules": [ + { + "name": "httpRule", "properties": { - "securityRules": [{ - "name": "httpRule", - "properties": { - "description": "Allow HTTP", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "80", - "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", - "destinationAddressPrefix": "[parameters('webSubnetPrefix')]", - "access": "Allow", - "priority": 100, - "direction": "Inbound" - } - }, - { - "name": "rdpRule", - "properties": { - "description": "Allow RDP", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "3389", - "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", - "destinationAddressPrefix": "[parameters('webSubnetPrefix')]", - "access": "Allow", - "priority": 110, - "direction": "Inbound" - } - } - ] + "description": "Allow HTTP", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "80", + "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", + "destinationAddressPrefix": "[parameters('webSubnetPrefix')]", + "access": "Allow", + "priority": 100, + "direction": "Inbound" } - }, - { - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[parameters('dataNSGName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": " NSG for Data subnet, does not allow any traffic from Internet(Default Rule)", - "tags": { - "displayName": "Data NSG", - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" - }, - "properties": {} - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('diagStorageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "comments": "Storage account used to store the Web VM disks", - "tags": { - "displayName": "Web VM Storage Account", - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" - }, - "sku": { - "name": "[parameters('storageAccountType')]" - }, - "kind": "Storage", + }, + { + "name": "rdpRule", "properties": { - + "description": "Allow RDP", + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "3389", + "sourceAddressPrefix": "[parameters('remoteAllowedCIDR')]", + "destinationAddressPrefix": "[parameters('webSubnetPrefix')]", + "access": "Allow", + "priority": 110, + "direction": "Inbound" } + } + ] + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[parameters('dataNSGName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": " NSG for Data subnet, does not allow any traffic from Internet(Default Rule)", + "tags": { + "displayName": "Data NSG", + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "properties": {} + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('diagStorageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "comments": "Storage account used to store the Web VM disks", + "tags": { + "displayName": "Web VM Storage Account", + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "kind": "Storage", + "properties": {} + }, + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('virtualNetworkName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "Virtual network for overall solution", + "tags": { + "displayName": "Virtual Network", + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', parameters('webNSGName'))]", + "[concat('Microsoft.Network/networkSecurityGroups/', parameters('dataNsgName'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('addressPrefix')]" + ] }, - { - "type": "Microsoft.Network/virtualNetworks", - "name": "[parameters('virtualNetworkName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "Virtual network for overall solution", - "tags": { - "displayName": "Virtual Network", - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" - }, - "dependsOn": [ - "[concat('Microsoft.Network/networkSecurityGroups/', parameters('webNSGName'))]", - "[concat('Microsoft.Network/networkSecurityGroups/', parameters('dataNsgName'))]" - ], + "subnets": [ + { + "name": "[parameters('webSubnetName')]", + "properties": { + "addressPrefix": "[parameters('webSubnetPrefix')]", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('webNSGName'))]" + } + } + }, + { + "name": "[parameters('dataSubnetName')]", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[parameters('addressPrefix')]" - ] - }, - "subnets": [{ - "name": "[parameters('webSubnetName')]", - "properties": { - "addressPrefix": "[parameters('webSubnetPrefix')]", - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('webNSGName'))]" - } - } - }, - { - "name": "[parameters('dataSubnetName')]", - "properties": { - "addressPrefix": "[parameters('dataSubnetPrefix')]", - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('dataNsgName'))]" - } - } - } - - ] + "addressPrefix": "[parameters('dataSubnetPrefix')]", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('dataNsgName'))]" + } } - } - - - ] + } + ] + } + } + ] } diff --git a/netapp-ontap-sql/nested/sql-netappotc-connect.json b/netapp-ontap-sql/nested/sql-netappotc-connect.json index 61eeb4dd6f48..cf8989542290 100644 --- a/netapp-ontap-sql/nested/sql-netappotc-connect.json +++ b/netapp-ontap-sql/nested/sql-netappotc-connect.json @@ -1,62 +1,70 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminEmailAddress": { - "type": "securestring" - }, - "adminPassword": { - "type": "securestring" - }, - "OTCPassword": { - "type": "securestring" - }, - "_artifactsLocation": { - "type": "string" - }, - "_artifactsLocationSasToken": { - "type": "securestring" - }, - "sqlVmName": { - "type": "string" - }, - "otcIp": { - "type": "string" - }, - "sqlDataVolumeSize": { - "type": "int" - }, - "NetAppTags": { - "type": "object" - }, - "quickstartTags": { - "type": "object" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminEmailAddress": { + "type": "securestring" }, - "variables": { - "scriptFileName" : "netapp_connect_ontap_win.ps1" + "adminPassword": { + "type": "securestring" }, - "resources": [{ - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('sqlVmName'),'/','sqlNetAppOTCConnect')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" + "OTCPassword": { + "type": "securestring" + }, + "_artifactsLocation": { + "type": "string" + }, + "_artifactsLocationSasToken": { + "type": "securestring" + }, + "sqlVmName": { + "type": "string" + }, + "otcIp": { + "type": "string" + }, + "sqlDataVolumeSize": { + "type": "int" + }, + "NetAppTags": { + "type": "object" + }, + "quickstartTags": { + "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "scriptFileName": "netapp_connect_ontap_win.ps1" + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('sqlVmName'),'/','sqlNetAppOTCConnect')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "tags": { + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.8", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'),'/scripts/',variables('scriptFileName'),parameters('_artifactsLocationSasToken'))]" + ] }, - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.8", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'),'/scripts/',variables('scriptFileName'),parameters('_artifactsLocationSasToken'))]" - ] - }, - "protectedSettings": { - "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File',' ', variables('scriptFileName'), ' ', parameters('adminEmailAddress'),' ', parameters('adminPassword'),' ', parameters('OTCPassword'),' ', parameters('otcIp'),' ', parameters('sqlDataVolumeSize'))]" + "protectedSettings": { + "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File',' ', variables('scriptFileName'), ' ', parameters('adminEmailAddress'),' ', parameters('adminPassword'),' ', parameters('OTCPassword'),' ', parameters('otcIp'),' ', parameters('sqlDataVolumeSize'))]" } } } diff --git a/netapp-ontap-sql/nested/sql-vm.json b/netapp-ontap-sql/nested/sql-vm.json index 96690eb59a4c..281bc5232b4a 100644 --- a/netapp-ontap-sql/nested/sql-vm.json +++ b/netapp-ontap-sql/nested/sql-vm.json @@ -1,166 +1,177 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "sqlVmName": { - "type": "string" - }, - "sqlVmNicName": { - "type": "string" - }, - "adminUsername": { - "type": "string" - }, - "adminPassword": { - "type": "securestring" - }, - "diagStorageAccountName": { - "type": "string" - }, - "storageAccountType": { - "type": "string" - }, - "dataStorageAccountName": { - "type": "string" - }, - "vNetId": { - "type": "string" - }, - "dataSubnetName": { - "type": "string" - }, - "sqlVmSize": { - "type": "string" - }, - "NetAppTags": { - "type": "object" - }, - "quickstartTags": { - "type": "object" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "sqlVmName": { + "type": "string" + }, + "sqlVmNicName": { + "type": "string" + }, + "adminUsername": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "diagStorageAccountName": { + "type": "string" + }, + "storageAccountType": { + "type": "string" + }, + "dataStorageAccountName": { + "type": "string" + }, + "vNetId": { + "type": "string" + }, + "dataSubnetName": { + "type": "string" + }, + "sqlVmSize": { + "type": "string" + }, + "NetAppTags": { + "type": "object" + }, + "quickstartTags": { + "type": "object" + }, + "_artifactsLocation": { + "type": "string" + }, + "_artifactsLocationSasToken": { + "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "vmStorageAccountContainerName": "vhds", + "OSDiskName": "sql-vm-osdisk", + "psToolkitScriptName": "InstallNetAppPS.ps1" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('dataStorageAccountName')]", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "tags": { + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Network/networkInterfaces", + "name": "[parameters('sqlVmNicName')]", + "location": "[parameters('location')]", + "comments": "SQL Server nic ", + "tags": { + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[concat(parameters('vnetID'), '/subnets/', parameters('dataSubnetName'))]" + } + } + } + ] + } + }, + { + "apiVersion": "2016-03-30", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('sqlVmName')]", + "location": "[parameters('location')]", + "comments": "SQL Sever VM", + "tags": { + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('dataStorageAccountName'))]", + "[concat('Microsoft.Network/networkInterfaces/', parameters('sqlVmNicName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('sqlVmSize')]" }, - "_artifactsLocation": { - "type": "string" + "osProfile": { + "computerName": "[parameters('sqlVmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" }, - "_artifactsLocationSasToken": { - "type": "string" - } - }, - "variables": { - "vmStorageAccountContainerName": "vhds", - "OSDiskName": "sql-vm-osdisk", - "psToolkitScriptName": "InstallNetAppPS.ps1" - }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('dataStorageAccountName')]", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" + "storageProfile": { + "imageReference": { + "publisher": "MicrosoftSQLServer", + "offer": "SQL2014SP2-WS2012R2", + "sku": "Enterprise", + "version": "latest" + }, + "osDisk": { + "name": "osdisk", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('dataStorageAccountName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/',variables('OSDiskName'),'.vhd')]" }, - "sku": { - "name": "[parameters('storageAccountType')]" - }, - "kind": "Storage", - "properties": {} + "caching": "ReadWrite", + "createOption": "FromImage" + }, + "dataDisks": [] }, - { - "apiVersion": "2016-03-30", - "type": "Microsoft.Network/networkInterfaces", - "name": "[parameters('sqlVmNicName')]", - "location": "[resourceGroup().location]", - "comments": "SQL Server nic ", - "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" - }, - "properties": { - "ipConfigurations": [{ - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[concat(parameters('vnetID'), '/subnets/', parameters('dataSubnetName'))]" - } - } - }] + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('sqlVmNicName'))]" } - }, - + ] + } + }, + "resources": [ { - "apiVersion": "2016-03-30", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('sqlVmName')]", - "location": "[resourceGroup().location]", - "comments": "SQL Sever VM", - "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" - }, - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', parameters('dataStorageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', parameters('sqlVmNicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('sqlVmSize')]" - }, - "osProfile": { - "computerName": "[parameters('sqlVmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "MicrosoftSQLServer", - "offer": "SQL2014SP2-WS2012R2", - "sku": "Enterprise", - "version": "latest" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('dataStorageAccountName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/',variables('OSDiskName'),'.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - }, - "dataDisks": [] - }, - "networkProfile": { - "networkInterfaces": [{ - "id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('sqlVmNicName'))]" - }] - } - }, - "resources": [{ - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('sqlVmName'),'/','sqlNetAppOTCConnect')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/',parameters('sqlVmName'))]" - ], - "tags": { - "quickstartName": "[parameters('quickstartTags').name]", - "provider": "[parameters('NetAppTags').provider]" - }, - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.8", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'),'/scripts/',variables('psToolkitScriptName'),parameters('_artifactsLocationSasToken'))]" - ], - "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File',' ', variables('psToolkitScriptName'))]" - } - } - }] - + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('sqlVmName'),'/','sqlNetAppOTCConnect')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',parameters('sqlVmName'))]" + ], + "tags": { + "quickstartName": "[parameters('quickstartTags').name]", + "provider": "[parameters('NetAppTags').provider]" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.8", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'),'/scripts/',variables('psToolkitScriptName'),parameters('_artifactsLocationSasToken'))]" + ], + "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File',' ', variables('psToolkitScriptName'))]" + } + } } - - ] + ] + } + ] } diff --git a/netki-wns-api-server-on-ubuntu/azuredeploy.json b/netki-wns-api-server-on-ubuntu/azuredeploy.json index ad3a5549b64a..557f1f84f6b9 100644 --- a/netki-wns-api-server-on-ubuntu/azuredeploy.json +++ b/netki-wns-api-server-on-ubuntu/azuredeploy.json @@ -31,10 +31,16 @@ "14.04-DAILY", "15.10" ] + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-06-15", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "OSDiskName": "osdiskfornetkiwnsapiserver", @@ -59,7 +65,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -68,7 +74,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -80,7 +86,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -101,7 +107,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -127,7 +133,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -170,7 +176,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('extensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -186,7 +192,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/dockerfile')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]", "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), '/extensions/', variables('extensionName'))]" @@ -205,4 +211,4 @@ } } ] -} \ No newline at end of file +} diff --git a/nylas-email-sync-engine/azuredeploy.json b/nylas-email-sync-engine/azuredeploy.json index d53ff29a253f..95b307d7f2b8 100644 --- a/nylas-email-sync-engine/azuredeploy.json +++ b/nylas-email-sync-engine/azuredeploy.json @@ -36,6 +36,13 @@ "metadata": { "description": "Size of the VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -56,15 +63,14 @@ "vmName": "nylasSyncEngineVM", "virtualNetworkName": "nylasVNET", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "apiVersion": "2015-06-15" + "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]" }, "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -73,7 +79,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -85,7 +91,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -106,7 +112,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", @@ -136,7 +142,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -211,7 +217,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -259,7 +265,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/nylasScript')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" @@ -281,11 +287,11 @@ "outputs": { "hostname": { "type": "string", - "value": "[concat(parameters('dnsLabelPrefix'), '.', resourceGroup().location, '.cloudapp.azure.com')]" + "value": "[concat(parameters('dnsLabelPrefix'), '.', parameters('location'), '.cloudapp.azure.com')]" }, "sshCommand": { "type": "string", - "value": "[concat('ssh ', parameters('adminUsername'), '@', parameters('dnsLabelPrefix'), '.', resourceGroup().location, '.cloudapp.azure.com')]" + "value": "[concat('ssh ', parameters('adminUsername'), '@', parameters('dnsLabelPrefix'), '.', parameters('location'), '.cloudapp.azure.com')]" } } -} \ No newline at end of file +} diff --git a/openchain-blockchain-coinprism/azuredeploy.json b/openchain-blockchain-coinprism/azuredeploy.json index 5daeab45b915..37b93e9b8a99 100644 --- a/openchain-blockchain-coinprism/azuredeploy.json +++ b/openchain-blockchain-coinprism/azuredeploy.json @@ -83,10 +83,16 @@ "metadata": { "description": "If True, anyone can join the ledger after generating a key pair. If False, users must be granted permission to transact on the ledger (except for the admin)." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-06-15", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "ubuntuOSVersion": "16.04-LTS", @@ -114,7 +120,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -123,7 +129,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -135,7 +141,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nsgID')]" ], @@ -162,7 +168,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -188,7 +194,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -226,7 +232,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -269,7 +275,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '/', variables('dockerExtensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -285,7 +291,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '/', variables('scriptExtensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), '/extensions/', variables('dockerExtensionName'))]" ], @@ -313,4 +319,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/openedx-devstack-ubuntu/azuredeploy.json b/openedx-devstack-ubuntu/azuredeploy.json index 39dbfd8d40df..0c150f60a982 100644 --- a/openedx-devstack-ubuntu/azuredeploy.json +++ b/openedx-devstack-ubuntu/azuredeploy.json @@ -41,22 +41,25 @@ "metadata": { "description": "Virtual machine size." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-06-15", - "openedxVersion": "named-release/dogwood.1", "scriptDownloadUri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/openedx-devstack-ubuntu/", "installScript": "install-openedx.sh", - "installCommand": "[concat('bash -c ''nohup ./', variables('installScript'), ' ', variables('openedxVersion'), ' /var/log/azure/openedx-install.log &''')]", + "installCommand": "[concat('bash -c \''nohup ./', variables('installScript'), ' ', variables('openedxVersion'), ' /var/log/azure/openedx-install.log &''')]", "vmName": "jumpbox2", "osImagePublisher": "Canonical", "osImageOffer": "UbuntuServer", "osImageSKU": "12.04.5-LTS", "publicIPAddressName": "myPublicIP", "publicIPAddressType": "Dynamic", - "OSDiskName": "osdisk", - "nicName": "vmNic", "virtualNetworkName": "VNET", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", @@ -74,7 +77,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -83,7 +86,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -95,7 +98,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nsgID')]" ], @@ -122,7 +125,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -174,7 +177,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('vmName'), '-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -200,7 +203,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('vmName'), '-nic')]" @@ -243,7 +246,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '/installscript')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -261,4 +264,4 @@ } } ] -} \ No newline at end of file +} diff --git a/openedx-fullstack-ubuntu/azuredeploy.json b/openedx-fullstack-ubuntu/azuredeploy.json index 1d2359f48a4b..7dfe7ea0a655 100644 --- a/openedx-fullstack-ubuntu/azuredeploy.json +++ b/openedx-fullstack-ubuntu/azuredeploy.json @@ -55,10 +55,16 @@ "metadata": { "description": "Virtual machine size." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-06-15", "openedxVersion": "open-release/ficus.master", "scriptDownloadUri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/openedx-fullstack-ubuntu/", "installScript": "install-openedx.sh", @@ -69,8 +75,6 @@ "osImageSKU": "16.04-LTS", "publicIPAddressName": "myPublicIP", "publicIPAddressType": "Dynamic", - "OSDiskName": "osdisk", - "nicName": "vmNic", "virtualNetworkName": "VNET", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", @@ -88,7 +92,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -97,7 +101,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -109,7 +113,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nsgID')]" ], @@ -136,7 +140,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -188,7 +192,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('vmName'), '-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -214,7 +218,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('vmName'), '-nic')]" @@ -257,7 +261,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '/installscript')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -276,4 +280,4 @@ } } ] -} \ No newline at end of file +} diff --git a/openedx-scalable-ubuntu/azuredeploy.json b/openedx-scalable-ubuntu/azuredeploy.json index 22f9044f55f9..b60e16a81a63 100644 --- a/openedx-scalable-ubuntu/azuredeploy.json +++ b/openedx-scalable-ubuntu/azuredeploy.json @@ -103,10 +103,16 @@ "metadata": { "description": "Size of the MongoDB virtual machine." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-06-15", "scriptDownloadUri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/openedx-scalable-ubuntu/", "installScript": "install-openedx.sh", "installCommand": "[concat('bash -c ''nohup ./', variables('installScript'), ' ', parameters('appVmCount'), ' ', parameters('adminUsername'), ' ', parameters('adminPassword'), ' /var/log/azure/openedx-install.log &''')]", @@ -120,8 +126,6 @@ "appPublicIPAddressName": "myPublicIP", "mySqlPublicIPAddressName": "myPublicIPMySql", "mongoPublicIPAddressName": "myPublicIPMongo", - "OSDiskName": "osdisk", - "nicName": "vmNic", "virtualNetworkName": "VNET", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", @@ -145,7 +149,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -154,14 +158,14 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('appPublicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -173,7 +177,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('mySqlPublicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -182,7 +186,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('mongoPublicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -191,7 +195,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nsgID')]" ], @@ -218,7 +222,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -270,7 +274,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('appVmName'), copyIndex(), '-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/loadBalancers/',variables('lbName'))]", @@ -308,7 +312,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('mySqlVmName'), '-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('mySqlPublicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -334,7 +338,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('mongoVmName'), '-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('mongoPublicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -360,7 +364,7 @@ "apiVersion": "2015-06-15", "name": "[variables('lbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('appPublicIPAddressName'))]" ], @@ -465,7 +469,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/loadBalancers/inboundNatRules", "name": "[concat(variables('lbName'), '/SSH-VM', copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/loadBalancers/',variables('lbName'))]" ], @@ -487,7 +491,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('appVmName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('appVmName'), copyIndex(), '-nic')]", @@ -538,7 +542,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('mySqlVmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('mySqlVmName'), '-nic')]" @@ -581,7 +585,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('mongoVmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('mongoVmName'), '-nic')]" @@ -624,7 +628,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('appVmName'), '0', '/installscript')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('appVmName'), '0')]" ], @@ -646,4 +650,4 @@ } } ] -} \ No newline at end of file +} diff --git a/openjdk-tomcat-ubuntu-vm/azuredeploy.json b/openjdk-tomcat-ubuntu-vm/azuredeploy.json index 198eb053f579..242dacc7478b 100644 --- a/openjdk-tomcat-ubuntu-vm/azuredeploy.json +++ b/openjdk-tomcat-ubuntu-vm/azuredeploy.json @@ -55,6 +55,13 @@ }, "vmDnsName": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -77,7 +84,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -86,7 +93,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -98,7 +105,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -119,7 +126,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -145,7 +152,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -188,7 +195,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/openldap-cluster-ubuntu/azuredeploy.json b/openldap-cluster-ubuntu/azuredeploy.json index 56bd41abbb5e..67d66103afa0 100644 --- a/openldap-cluster-ubuntu/azuredeploy.json +++ b/openldap-cluster-ubuntu/azuredeploy.json @@ -74,6 +74,13 @@ "metadata": { "description": "The size of the VM." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -106,15 +113,14 @@ "fileUriBase": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/openldap-cluster-ubuntu/", "ldifUriBase": "[concat(variables('fileUriBase'), 'ldif/')]", "installScriptUri": "[concat(variables('fileUriBase'), variables('installScriptName'))]", - "installCommand": "[concat('bash ', variables('installScriptName'), ' ', parameters('vmAdminUsername'), ' ', parameters('vmAdminPassword'), ' ', parameters('directoryAdminPassword'), ' ', parameters('namePrefix'), ' ', resourceGroup().location, ' ', parameters('organization'), ' ',variables('privateIPAddressPrefix'), ' ', parameters('vmCount'))]", - "apiVersion": "2015-06-15" + "installCommand": "[concat('bash ', variables('installScriptName'), ' ', parameters('vmAdminUsername'), ' ', parameters('vmAdminPassword'), ' ', parameters('directoryAdminPassword'), ' ', parameters('namePrefix'), ' ', parameters('location'), ' ', parameters('organization'), ' ',variables('privateIPAddressPrefix'), ' ', parameters('vmCount'))]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -123,14 +129,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -142,7 +148,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -163,7 +169,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]", "[concat('Microsoft.Network/loadBalancers/',variables('lbName'))]" @@ -201,7 +207,7 @@ "apiVersion": "2015-06-15", "name": "[variables('lbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'))]" ], @@ -362,7 +368,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/',concat(variables('nicName'),copyIndex()))]", @@ -413,7 +419,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(concat(variables('vmName'),copyIndex()),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'),copyIndex()))]" ], @@ -454,4 +460,4 @@ } } ] -} \ No newline at end of file +} diff --git a/openldap-singlevm-ubuntu/azuredeploy.json b/openldap-singlevm-ubuntu/azuredeploy.json index 9b559603039f..b33e6893ca4f 100644 --- a/openldap-singlevm-ubuntu/azuredeploy.json +++ b/openldap-singlevm-ubuntu/azuredeploy.json @@ -60,6 +60,13 @@ "metadata": { "description": "The size of the VM." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -83,15 +90,14 @@ "installScriptName": "install_openldap.sh", "fileUriBase": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/openldap-singlevm-ubuntu/", "installScriptUri": "[concat(variables('fileUriBase'), variables('installScriptName'))]", - "installCommand": "[concat('sh ', variables('installScriptName'), ' ', parameters('directoryAdminPassword'), ' ', parameters('namePrefix'), ' ', resourceGroup().location, ' ', parameters('organization'))]", - "apiVersion": "2015-06-15" + "installCommand": "[concat('sh ', variables('installScriptName'), ' ', parameters('directoryAdminPassword'), ' ', parameters('namePrefix'), ' ', parameters('location'), ' ', parameters('organization'))]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -100,7 +106,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -112,7 +118,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -133,7 +139,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -159,7 +165,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -202,7 +208,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -224,4 +230,4 @@ } } ] -} \ No newline at end of file +} diff --git a/opensis-cluster-ubuntu/azuredeploy.json b/opensis-cluster-ubuntu/azuredeploy.json index f3276f1f7134..a7533f890940 100644 --- a/opensis-cluster-ubuntu/azuredeploy.json +++ b/opensis-cluster-ubuntu/azuredeploy.json @@ -97,6 +97,13 @@ "metadata": { "description": "The size of the database backend VM." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -115,7 +122,6 @@ "publicIPAddressName": "[concat(parameters('namePrefix'),'IP')]", "publicDBIPAddressName": "[concat(parameters('namePrefix'),'DBIP')]", "publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]", - "publicDBIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicDBIPAddressName'))]", "publicIPAddressType": "Dynamic", "vmStorageAccountContainerName": "vhds", "vmName": "[concat(parameters('namePrefix'),'VM')]", @@ -134,15 +140,14 @@ "installFrontendCommand": "[concat('sh ', variables('installFrontendScriptName'), ' ', parameters('mySqlPassword'))]", "installBackendScriptName": "install_backend.sh", "installBackendScriptUri": "[concat('https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/opensis-cluster-ubuntu/', variables('installBackendScriptName'))]", - "installBackendCommand": "[concat('sh ', variables('installBackendScriptName'), ' ', parameters('mySqlPassword'))]", - "apiVersion": "2015-06-15" + "installBackendCommand": "[concat('sh ', variables('installBackendScriptName'), ' ', parameters('mySqlPassword'))]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -151,14 +156,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -170,7 +175,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -197,7 +202,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]", "[concat('Microsoft.Network/loadBalancers/',variables('lbName'))]" @@ -237,7 +242,7 @@ "apiVersion": "2015-06-15", "name": "[variables('lbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'))]" ], @@ -418,7 +423,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/',concat(variables('nicName'),copyIndex()))]", @@ -469,7 +474,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(concat(variables('vmName'),copyIndex()),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'),copyIndex()))]" ], @@ -496,14 +501,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[concat(variables('availabilitySetName'),'db')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicDBIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -515,7 +520,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'),'db')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('publicDBIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]" @@ -541,7 +546,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'),'db')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/',variables('nicName'),'db')]", @@ -588,7 +593,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(concat(variables('vmName'),'db'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'),'db'))]" ], @@ -608,4 +613,4 @@ } } ] -} \ No newline at end of file +} diff --git a/opensis-singlevm-ubuntu/azuredeploy.json b/opensis-singlevm-ubuntu/azuredeploy.json index 4e5641a1e908..546c67441e07 100644 --- a/opensis-singlevm-ubuntu/azuredeploy.json +++ b/opensis-singlevm-ubuntu/azuredeploy.json @@ -54,6 +54,13 @@ "metadata": { "description": "The size of the VM." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -76,15 +83,14 @@ "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", "installScriptName": "install_lamp_opensis.sh", "installScriptUri": "[concat('https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/opensis-singlevm-ubuntu/', variables('installScriptName'))]", - "installCommand": "[concat('sh ', variables('installScriptName'), ' ', parameters('mySqlPassword'))]", - "apiVersion": "2015-06-15" + "installCommand": "[concat('sh ', variables('installScriptName'), ' ', parameters('mySqlPassword'))]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -93,7 +99,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -105,7 +111,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -126,7 +132,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -152,7 +158,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -195,7 +201,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -215,4 +221,4 @@ } } ] -} \ No newline at end of file +} diff --git a/openvpn-access-server-ubuntu/azuredeploy.json b/openvpn-access-server-ubuntu/azuredeploy.json index a8ec8c11d9b2..d2c751eac2f3 100644 --- a/openvpn-access-server-ubuntu/azuredeploy.json +++ b/openvpn-access-server-ubuntu/azuredeploy.json @@ -14,7 +14,7 @@ "description": "Password for the Virtual Machine." } }, - "openvpnPassword": { + "openvpnPassword": { "type": "securestring", "metadata": { "description": "Password for the openvpn user." @@ -43,6 +43,13 @@ "metadata": { "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values: 12.04.5-LTS, 14.04.2-LTS, 15.10." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -65,7 +72,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -74,72 +81,72 @@ } }, { - "name": "[variables('networkSecurityGroupName')]", - "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "OpenVPN_WebServer", - "properties": { - "priority": 1200, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "943", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "OpenVPN443", - "properties": { - "priority": 1100, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "443", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "OpenVPN1194", - "properties": { - "priority": 1300, - "sourceAddressPrefix": "*", - "protocol": "UDP", - "destinationPortRange": "1194", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "default-allow-ssh", - "properties": { - "priority": 1000, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "22", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - } - ] - } + "name": "[variables('networkSecurityGroupName')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "OpenVPN_WebServer", + "properties": { + "priority": 1200, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "943", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "OpenVPN443", + "properties": { + "priority": 1100, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "443", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "OpenVPN1194", + "properties": { + "priority": 1300, + "sourceAddressPrefix": "*", + "protocol": "UDP", + "destinationPortRange": "1194", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "default-allow-ssh", + "properties": { + "priority": 1000, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "22", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + } + ] + } }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -160,7 +167,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", @@ -182,7 +189,7 @@ } ], "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" } } }, @@ -190,7 +197,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -210,10 +217,10 @@ "sku": "[parameters('ubuntuOSVersion')]", "version": "latest" }, - "osDisk": { + "osDisk": { "createOption": "FromImage", "managedDisk": { - "storageAccountType": "[variables('storageAccountType')]" + "storageAccountType": "[variables('storageAccountType')]" } } }, @@ -230,7 +237,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -251,4 +258,3 @@ } ] } - diff --git a/orchard-cms-video-portal/azuredeploy.json b/orchard-cms-video-portal/azuredeploy.json index 471ca1606fda..e2dd21f6ec87 100644 --- a/orchard-cms-video-portal/azuredeploy.json +++ b/orchard-cms-video-portal/azuredeploy.json @@ -1,225 +1,231 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "appName": { - "type": "string", - "metadata": { - "description": "Name for the Azure Web App (.azurewebsites.net)" - } - }, - "dbAdministratorLogin": { - "type": "string", - "metadata": { - "description": "Make sure your login name meets the following requirements - It's a SQL Identifier, and not a typical system name (like admin, administrator, sa, root, dbmanager, loginmanager, etc.), or a built-in database user or role (like dbo, guest, public, etc.). Make sure your name doesn't contain whitespaces, unicode characters, or nonalphabetic characters, and that it doesn't begin with numbers or symbols." - } - }, - "dbAdministratorLoginPassword": { - "type": "securestring", - "metadata": { - "description": "Database admin user password" - } - }, - "nonAdminDatabaseUserName": { - "type": "string", - "metadata": { - "description": "Non-admin database user. Make sure your login name meets the following requirements - It's a SQL Identifier, and not a typical system name (like admin, administrator, sa, root, dbmanager, loginmanager, etc.), or a built-in database user or role (like dbo, guest, public, etc.). Make sure your name doesn't contain whitespaces, unicode characters, or nonalphabetic characters, and that it doesn't begin with numbers or symbols." - } - }, - "nonAdminDatabasePassword": { - "type": "securestring", - "metadata": { - "description": "Non-admin Database User password" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "appName": { + "type": "string", + "metadata": { + "description": "Name for the Azure Web App (.azurewebsites.net)" + } + }, + "dbAdministratorLogin": { + "type": "string", + "metadata": { + "description": "Make sure your login name meets the following requirements - It's a SQL Identifier, and not a typical system name (like admin, administrator, sa, root, dbmanager, loginmanager, etc.), or a built-in database user or role (like dbo, guest, public, etc.). Make sure your name doesn't contain whitespaces, unicode characters, or nonalphabetic characters, and that it doesn't begin with numbers or symbols." + } }, - "variables": { - "appServicePlanName":"[concat('serviceplan', uniqueString(resourceGroup().id))]", - "appServiceTier": "Basic", - "appServiceWorkerSize": "0", - "dbServerName": "[concat('sqlserver', uniqueString(resourceGroup().id))]", - "dbName": "[concat('sqldatabase', uniqueString(resourceGroup().id))]", - "dbEdition": "Standard", - "mediaServicesAccountName": "[concat('media', uniqueString(resourceGroup().id))]", - "storageAccountName": "[concat('storage', uniqueString(resourceGroup().id))]", - "storageAccountType": "Standard_LRS" + "dbAdministratorLoginPassword": { + "type": "securestring", + "metadata": { + "description": "Database admin user password" + } }, - "resources": [ + "nonAdminDatabaseUserName": { + "type": "string", + "metadata": { + "description": "Non-admin database user. Make sure your login name meets the following requirements - It's a SQL Identifier, and not a typical system name (like admin, administrator, sa, root, dbmanager, loginmanager, etc.), or a built-in database user or role (like dbo, guest, public, etc.). Make sure your name doesn't contain whitespaces, unicode characters, or nonalphabetic characters, and that it doesn't begin with numbers or symbols." + } + }, + "nonAdminDatabasePassword": { + "type": "securestring", + "metadata": { + "description": "Non-admin Database User password" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "appServicePlanName": "[concat('serviceplan', uniqueString(resourceGroup().id))]", + "appServiceTier": "Basic", + "appServiceWorkerSize": "0", + "dbServerName": "[concat('sqlserver', uniqueString(resourceGroup().id))]", + "dbName": "[concat('sqldatabase', uniqueString(resourceGroup().id))]", + "dbEdition": "Standard", + "mediaServicesAccountName": "[concat('media', uniqueString(resourceGroup().id))]", + "storageAccountName": "[concat('storage', uniqueString(resourceGroup().id))]", + "storageAccountType": "Standard_LRS" + }, + "resources": [ + { + "name": "[variables('dbServerName')]", + "type": "Microsoft.Sql/servers", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01-preview", + "properties": { + "administratorLogin": "[parameters('dbAdministratorLogin')]", + "administratorLoginPassword": "[parameters('dbAdministratorLoginPassword')]", + "version": "12.0" + }, + "resources": [ { - "name": "[variables('dbServerName')]", - "type": "Microsoft.Sql/servers", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01-preview", - "properties": { - "administratorLogin": "[parameters('dbAdministratorLogin')]", - "administratorLoginPassword": "[parameters('dbAdministratorLoginPassword')]", - "version": "12.0" - }, - "resources": [ - { - "apiVersion": "2014-04-01-preview", - "name": "[variables('dbName')]", - "type": "databases", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Sql/servers/', variables('dbServerName'))]" - ], - "properties": { - "edition": "[variables('dbEdition')]", - "collation": "[string('SQL_Latin1_General_CP1_CI_AS')]", - "requestedServiceObjectiveId": "F1173C43-91BD-4AAA-973C-54E79E15235B" - } - }, - { - "apiVersion": "2014-04-01-preview", - "name": "AllowAllWindowsAzureIps", - "type": "firewallrules", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Sql/servers/', variables('dbServerName'))]" - ], - "properties": { - "endIpAddress": "0.0.0.0", - "startIpAddress": "0.0.0.0" - } - } - ] + "apiVersion": "2014-04-01-preview", + "name": "[variables('dbName')]", + "type": "databases", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Sql/servers/', variables('dbServerName'))]" + ], + "properties": { + "edition": "[variables('dbEdition')]", + "collation": "[string('SQL_Latin1_General_CP1_CI_AS')]", + "requestedServiceObjectiveId": "F1173C43-91BD-4AAA-973C-54E79E15235B" + } }, { - "apiVersion": "2014-06-01", - "name": "[variables('appServicePlanName')]", - "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", - "properties": { - "name": "[variables('appServicePlanName')]", - "appServiceTier": "[variables('appServiceTier')]", - "workerSize": "[variables('appServiceWorkerSize')]", - "hostingEnvironment": "", - "numberOfWorkers": 1 + "apiVersion": "2014-04-01-preview", + "name": "AllowAllWindowsAzureIps", + "type": "firewallrules", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Sql/servers/', variables('dbServerName'))]" + ], + "properties": { + "endIpAddress": "0.0.0.0", + "startIpAddress": "0.0.0.0" + } + } + ] + }, + { + "apiVersion": "2014-06-01", + "name": "[variables('appServicePlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('location')]", + "properties": { + "name": "[variables('appServicePlanName')]", + "appServiceTier": "[variables('appServiceTier')]", + "workerSize": "[variables('appServiceWorkerSize')]", + "hostingEnvironment": "", + "numberOfWorkers": 1 + } + }, + { + "type": "Microsoft.Media/mediaServices", + "name": "[variables('mediaServicesAccountName')]", + "apiVersion": "2015-10-01", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" + ], + "properties": { + "storageAccounts": [ + { + "id": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "isPrimary": true + } + ] + }, + "resources": [] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2015-02-01", + "name": "[parameters('appName')]", + "type": "Microsoft.Web/Sites", + "location": "[parameters('location')]", + "tags": { + "[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName')))]": "empty" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverFarms/', variables('appServicePlanName'))]" + ], + "properties": { + "name": "[parameters('appName')]", + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]", + "hostingEnvironment": "" + }, + "resources": [ + { + "apiVersion": "2015-04-01", + "name": "MSDeploy", + "type": "Extensions", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', parameters('appName'))]", + "[concat('Microsoft.Sql/servers/', variables('dbServerName'), '/databases/', variables('dbName'))]", + "[concat('Microsoft.Media/mediaservices/', variables('mediaServicesAccountName'))]" + ], + "properties": { + "packageUri": "https://auxmktplceprod.blob.core.windows.net/packages/Orchard.Web.1.10.x-AMS.zip", + "dbType": "SQL", + "connectionString": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', variables('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', variables('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', variables('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", + "setParameters": { + "Application Path": "[parameters('appName')]", + "Database Server": "[reference(concat('Microsoft.Sql/servers/', variables('dbServerName'))).fullyQualifiedDomainName]", + "Database Name": "[variables('dbName')]", + "Database Username": "[parameters('nonAdminDatabaseUserName')]", + "Database Password": "[parameters('nonAdminDatabasePassword')]", + "Database Administrator": "[parameters('dbAdministratorLogin')]", + "Database Administrator Password": "[parameters('dbAdministratorLoginPassword')]" } + } }, { - "type": "Microsoft.Media/mediaServices", - "name": "[variables('mediaServicesAccountName')]", - "apiVersion": "2015-10-01", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" - ], - "properties": { - "storageAccounts": [ - { - "id": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", - "isPrimary": true - } - ] - }, - "resources": [] + "apiVersion": "2015-04-01", + "name": "connectionstrings", + "type": "config", + "dependsOn": [ + "[resourceId('Microsoft.Web/Sites', parameters('appName'))]", + "[concat('Microsoft.Sql/servers/', variables('dbServerName'), '/databases/', variables('dbName'))]", + "[concat('Microsoft.Web/Sites/', parameters('appName'), '/Extensions/MSDeploy')]" + ], + "properties": { + "defaultConnection": { + "value": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', variables('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', variables('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', variables('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", + "type": "SQLAzure" + } + } }, { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "[variables('storageAccountType')]" - }, - "kind": "Storage", - "properties": { - } + "apiVersion": "2015-04-01", + "name": "appsettings", + "type": "config", + "dependsOn": [ + "[resourceId('Microsoft.Web/Sites', parameters('appName'))]", + "[concat('Microsoft.Media/mediaservices/', variables('mediaServicesAccountName'))]", + "[concat('Microsoft.Web/Sites/', parameters('appName'), '/Extensions/MSDeploy')]" + ], + "properties": { + "defaultRecipe": "Video Portal", + "Azure.MediaServices.AccountName": "[variables('mediaServicesAccountName')]", + "Azure.MediaServices.AccountKey": "[listKeys(resourceId('Microsoft.Media/mediaservices', variables('mediaServicesAccountName')), providers('Microsoft.Media', 'mediaservices')'2015-10-01'0]).primaryKey]", + "Azure.MediaServices.StorageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value]" + } }, { - "apiVersion": "2015-02-01", - "name": "[parameters('appName')]", - "type": "Microsoft.Web/Sites", - "location": "[resourceGroup().location]", - "tags": { - "[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName')))]": "empty" - }, - "dependsOn": [ - "[concat('Microsoft.Web/serverFarms/', variables('appServicePlanName'))]" - ], - "properties": { - "name": "[parameters('appName')]", - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]", - "hostingEnvironment": "" - }, - "resources": [ - { - "apiVersion": "2015-04-01", - "name": "MSDeploy", - "type": "Extensions", - "dependsOn": [ - "[concat('Microsoft.Web/Sites/', parameters('appName'))]", - "[concat('Microsoft.Sql/servers/', variables('dbServerName'), '/databases/', variables('dbName'))]", - "[concat('Microsoft.Media/mediaservices/', variables('mediaServicesAccountName'))]" - ], - "properties": { - "packageUri": "https://auxmktplceprod.blob.core.windows.net/packages/Orchard.Web.1.10.x-AMS.zip", - "dbType": "SQL", - "connectionString": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', variables('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', variables('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', variables('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", - "setParameters": { - "Application Path": "[parameters('appName')]", - "Database Server": "[reference(concat('Microsoft.Sql/servers/', variables('dbServerName'))).fullyQualifiedDomainName]", - "Database Name": "[variables('dbName')]", - "Database Username": "[parameters('nonAdminDatabaseUserName')]", - "Database Password": "[parameters('nonAdminDatabasePassword')]", - "Database Administrator": "[parameters('dbAdministratorLogin')]", - "Database Administrator Password": "[parameters('dbAdministratorLoginPassword')]" - } - } - }, - { - "apiVersion": "2015-04-01", - "name": "connectionstrings", - "type": "config", - "dependsOn": [ - "[resourceId('Microsoft.Web/Sites', parameters('appName'))]", - "[concat('Microsoft.Sql/servers/', variables('dbServerName'), '/databases/', variables('dbName'))]", - "[concat('Microsoft.Web/Sites/', parameters('appName'), '/Extensions/MSDeploy')]" - ], - "properties": { - "defaultConnection": { - "value": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', variables('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', variables('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', variables('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", - "type": "SQLAzure" - } - } - }, - { - "apiVersion": "2015-04-01", - "name": "appsettings", - "type": "config", - "dependsOn": [ - "[resourceId('Microsoft.Web/Sites', parameters('appName'))]", - "[concat('Microsoft.Media/mediaservices/', variables('mediaServicesAccountName'))]", - "[concat('Microsoft.Web/Sites/', parameters('appName'), '/Extensions/MSDeploy')]" - ], - "properties": { - "defaultRecipe": "Video Portal", - "Azure.MediaServices.AccountName": "[variables('mediaServicesAccountName')]", - "Azure.MediaServices.AccountKey": "[listKeys(resourceId('Microsoft.Media/mediaservices', variables('mediaServicesAccountName')), providers('Microsoft.Media', 'mediaservices')'2015-10-01'0]).primaryKey]", - "Azure.MediaServices.StorageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value]" - } - }, - { - "apiVersion": "2015-04-01", - "name": "web", - "type": "config", - "dependsOn": [ - "[concat('Microsoft.Web/Sites/', parameters('appName'))]", - "[concat('Microsoft.Web/Sites/', parameters('appName'), '/Extensions/MSDeploy')]" - ], - "properties": { - "phpVersion": "off", - "netFrameworkVersion": "v4.5", - "use32BitWorkerProcess": "true", - "webSocketsEnabled": false, - "alwaysOn": "true", - "httpLoggingEnabled": true, - "logsDirectorySizeLimit": 40 - } - } - ] + "apiVersion": "2015-04-01", + "name": "web", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', parameters('appName'))]", + "[concat('Microsoft.Web/Sites/', parameters('appName'), '/Extensions/MSDeploy')]" + ], + "properties": { + "phpVersion": "off", + "netFrameworkVersion": "v4.5", + "use32BitWorkerProcess": "true", + "webSocketsEnabled": false, + "alwaysOn": "true", + "httpLoggingEnabled": true, + "logsDirectorySizeLimit": 40 + } } - ] - } \ No newline at end of file + ] + } + ] +} diff --git a/pf-freebsd-setup/azuredeploy.json b/pf-freebsd-setup/azuredeploy.json index 6c0acba26974..daf94349820a 100644 --- a/pf-freebsd-setup/azuredeploy.json +++ b/pf-freebsd-setup/azuredeploy.json @@ -37,7 +37,7 @@ "description": "Frontend VM size, please choose proper size which allow 2 NICs." } }, - "frontendVmStorageAccountType":{ + "frontendVmStorageAccountType": { "type": "string", "defaultValue": "Standard_LRS", "metadata": { @@ -51,7 +51,7 @@ "description": "Backend VM size." } }, - "backendVmStorageAccountType":{ + "backendVmStorageAccountType": { "type": "string", "defaultValue": "Standard_LRS", "metadata": { @@ -110,6 +110,13 @@ "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." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -137,7 +144,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('frontendVmStorageAccountType')]" } @@ -146,7 +153,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('backendStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('backendVmStorageAccountType')]" } @@ -155,28 +162,28 @@ "type": "Microsoft.Network/routeTables", "name": "[variables('routeTableName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { - "routes": [ - { - "name": "RouteToInternet", - "properties": { - "addressPrefix": "0.0.0.0/0", - "nextHopType": "VirtualAppliance", - "nextHopIpAddress": "[parameters('frontendPrivateNicIP1')]" - } - } - ] + "routes": [ + { + "name": "RouteToInternet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('frontendPrivateNicIP1')]" + } + } + ] } }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vnetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/routeTables', variables('routeTableName'))]" - ], + ], "properties": { "addressSpace": { "addressPrefixes": [ @@ -195,7 +202,7 @@ "properties": { "addressPrefix": "[parameters('privateSubnetAddressPrefix')]", "routeTable": { - "id": "[resourceId('Microsoft.Network/routeTables', variables('routeTableName'))]" + "id": "[resourceId('Microsoft.Network/routeTables', variables('routeTableName'))]" } } } @@ -206,7 +213,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('networkPrefix'),'-publicip')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "idleTimeoutInMinutes": 4, @@ -219,7 +226,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('frontendPublicNic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('vnetName'))]" ], @@ -246,7 +253,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('frontendPrivateNic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('vnetName'))]", "[resourceId('Microsoft.Network/networkSecurityGroups', variables('sgName'))]" @@ -266,15 +273,15 @@ ], "enableIPForwarding": true, "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('sgName'))]" - } + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('sgName'))]" + } } }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('backendVM1PrivateNic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('vnetName'))]" ], @@ -298,7 +305,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('backendVM2PrivateNic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('vnetName'))]" ], @@ -319,46 +326,46 @@ } }, { - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('sgName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('sgName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { "securityRules": [ - { - "name": "SSHRule", - "properties": { - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 1000, - "direction": "Inbound" - } - }, - { - "name": "PrivateToPublicRule", - "properties": { - "protocol": "*", - "sourcePortRange": "*", - "destinationPortRange": "0-65535", - "sourceAddressPrefix": "VirtualNetwork", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 1001, - "direction": "Inbound" - } + { + "name": "SSHRule", + "properties": { + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 1000, + "direction": "Inbound" } + }, + { + "name": "PrivateToPublicRule", + "properties": { + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "0-65535", + "sourceAddressPrefix": "VirtualNetwork", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 1001, + "direction": "Inbound" + } + } ] - } + } }, { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('frontendPublicNic'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('frontendPrivateNic'))]" @@ -413,7 +420,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('backendVM1Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('backendVM1PrivateNic'))]" ], @@ -461,7 +468,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('backendVM2Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('backendVM2PrivateNic'))]" ], @@ -509,7 +516,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/configurepf')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]", "[concat('Microsoft.Compute/virtualMachines/', variables('backendVM1Name'))]", @@ -534,7 +541,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('backendVM1Name'),'/installnginx')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines/extensions', variables('vmName'), 'configurepf')]" ], @@ -557,7 +564,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('backendVM2Name'),'/installnginx')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines/extensions', variables('vmName'), 'configurepf')]" ], diff --git a/phabricator-on-ubuntu/azuredeploy.json b/phabricator-on-ubuntu/azuredeploy.json index 20f8eec0e29c..bc604c6b5539 100644 --- a/phabricator-on-ubuntu/azuredeploy.json +++ b/phabricator-on-ubuntu/azuredeploy.json @@ -4,35 +4,42 @@ "parameters": { "dnsLabelPrefix": { "type": "string", - "metadata":{ + "metadata": { "description": "DNS Label for the Public IP. 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." } }, "adminUsername": { "type": "string", - "metadata":{ + "metadata": { "description": "Admin UserName for the Linux VM" } }, "adminPassword": { "type": "securestring", - "metadata":{ + "metadata": { "description": "Admin Password for the Linux VM" } }, "vmSize": { "type": "string", "defaultValue": "Standard_A2", - "metadata":{ + "metadata": { "description": "Size for the VM" } }, "vmName": { "type": "string", "defaultValue": "myLinuxVM", - "metadata":{ + "metadata": { "description": "VM name for the resource inside Azure" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -43,13 +50,13 @@ "vmStorageAccountContainerName": "vhds", "publicIPAddressType": "Dynamic", "storageAccountType": "Standard_LRS", - "publicIPAddressName":"phabricatorvip", - "location":"[resourceGroup().location]", - "imagePublisher":"Canonical", - "imageOffer":"UbuntuServer", - "imageSKU":"16.04.0-LTS", - "virtualNetworkName":"phabricatorvnet", - "nicName":"phabricatornic", + "publicIPAddressName": "phabricatorvip", + "location": "[parameters('location')]", + "imagePublisher": "Canonical", + "imageOffer": "UbuntuServer", + "imageSKU": "16.04.0-LTS", + "virtualNetworkName": "phabricatorvnet", + "nicName": "phabricatornic", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnet1Ref": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]" }, diff --git a/php_pgsql-freebsd-setup/azuredeploy.json b/php_pgsql-freebsd-setup/azuredeploy.json index 2b6d0d5f4708..a7fe318cd9e0 100644 --- a/php_pgsql-freebsd-setup/azuredeploy.json +++ b/php_pgsql-freebsd-setup/azuredeploy.json @@ -33,7 +33,7 @@ "metadata": { "description": "Size for the reversed proxy nginx and PHP Virtual Machine." } - }, + }, "postgresqlvmSize": { "type": "string", "defaultValue": "Standard_A4", @@ -100,6 +100,13 @@ "metadata": { "description": "Caching type of data disk" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -522,7 +529,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -534,7 +541,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -567,7 +574,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nic1Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -593,7 +600,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nic2Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" ], @@ -614,7 +621,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nic3Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" ], @@ -635,7 +642,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nic4Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" ], @@ -656,7 +663,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nic5Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" ], @@ -677,7 +684,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nic6Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" ], @@ -698,7 +705,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nic7Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" ], @@ -719,7 +726,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vm1Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nic1Name'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nic2Name'))]" @@ -766,7 +773,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vm2Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nic3Name'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nic4Name'))]" @@ -813,7 +820,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vm3Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nic5Name'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nic6Name'))]" @@ -860,7 +867,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vm4Name')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nic7Name'))]" ], @@ -898,7 +905,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vm1Name'),'/installreversenginx')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vm1Name'))]" ], @@ -923,7 +930,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vm2Name'),'/installnginxphp')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vm2Name'))]" ], @@ -947,7 +954,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vm3Name'),'/installnginxphp')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vm3Name'))]" ], @@ -971,7 +978,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vm4Name'),'/installpostgresql')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vm4Name'))]" ], diff --git a/postgresql-on-ubuntu/azuredeploy.json b/postgresql-on-ubuntu/azuredeploy.json index 44234b5b38c1..fd828dc6fa8a 100644 --- a/postgresql-on-ubuntu/azuredeploy.json +++ b/postgresql-on-ubuntu/azuredeploy.json @@ -63,6 +63,13 @@ "metadata": { "description": "Virtual network name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -347,4 +354,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/postgresql-on-ubuntu/database-16disk-resources.json b/postgresql-on-ubuntu/database-16disk-resources.json index 65f49f01d19b..15f326887a2c 100644 --- a/postgresql-on-ubuntu/database-16disk-resources.json +++ b/postgresql-on-ubuntu/database-16disk-resources.json @@ -28,12 +28,18 @@ }, "dbType": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "namespace": "[parameters('commonSettings').namespace]", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(parameters('storageSettings').name, variables('namespace'))]", "vmName": "[concat(variables('namespace'), 'vm')]", "nicName": "[concat(variables('namespace'), 'nic')]", "adminUsername": "[parameters('commonSettings').adminUsername]", @@ -44,7 +50,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicCopyLoop", "count": "[variables('vmCount')]" @@ -67,7 +73,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyindex())]" ], @@ -273,7 +279,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyindex(), '/install_postgresql')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), copyindex())]" ], diff --git a/postgresql-on-ubuntu/database-2disk-resources.json b/postgresql-on-ubuntu/database-2disk-resources.json index aacb17564862..bd868bdf7a0d 100644 --- a/postgresql-on-ubuntu/database-2disk-resources.json +++ b/postgresql-on-ubuntu/database-2disk-resources.json @@ -28,12 +28,18 @@ }, "dbType": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "namespace": "[parameters('commonSettings').namespace]", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(parameters('storageSettings').name, variables('namespace'))]", "vmName": "[concat(variables('namespace'), 'vm')]", "nicName": "[concat(variables('namespace'), 'nic')]", "adminUsername": "[parameters('commonSettings').adminUsername]", @@ -44,7 +50,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicCopyLoop", "count": "[variables('vmCount')]" @@ -67,7 +73,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyindex())]" ], @@ -133,7 +139,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyindex(), '/install_postgresql')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), copyindex())]" ], diff --git a/postgresql-on-ubuntu/database-8disk-resources.json b/postgresql-on-ubuntu/database-8disk-resources.json index 880a34a5a081..5054106e8a97 100644 --- a/postgresql-on-ubuntu/database-8disk-resources.json +++ b/postgresql-on-ubuntu/database-8disk-resources.json @@ -28,12 +28,18 @@ }, "dbType": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "namespace": "[parameters('commonSettings').namespace]", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(parameters('storageSettings').name, variables('namespace'))]", "vmName": "[concat(variables('namespace'), 'vm')]", "nicName": "[concat(variables('namespace'), 'nic')]", "adminUsername": "[parameters('commonSettings').adminUsername]", @@ -44,7 +50,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicCopyLoop", "count": "[variables('vmCount')]" @@ -67,7 +73,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyindex())]" ], @@ -193,7 +199,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyindex(), '/install_postgresql')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), copyindex())]" ], diff --git a/postgresql-on-ubuntu/jumpbox-resources.json b/postgresql-on-ubuntu/jumpbox-resources.json index c43cc4a8bcce..808f0cfef544 100644 --- a/postgresql-on-ubuntu/jumpbox-resources.json +++ b/postgresql-on-ubuntu/jumpbox-resources.json @@ -19,10 +19,16 @@ }, "dnsName": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "vmStorageAccountContainerName": "vhd", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", "storageAccountName": "[parameters('storageSettings').name]", "nicName": "[concat(parameters('commonSettings').namespace, 'nic')]", @@ -35,7 +41,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -47,7 +53,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIpName'))]" ], @@ -72,7 +78,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -107,4 +113,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/postgresql-on-ubuntu/shared-resources.json b/postgresql-on-ubuntu/shared-resources.json index 200ddc36bbf7..aa21708f8a9c 100644 --- a/postgresql-on-ubuntu/shared-resources.json +++ b/postgresql-on-ubuntu/shared-resources.json @@ -10,6 +10,13 @@ }, "networkSettings": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -18,7 +25,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[concat(parameters('storageSettings').name, copyindex())]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "dbStoragePoolLoop", "count": "[parameters('storageSettings').count]" @@ -31,7 +38,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').vnetName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -58,7 +65,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('availabilitySetSettings').name]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": "[parameters('availabilitySetSettings').fdCount]", "platformUpdateDomainCount": "[parameters('availabilitySetSettings').udCount]" @@ -66,4 +73,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/postgresql-standalone-server-ubuntu/azuredeploy.json b/postgresql-standalone-server-ubuntu/azuredeploy.json index 904995de24fd..80631c6ae737 100644 --- a/postgresql-standalone-server-ubuntu/azuredeploy.json +++ b/postgresql-standalone-server-ubuntu/azuredeploy.json @@ -46,6 +46,13 @@ "metadata": { "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values: 12.04.5-LTS, 14.04.2-LTS, 15.10." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -57,7 +64,6 @@ "subnetName": "Subnet", "subnetPrefix": "10.0.0.0/24", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15", "storageAccountType": "Standard_LRS", "publicIPAddressName": "myPublicIP", "publicIPAddressType": "Dynamic", @@ -72,7 +78,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -81,7 +87,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -93,7 +99,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -114,7 +120,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -140,7 +146,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -183,7 +189,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -201,4 +207,4 @@ } } ] -} \ No newline at end of file +} diff --git a/pubnub-eventhub-bridge/azuredeploy.json b/pubnub-eventhub-bridge/azuredeploy.json index 06f0beb756b2..fff6726ca0fa 100755 --- a/pubnub-eventhub-bridge/azuredeploy.json +++ b/pubnub-eventhub-bridge/azuredeploy.json @@ -90,10 +90,17 @@ "metadata": { "description": "The name you wish to give the Egress (Output) Event Hub SAS Policy. You can accept the default, as the Event Hub SAS Policy name needs only to be unique within a unique Event Hub Namespace." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sbVersion": "2015-08-01", "ehInAuthorizationRuleResourceId": "[resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', parameters('Event Hub Namespace'), parameters('Azure Ingress Event Hub Name'), parameters('Azure Ingress SAS Policy Name'))]", "ehOutAuthorizationRuleResourceId": "[resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', parameters('Event Hub Namespace'), parameters('Azure Egress Event Hub Name'), parameters('Azure Egress SAS Policy Name'))]" @@ -300,4 +307,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/puppet-agent-linux/azuredeploy.json b/puppet-agent-linux/azuredeploy.json index 7c90b7a754af..725ed36d09d9 100644 --- a/puppet-agent-linux/azuredeploy.json +++ b/puppet-agent-linux/azuredeploy.json @@ -63,12 +63,17 @@ "description": "Internal FQDN of your PE box, e.g: pupmstr.pupmstr.d6.internal.cloudapp.net. Get it from node requests page in PE Console." }, "defaultValue": "pupmstr.pupmstr.d6.internal.cloudapp.net" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "extensionName": "CustomScript", "scenarioPrefix": "puppetAgentLinux", - "apiVersion": "2015-06-15", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "ubuntuOSVersion": "14.04.2-LTS", @@ -93,7 +98,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -102,7 +107,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -114,7 +119,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -135,7 +140,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -161,7 +166,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -204,7 +209,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/installcustomscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -220,4 +225,4 @@ } } ] -} \ No newline at end of file +} diff --git a/puppet-agent-windows/azuredeploy.json b/puppet-agent-windows/azuredeploy.json index 1c08620a4454..b7cfdc9f0f4e 100644 --- a/puppet-agent-windows/azuredeploy.json +++ b/puppet-agent-windows/azuredeploy.json @@ -39,10 +39,16 @@ "metadata": { "description": "Puppet Master URL" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-06-15", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnet1Ref": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]", "vmExtensionName": "PuppetEnterpriseAgent", @@ -50,13 +56,11 @@ "storageAccountType": "Standard_LRS", "publicIPAddressName": "myPublicIP", "publicIPAddressType": "Dynamic", - "vmStorageAccountContainerName": "vhds", "virtualNetworkName": "MyVNET", "addressPrefix": "10.0.0.0/16", "subnet1Name": "subnet-1", "subnet1Prefix": "10.0.0.0/24", "nicName": "myVMNic", - "dnsName": "[variables('subnet1Name')]", "imagePublisher": "MicrosoftWindowsServer", "imageOffer": "WindowsServer", "imageSKU": "2012-R2-Datacenter", @@ -67,7 +71,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -76,7 +80,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -88,7 +92,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -109,7 +113,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -135,7 +139,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -178,7 +182,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('vmExtensionName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -197,4 +201,4 @@ } } ] -} \ No newline at end of file +} diff --git a/puppet-enterprise-cluster/azuredeploy.json b/puppet-enterprise-cluster/azuredeploy.json index f169042f5698..11026173a20a 100644 --- a/puppet-enterprise-cluster/azuredeploy.json +++ b/puppet-enterprise-cluster/azuredeploy.json @@ -26,8 +26,8 @@ "description": "Number of Windows Puppet Agents to deploy. Assumes Windows Server 2012 R2." }, "defaultValue": 1, - "minValue":1, - "maxValue":100 + "minValue": 1, + "maxValue": 100 }, "linuxAgentCount": { "type": "int", @@ -35,8 +35,8 @@ "description": "Number of Linux Puppet Agents to deploy. Assumes Ubuntu 14.04-LTS." }, "defaultValue": 1, - "minValue":1, - "maxValue":100 + "minValue": 1, + "maxValue": 100 }, "vmSize": { "type": "string", @@ -46,19 +46,26 @@ "defaultValue": "Standard_D1_v2" }, "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/puppet-enterprise-cluster/" + "type": "string", + "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": "" + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/puppet-enterprise-cluster/" + }, + "_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": { "puppetAgentCount": "[add(parameters('windowsAgentCount'),parameters('linuxAgentCount'))]", @@ -77,30 +84,27 @@ "publicIPAddressType": "Dynamic", "vmStorageAccountContainerName": "vhds", "puppetMasterVmName": "puppetmaster", - "vmName": "peagent", "virtualNetworkName": "vnet1", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "publicIpId": "[resourceId(resourceGroup().Name,concat('Microsoft.Network','/','publicIPAddresses'),variables('publicIPAddressName'))]" + "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]" }, "resources": [ { "apiVersion": "2016-01-01", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { - "name": "[variables('storageAccountType')]" + "name": "[variables('storageAccountType')]" }, "kind": "Storage", - "properties": { - } + "properties": {} }, { "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -112,7 +116,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat('peagentip', copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "puppetAgentPipLoop", "count": "[variables('puppetAgentCount')]" @@ -128,7 +132,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', 'puppetNetworkSecurityGroup')]" ], @@ -155,7 +159,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkSecurityGroups", "name": "puppetNetworkSecurityGroup", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -186,7 +190,7 @@ } }, { - "name": "ssh", + "name": "ssh", "properties": { "description": "Allow RDP", "protocol": "tcp", @@ -247,7 +251,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -273,7 +277,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[concat('peAgentNic',copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "puppetAgentNicLoop", "count": "[variables('puppetAgentCount')]" @@ -303,7 +307,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('puppetMasterVmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -355,31 +359,31 @@ } }, { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('puppetMasterVmName'),'/CustomScriptExtension')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('puppetMasterVmName'))]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'),'wait.sh')]" - ], - "commandToExecute": "./wait.sh" - } - } + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('puppetMasterVmName'),'/CustomScriptExtension')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('puppetMasterVmName'))]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'),'wait.sh')]" + ], + "commandToExecute": "./wait.sh" + } + } }, { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat('WindowsAgentVM',copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "windowsAgentVmLoop", "count": "[parameters('windowsAgentCount')]" @@ -432,7 +436,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('WindowsAgentVm',copyIndex(),'/puppetExtension')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "puppetAgentExtLoop", "count": "[parameters('windowsAgentCount')]" @@ -445,7 +449,7 @@ "publisher": "Puppet", "type": "PuppetAgent", "typeHandlerVersion": "1.5", - "autoUpgradeMinorVersion" : "true", + "autoUpgradeMinorVersion": "true", "protectedSettings": { "PUPPET_MASTER_SERVER": "[reference(variables('publicIPAddressName'),'2015-06-15').dnsSettings.fqdn]" } @@ -455,7 +459,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat('UbuntuAgentVM',copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "ubuntuAgentVmLoop", "count": "[parameters('linuxAgentCount')]" @@ -505,33 +509,33 @@ } }, { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat('UbuntuAgentVM',copyIndex(),'/CustomScriptExtension')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "copy": { - "name": "linuxAgentExtLoop", - "count": "[parameters('linuxAgentCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', concat('UbuntuAgentVm',copyIndex()))]", - "[concat('Microsoft.Compute/virtualMachines/', variables('puppetMasterVmName'),'/extensions/CustomScriptExtension')]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'),'install_puppet_agent.sh')]" - ], - "commandToExecute": "[concat('./install_puppet_agent.sh ', reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName')), '2016-03-30').dnsSettings.fqdn)]" - } - } + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat('UbuntuAgentVM',copyIndex(),'/CustomScriptExtension')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "copy": { + "name": "linuxAgentExtLoop", + "count": "[parameters('linuxAgentCount')]" + }, + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', concat('UbuntuAgentVm',copyIndex()))]", + "[concat('Microsoft.Compute/virtualMachines/', variables('puppetMasterVmName'),'/extensions/CustomScriptExtension')]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'),'install_puppet_agent.sh')]" + ], + "commandToExecute": "[concat('./install_puppet_agent.sh ', reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName')), '2016-03-30').dnsSettings.fqdn)]" + } + } } ], - "outputs" : { + "outputs": { "Puppet Enterprise Console FQDN:": { "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName')), '2016-03-30').dnsSettings.fqdn]", "type": "string" diff --git a/puppet-enterprise-rhel-win/azuredeploy.json b/puppet-enterprise-rhel-win/azuredeploy.json index e3351557fbe5..e6b7f4109d3c 100644 --- a/puppet-enterprise-rhel-win/azuredeploy.json +++ b/puppet-enterprise-rhel-win/azuredeploy.json @@ -10,14 +10,14 @@ }, "vmPassword": { "type": "securestring", - "minLength":12, + "minLength": 12, "metadata": { "description": "Password for the user of Virtual Machine. Used for both Linux and Windows machines." } }, "puppetConsolePassword": { "type": "securestring", - "minLength":8, + "minLength": 8, "metadata": { "description": "Password for the Puppet Enterprise Console." } @@ -30,7 +30,6 @@ "metadata": { "description": "Number of Windows Puppet Agents to deploy. Deploys Windows Server 2016." } - }, "linuxAgentCount": { "type": "int", @@ -44,7 +43,7 @@ "remoteAllowedCIDR": { "type": "string", "minLength": 7, - "defaultValue": "0.0.0.0/0", + "defaultValue": "0.0.0.0/0", "metadata": { "description": "Enter Public IP CIDR Allowed for accessing the deployment.Enter in 0.0.0.0/0 format. You can always modify these later in NSG Settings" } @@ -62,6 +61,13 @@ "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated.Leave blank if unsure" }, "defaultValue": "" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -102,7 +108,7 @@ "redHatTags": { "type": "object", "provider": "9d2c71fc-96ba-4b4a-93b3-14def5bc96fc" - }, + }, "puppetTags": { "type": "object", "provider": "8D5B50DB-4F4A-4112-A0D2-1385BD3BB64E" @@ -117,39 +123,37 @@ "type": "Microsoft.Compute/availabilitySets", "name": "master-avset", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This availability set will consist of puppet master installed virtual machine", "tags": { "displayName": "Availability Set Puppet Master", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('puppetTags').provider]" }, - "properties": { - } + "properties": {} }, { "type": "Microsoft.Compute/availabilitySets", "name": "agent-avset", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This availability set will consist of windows virtual machines configured as puppet agents ", "tags": { "displayName": "Puppet Agents Availability Set", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, - "properties": { - } + "properties": {} }, { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('puppetNsgName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This will have firewall rules for Puppet Master Virtual machine", "tags": { "displayName": "Puppet NSG", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('puppetTags').provider]" }, "properties": { @@ -257,11 +261,11 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('linuxAgentNsgName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This will have firewall rules for linux puppet agents", "tags": { "displayName": "Linux Agent NSG", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { @@ -369,11 +373,11 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('windowsAgentNsgName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This will have firewall rules for windows puppet agents", "tags": { "displayName": "Windows Agent NSG", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { @@ -495,11 +499,11 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('puppetStorageName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This storage account is used to store the VM disks of puppet master vm", "tags": { "displayName": "Puppet Master Storage Account", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('puppetTags').provider]" }, "properties": { @@ -510,11 +514,11 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('linuxAgentStorageName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This storage account is used to store the VM disks of RHEL puppet agent vms", "tags": { "displayName": "Linux Agent Storage Account", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { @@ -525,11 +529,11 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('windowsAgentStorageName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This storage account is used to store the VM disks of windows puppet agent vms", "tags": { "displayName": "Windows Agent Storage Account", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { @@ -540,11 +544,11 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('diagStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This storage account is used for diagnostic data for all vms", "tags": { "displayName": "Diagnostics Storage Account", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { @@ -555,11 +559,11 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This Virtual Network contains all the VMs needed", "tags": { "displayName": "Puppet Virtual Network", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ @@ -608,11 +612,11 @@ "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressNamePuppetMaster')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This Public IP is used by the Puppet Master installed VM", "tags": { "displayName": "Public IP - Puppet Master", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { @@ -626,11 +630,11 @@ "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('lbIPAddressName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This Public IP is used by the Load Balancer", "tags": { "displayName": "LB Public IP", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { @@ -645,11 +649,11 @@ "type": "Microsoft.Network/loadBalancers", "name": "[variables('loadBalancerName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This Load Balancer is used to allow RDP and SSH acess to Agent VMs via NAT rules", "tags": { "displayName": "Load Balancer", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ @@ -674,18 +678,17 @@ "name": "loadBalancerBackEnd2" } ] - } }, { "type": "Microsoft.Network/loadBalancers/inboundNatRules", "name": "[concat(variables('loadBalancerName'), '/', 'RDPVM', copyIndex(1))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This resource adds all the NAT rules needed to allow RDP access for Windows VMs", "tags": { "displayName": "LB nat rules-RDP", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "copy": { @@ -709,11 +712,11 @@ "type": "Microsoft.Network/loadBalancers/inboundNatRules", "name": "[concat(variables('loadBalancerName'), '/', 'SSHVM', copyIndex(1))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This resource adds all the NAT rules needed to give SSH access for RHEL agent VMs", "tags": { "displayName": "LB nat rules-SSH", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "copy": { @@ -737,11 +740,11 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[variables('puppetMasterNicName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This NIC will be used by puppet master vm", "tags": { "displayName": "Puppet Master NIC", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('puppetTags').provider]" }, "dependsOn": [ @@ -766,16 +769,15 @@ ] } }, - { "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('vmLinAgentNicName'),copyIndex(1))]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "These NIC's will be used by linux agent vms", "tags": { "displayName": "Linux Agent NICs", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "copy": { @@ -794,7 +796,6 @@ "properties": { "privateIPAllocationMethod": "Static", "privateIPAddress": "[concat(variables('linuxPrivateIpAddressStart'),copyIndex(1))]", - "subnet": { "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets/',variables('virtualNetworkName'),variables('linuxSubnetName'))]" }, @@ -817,11 +818,11 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('vmWinAgentNicName'),copyIndex(1))]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "These NIC's will be used by windows agent vms", "tags": { "displayName": "Windows Agent NICs", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "copy": { @@ -840,7 +841,6 @@ "properties": { "privateIPAllocationMethod": "Static", "privateIPAddress": "[concat(variables('winPrivateIpAddressStart'),copyIndex(1))]", - "subnet": { "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets/',variables('virtualNetworkName'),variables('windowsSubnetName'))]" }, @@ -859,16 +859,15 @@ ] } }, - { "type": "Microsoft.Compute/virtualMachines", "name": "[variables('puppetMasterVmName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This vm will be used as puppet master", "tags": { "displayName": "Puppet Master VM", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('puppetTags').provider]" }, "dependsOn": [ @@ -928,11 +927,11 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('puppetMasterVmName'),'/CustomScriptPuppet')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This Script will wait untill Puppet Master gets installed", "tags": { "displayName": "Puppet Master VM Extension", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('puppetTags').provider]" }, "dependsOn": [ @@ -950,20 +949,18 @@ }, "protectedSettings": { "commandToExecute": "./wait.sh" - } } }, - { "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmWinAgentName'),copyIndex(1))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "These vms will be used as Windows puppet agents", "tags": { "displayName": "Windows Agent VMs", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "copy": { @@ -1021,11 +1018,11 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmWinAgentName'),copyIndex(1),'/puppetExtension')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "These VM Extensions are used to setup puppet agent on the VM", "tags": { "displayName": "Windows Agent VM Extension", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "copy": { @@ -1050,11 +1047,11 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmLinAgentName'),copyIndex(1))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "These vms will be used as puppet agents", "tags": { "displayName": "Linux Agent VMs", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "copy": { @@ -1112,11 +1109,11 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmLinAgentName'),copyIndex(1),'/CustomScriptLinuxAgent')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "These VM Extensions are used to setup puppet agent on the VM", "tags": { "displayName": "Linux Agent VM Extension", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('puppetTags').provider]" }, "copy": { @@ -1142,7 +1139,6 @@ } } } - ], "outputs": { "Puppet Enterprise Console FQDN:": { @@ -1153,7 +1149,7 @@ "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressNamePuppetMaster'))).ipAddress]", "type": "string" }, - "Load Balancer Public IP": { + "Load Balancer Public IP": { "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('lbIPAddressName'))).ipAddress]", "type": "string" } diff --git a/python-proxy-on-ubuntu/azuredeploy.json b/python-proxy-on-ubuntu/azuredeploy.json index 8614d78b1afc..d150c35cf32c 100644 --- a/python-proxy-on-ubuntu/azuredeploy.json +++ b/python-proxy-on-ubuntu/azuredeploy.json @@ -77,6 +77,13 @@ "metadata": { "description": "Name of Network Interface" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -85,7 +92,6 @@ "subnet2Name": "Subnet-2", "subnet1Prefix": "10.0.0.0/24", "subnet2Prefix": "10.0.1.0/24", - "vmStorageAccountContainerName": "vhds", "publicIPAddressType": "Dynamic", "storageAccountType": "Standard_LRS", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", @@ -96,7 +102,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -105,7 +111,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -117,7 +123,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -144,7 +150,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" @@ -170,7 +176,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]" @@ -229,7 +235,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/installPythonProxy')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], diff --git a/qlik-sense-enterprise/azuredeploy.json b/qlik-sense-enterprise/azuredeploy.json index 217e1c03aad8..e815c1ee9464 100644 --- a/qlik-sense-enterprise/azuredeploy.json +++ b/qlik-sense-enterprise/azuredeploy.json @@ -1,6 +1,6 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": { "_artifactsLocation": { "type": "string", @@ -138,6 +138,13 @@ "metadata": { "description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -162,7 +169,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSecurityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "[variables('networkSecurityGroupName')]" }, @@ -245,7 +252,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, @@ -256,7 +263,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -268,7 +275,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" ], @@ -295,10 +302,11 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", - "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" ], + "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" + ], "properties": { "ipConfigurations": [ { @@ -320,7 +328,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -369,7 +377,7 @@ "type": "extensions", "apiVersion": "2016-03-30", "name": "qlikSenseBootstrap", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" ], @@ -384,7 +392,7 @@ "settings": { "fileUris": [ "[concat(parameters('_artifactsLocation'), '/', variables('scriptFolder'), '/', variables('scriptBootStrapFileName'), parameters('_artifactsLocationSasToken'))]", - "[concat(parameters('_artifactsLocation'), '/', variables('scriptFolder'), '/', variables('scriptInstallFileName'), parameters('_artifactsLocationSasToken'))]" + "[concat(parameters('_artifactsLocation'), '/', variables('scriptFolder'), '/', variables('scriptInstallFileName'), parameters('_artifactsLocationSasToken'))]" ] }, "protectedSettings": { @@ -395,10 +403,10 @@ ] } ], - "outputs": { - "hostname": { - "type": "string", - "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" - } + "outputs": { + "hostname": { + "type": "string", + "value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]" } + } } diff --git a/radium-blockchain-ubuntu/azuredeploy.json b/radium-blockchain-ubuntu/azuredeploy.json index 70491f20084b..20bd9a978d7f 100644 --- a/radium-blockchain-ubuntu/azuredeploy.json +++ b/radium-blockchain-ubuntu/azuredeploy.json @@ -69,6 +69,13 @@ "metadata": { "description": "Allowed IP for RPC connection." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -88,15 +95,14 @@ "vmName": "[parameters('dnsLabelPrefix')]", "virtualNetworkName": "RadiumVNET", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "apiVersion": "2015-06-15" + "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]" }, "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -105,7 +111,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -117,7 +123,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -138,7 +144,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -164,7 +170,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -212,7 +218,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" @@ -231,4 +237,4 @@ } } ] -} \ No newline at end of file +} diff --git a/rds-deployment-existing-ad/azuredeploy.json b/rds-deployment-existing-ad/azuredeploy.json index 357322146837..29be1168652e 100644 --- a/rds-deployment-existing-ad/azuredeploy.json +++ b/rds-deployment-existing-ad/azuredeploy.json @@ -82,6 +82,13 @@ "description": "The size of the RDSH VMs" }, "defaultValue": "Standard_A4" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -104,7 +111,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpRef')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -116,7 +123,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('gatewayIpRef')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -128,7 +135,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('brokerIpRef')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -140,7 +147,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -149,25 +156,25 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "gw-availabilityset", - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "cb-availabilityset", - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "rdsh-availabilityset", - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/loadBalancers", "name": "loadBalancer", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('publicIpRef'))]" ], @@ -262,7 +269,6 @@ "enableFloatingIP": false } } - ] } }, @@ -270,7 +276,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "gw-nic", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Network/loadBalancers/loadBalancer" ], @@ -310,7 +316,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "cb-nic", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "Microsoft.Network/loadBalancers/loadBalancer" ], @@ -340,7 +346,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat('rdsh-', copyindex(), '-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "rdsh-nic-loop", "count": "[parameters('numberOfRdshInstances')]" @@ -371,7 +377,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "gw-vm", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[resourceId('Microsoft.Compute/availabilitySets', 'gw-availabilityset')]", @@ -418,7 +424,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "gw-vm/gateway", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', 'gw-vm')]" ], @@ -451,7 +457,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat('rdsh-', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "rdsh-vm-loop", "count": "[parameters('numberOfRdshInstances')]" @@ -484,7 +490,6 @@ "name": "osdisk", "vhd": { "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),'2016-01-01').primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/','rdsh-',copyindex(),'-os-disk.vhd')]" - }, "caching": "ReadWrite", "createOption": "FromImage" @@ -503,7 +508,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('rdsh-', copyindex(),'/sessionhost')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', concat('rdsh-', copyindex()))]" ], @@ -536,7 +541,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "cb-vm", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[resourceId('Microsoft.Compute/availabilitySets', 'cb-availabilityset')]", @@ -584,7 +589,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "cb-vm/rdsdeployment", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', 'cb-vm')]", "Microsoft.Compute/virtualMachines/gw-vm/extensions/gateway", diff --git a/rds-deployment-ha-gateway/azuredeploy.json b/rds-deployment-ha-gateway/azuredeploy.json index e5393db09f77..225877cf11c6 100644 --- a/rds-deployment-ha-gateway/azuredeploy.json +++ b/rds-deployment-ha-gateway/azuredeploy.json @@ -109,26 +109,28 @@ "description": "The subnet name of AD domain. For example johnsubnet1" }, "defaultValue": "Subnet" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "imagePublisher": "MicrosoftWindowsServer", "imageOffer": "WindowsServer", - "vnetAddressRange": "10.0.0.0/16", - "subnetAddressRange": "10.0.0.0/24", - "dnsServerPrivateIp": "10.0.0.8", "subnet-id": "[concat(resourceId('Microsoft.Network/virtualNetworks',parameters('existingVnet')),'/subnets/',parameters('existingSubnet'))]", "publicIpRef": "publicIp", - "assetLocation": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/rds-deployment", - "apiVersion": "2015-06-15", - "PublicIPLocation": "[concat(parameters('dnsLabelPrefix'),'.','[resourceGroup().location]','.cloudapp.azure.com')]" + "assetLocation": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/rds-deployment" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -137,13 +139,13 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[Parameters('gw-availabilityset')]", - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpRef')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -155,7 +157,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/loadBalancers", "name": "[Parameters('Loadbalancer')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('publicIpRef'))]" ], @@ -256,7 +258,7 @@ { "name": "[concat('gw-',copyindex(),'-nic')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-06-01", "copy": { "name": "gw-nic-loop", @@ -288,7 +290,7 @@ { "name": "[concat('gw-vm-',copyindex())]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "copy": { "name": "gw-vm-loop", @@ -339,7 +341,7 @@ { "name": "[concat('gw-vm-',copyindex(),'/Gateway')]", "type": "Microsoft.Compute/virtualMachines/extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', Concat('gw-vm-',copyindex()))]" @@ -370,7 +372,7 @@ { "name": "[concat('gw-vm-',copyindex(),'/WebAndGwFarmAdd_PostConfig1.1')]", "type": "Microsoft.Compute/virtualMachines/extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', Concat('gw-vm-',copyindex()))]", @@ -398,4 +400,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/rds-deployment/azuredeploy.json b/rds-deployment/azuredeploy.json index 7b8a6ec1f445..4c29283b3b83 100644 --- a/rds-deployment/azuredeploy.json +++ b/rds-deployment/azuredeploy.json @@ -75,6 +75,13 @@ "description": "The size of the RDSH VMs" }, "defaultValue": "Standard_A4" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -94,8 +101,6 @@ "adPDCVMName": "advm", "vnetwithDNSTemplateURL": "[concat(variables('adAssetLocation'),'/vnet-with-dns-server.json')]", "updateVNetDNS1": "updateVNetDNS", - "updateVNetDNS1ID": "[concat('Microsoft.Resources/deployments/', variables('updateVNetDNS1'))]", - "nicTemplateURL": "[concat(variables('adAssetLocation'),'/nic.json')]", "publicLBName": "[concat('ADPLB',resourceGroup().name)]", "publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]", "lbFE": "ADLBFE", @@ -106,7 +111,6 @@ "adRDPNATRuleID": "[concat(variables('publiclbID'),'/inboundNatRules/',variables('rdpNAT'))]", "adNICName": "[concat('ADNic',resourceGroup().name)]", "lbBE": "ADLBBE", - "publicBEAddressPoolID": "[concat(variables('publiclbID'),'/backendAddressPools/',variables('lbBE'))]", "gwLBName": "[concat('GWPLB',resourceGroup().name)]", "publicIPAddressName": "[tolower(concat('adpip',uniqueString(resourceGroup().Id)))]", "gwIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('gwpublicIPAddressName'))]", @@ -139,13 +143,12 @@ } } ] - }, "resources": [ { "name": "[variables('nsgName')]", "type": "Microsoft.Network/networkSecurityGroups", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "properties": { "securityRules": [ @@ -168,7 +171,7 @@ { "name": "[variables('adVnetName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[variables('nsgID')]" @@ -195,7 +198,7 @@ { "name": "[variables('publicIPAddressName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[variables('vnetID')]" @@ -210,7 +213,7 @@ { "name": "[parameters('gwpublicIPAddressName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[variables('deployPrimaryAdID')]" @@ -226,25 +229,25 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "gw-availabilityset", - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "cb-availabilityset", - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "rdsh-availabilityset", - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, { "name": "[variables('publiclbName')]", "type": "Microsoft.Network/loadBalancers", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('publicIPAddressID')]" ], @@ -284,7 +287,7 @@ "name": "[variables('gwlbName')]", "type": "Microsoft.Network/loadBalancers", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('gwIPAddressID')]" ], @@ -379,7 +382,6 @@ "enableFloatingIP": false } } - ] } }, @@ -497,7 +499,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -506,7 +508,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "gw-nic", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('gwlbID')]", "[variables('adVmDeploymentID')]" @@ -544,7 +546,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "cb-nic", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('publiclbID')]", "[variables('adVmDeploymentID')]" @@ -572,7 +574,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat('rdsh-', copyindex(), '-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "rdsh-nic-loop", "count": "[parameters('numberOfRdshInstances')]" @@ -604,7 +606,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "gw-vm", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('deployPrimaryAdID')]", "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", @@ -651,7 +653,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "gw-vm/gateway", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', 'gw-vm')]" ], @@ -684,7 +686,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat('rdsh-', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "rdsh-vm-loop", "count": "[parameters('numberOfRdshInstances')]" @@ -717,7 +719,6 @@ "name": "osdisk", "vhd": { "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),'2016-01-01').primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/','rdsh-',copyindex(),'-os-disk.vhd')]" - }, "caching": "ReadWrite", "createOption": "FromImage" @@ -736,7 +737,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('rdsh-', copyindex(),'/sessionhost')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', concat('rdsh-', copyindex()))]" ], @@ -769,7 +770,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "cb-vm", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('deployPrimaryAdID')]", "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", @@ -817,7 +818,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "cb-vm/rdsdeployment", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', 'cb-vm')]", "Microsoft.Compute/virtualMachines/gw-vm/extensions/gateway", diff --git a/rds-deployment/vnet-with-dns-server.json b/rds-deployment/vnet-with-dns-server.json index e082748278f3..454bc8a77d01 100644 --- a/rds-deployment/vnet-with-dns-server.json +++ b/rds-deployment/vnet-with-dns-server.json @@ -33,6 +33,13 @@ "metadata": { "description": "The DNS address(es) of the DNS Server(s) used by the VNET" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -40,7 +47,7 @@ "apiVersion": "2015-06-15", "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ diff --git a/rds-update-certificate/azuredeploy.json b/rds-update-certificate/azuredeploy.json index 85632b55ea82..e9dd1bc89884 100644 --- a/rds-update-certificate/azuredeploy.json +++ b/rds-update-certificate/azuredeploy.json @@ -1,88 +1,94 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": { - "vaultName": { - "type": "string", - "metadata": { - "description": "Azure Key Vault name where the certificate is stored." - } - }, - "certificateName": { - "type": "string", - "metadata": { - "description": "Name of the certificate in the Azure Key Vault." - } - }, - "applicationId": { - "type": "string", - "metadata": { - "description": "AD application Id used to access the certificate." - } - }, - "applicationPassword": { - "type": "securestring", - "metadata": { - "description": "AD application password." - } - }, - "tenantId": { - "type": "string", - "metadata": { - "description": "Tenant Id for whom the Secure Principal account was created." - } - }, - "brokerVmName": { - "type": "string", - "metadata": { - "description": "Name of the RD Connection Broker VM resource in the deployment (the configure certificates script is executed on this VM)." - }, - "defaultValue": "cb-vm" - }, - "existingDomainName": { - "type": "string", - "metadata": { - "description": "The FQDN of the AD domain" - } - }, - "existingAdminUsername": { - "type": "string", - "metadata": { - "description": "Name of the domain account with administrative priviledges in the RDS deployment" - } - }, - "existingAdminPassword": { - "type": "securestring", - "metadata": { - "description": "The password for the administrator account of the new VM and the domain" - } - }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/Azure-QuickStart-Templates/master/rds-update-certificate" - }, - "_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": "" - } + "parameters": { + "vaultName": { + "type": "string", + "metadata": { + "description": "Azure Key Vault name where the certificate is stored." + } + }, + "certificateName": { + "type": "string", + "metadata": { + "description": "Name of the certificate in the Azure Key Vault." + } + }, + "applicationId": { + "type": "string", + "metadata": { + "description": "AD application Id used to access the certificate." + } + }, + "applicationPassword": { + "type": "securestring", + "metadata": { + "description": "AD application password." + } }, - + "tenantId": { + "type": "string", + "metadata": { + "description": "Tenant Id for whom the Secure Principal account was created." + } + }, + "brokerVmName": { + "type": "string", + "metadata": { + "description": "Name of the RD Connection Broker VM resource in the deployment (the configure certificates script is executed on this VM)." + }, + "defaultValue": "cb-vm" + }, + "existingDomainName": { + "type": "string", + "metadata": { + "description": "The FQDN of the AD domain" + } + }, + "existingAdminUsername": { + "type": "string", + "metadata": { + "description": "Name of the domain account with administrative priviledges in the RDS deployment" + } + }, + "existingAdminPassword": { + "type": "securestring", + "metadata": { + "description": "The password for the administrator account of the new VM and the domain" + } + }, + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/Azure-QuickStart-Templates/master/rds-update-certificate" + }, + "_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": { "p": { - "appid": "[concat(' -appId ', parameters('applicationId'))]", - "apppassword": "[concat(' -appPassword ', parameters('applicationPassword'))]", - "tenantid": "[concat(' -tenantId ', parameters('tenantId'))]", - "vault": "[concat(' -vaultName ', parameters('vaultName'))]", - "secret": "[concat(' -secretName ', parameters('certificateName'))]", - "adminUsername": "[concat(' -adminUsername ', parameters('existingAdminUsername'))]", - "adminPassword": "[concat(' -adminPassword ', parameters('existingAdminPassword'))]", - "adDomainName": "[concat(' -adDomainName ', parameters('existingDomainName'))]" + "appid": "[concat(' -appId ', parameters('applicationId'))]", + "apppassword": "[concat(' -appPassword ', parameters('applicationPassword'))]", + "tenantid": "[concat(' -tenantId ', parameters('tenantId'))]", + "vault": "[concat(' -vaultName ', parameters('vaultName'))]", + "secret": "[concat(' -secretName ', parameters('certificateName'))]", + "adminUsername": "[concat(' -adminUsername ', parameters('existingAdminUsername'))]", + "adminPassword": "[concat(' -adminPassword ', parameters('existingAdminPassword'))]", + "adDomainName": "[concat(' -adDomainName ', parameters('existingDomainName'))]" }, "scriptParameters": "[concat(variables('p').appid, variables('p').apppassword, variables('p').tenantid, variables('p').vault, variables('p').secret, variables('p').adminUsername, variables('p').adminPassword, variables('p').adDomainName)]", "scriptFolder": "Scripts", @@ -90,13 +96,12 @@ "impersonateScript": "https://gallery.technet.microsoft.com/scriptcenter/Impersonate-a-User-9bfeff82/file/127189/1/New-ImpersonateUser.ps1", "setPublishedNameScript": "https://gallery.technet.microsoft.com/Change-published-FQDN-for-2a029b80/file/103829/2/Set-RDPublishedName.ps1" }, - "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('brokerVmName'),'/customscript')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "script" }, @@ -106,11 +111,11 @@ "typeHandlerVersion": "1.8", "autoUpgradeMinorVersion": true, "settings": { - "fileUris": [ - "[variables('impersonateScript')]", - "[variables('setPublishedNameScript')]", - "[concat(parameters('_artifactsLocation'), '/', variables('scriptFolder'), '/', variables('scriptFileName'), parameters('_artifactsLocationSasToken'))]" - ] + "fileUris": [ + "[variables('impersonateScript')]", + "[variables('setPublishedNameScript')]", + "[concat(parameters('_artifactsLocation'), '/', variables('scriptFolder'), '/', variables('scriptFileName'), parameters('_artifactsLocationSasToken'))]" + ] }, "protectedSettings": { "commandToExecute": "[concat( 'powershell -noninteractive -executionpolicy bypass -file ', variables('scriptFileName'), variables('scriptParameters'), ' >> script.log 2>&1' )]" @@ -118,7 +123,5 @@ } } ], - - "outputs": { - } + "outputs": {} } diff --git a/rds-update-rdsh-collection/azuredeploy.json b/rds-update-rdsh-collection/azuredeploy.json index 4e8ed90945f7..5bae7485c969 100644 --- a/rds-update-rdsh-collection/azuredeploy.json +++ b/rds-update-rdsh-collection/azuredeploy.json @@ -1,264 +1,267 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "existingRdshCollectionName": { - "type": "string", - "defaultValue": "Desktop Collection", - "metadata": { - "description": "Name of the RDSH collection to update" - } - }, - "rdshTemplateImageUri": { - "type": "string", - "metadata": { - "description": "URI for the template VHD to use for RDSH instances. For example, https://rdsstorage.blob.core.windows.net/vhds/MyWindowServerOSImage.vhd" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "existingRdshCollectionName": { + "type": "string", + "defaultValue": "Desktop Collection", + "metadata": { + "description": "Name of the RDSH collection to update" + } + }, + "rdshTemplateImageUri": { + "type": "string", + "metadata": { + "description": "URI for the template VHD to use for RDSH instances. For example, https://rdsstorage.blob.core.windows.net/vhds/MyWindowServerOSImage.vhd" + } + }, + "rdshUpdateIteration": { + "type": "string", + "metadata": { + "description": "A unique designator representing update iteration; newly created RDSH instances will have their names in the form: 'rdsh-<index><iteration>" + } + }, + "rdshNumberOfInstances": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "Number of RD Session Hosts" + } + }, + "rdshVmSize": { + "type": "string", + "metadata": { + "description": "The size of the RDSH virtual machines" + }, + "defaultValue": "Standard_A2" + }, + "userLogoffTimeoutInMinutes": { + "type": "int", + "defaultValue": 60, + "metadata": { + "description": "Timeout before forced user logoff from old RDSH instances" + } + }, + "existingDomainName": { + "type": "string", + "metadata": { + "description": "Domain name of the exisiting RDS deployment" + } + }, + "existingAdminUsername": { + "type": "string", + "metadata": { + "description": "The name of administrator in the existing RDS deployment" + } + }, + "existingAdminPassword": { + "type": "securestring", + "metadata": { + "description": "Domain administrator password" + } + }, + "existingVnetName": { + "type": "string", + "defaultValue": "vnet", + "metadata": { + "description": "VNET name" + } + }, + "existingSubnetName": { + "type": "string", + "defaultValue": "Subnet", + "metadata": { + "description": "Subnet name" + } + }, + "availabilitySet": { + "type": "string", + "defaultValue": "rdsh-availabilityset", + "metadata": { + "description": "Availability set for new RDSH instances" + } + }, + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/rds-update-rdsh-collection/" + }, + "_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": { + "iteration": "[toLower(parameters('rdshUpdateIteration'))]", + "storageAccountName": "[split( split( parameters('rdshTemplateImageUri'), '/')[2], '.' )[0]]", + "impersonateScript": "https://gallery.technet.microsoft.com/scriptcenter/Impersonate-a-User-9bfeff82/file/127189/1/New-ImpersonateUser.ps1", + "p": { + "domain": "[concat(' -domain ', parameters('existingDomainName'))]", + "user": "[concat(' -username ', parameters('existingAdminUsername'))]", + "pwd": "[concat(' -password ', parameters('existingAdminPassword'))]", + "collection": "[concat(' -collection \"', parameters('existingRdshCollectionName'), '\"')]", + "iteration": "[concat(' -iteration ', toLower(parameters('rdshUpdateIteration')))]", + "servers": "[concat(' -nServers ', parameters('rdshNumberOfInstances'))]", + "timeout": "[concat(' -nTimeoutMinutes ', parameters('userLogoffTimeoutInMinutes'))]" + }, + "scriptParameters": "[concat(variables('p').domain, variables('p').user, variables('p').pwd, variables('p').collection, variables('p').iteration, variables('p').servers, variables('p').timeout)]", + "scriptFolder": "Scripts", + "scriptFileName": "Script.ps1" + }, + "resources": [ + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat('rdsh-', copyindex(),variables('iteration'), '-nic')]", + "location": "[parameters('location')]", + "copy": { + "name": "rdsh-nic-loop", + "count": "[parameters('rdshNumberOfInstances')]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('existingVnetName'), parameters('existingSubnetName'))]" + } } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/availabilitySets", + "name": "[parameters('availabilitySet')]", + "location": "[parameters('location')]" + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[concat('rdsh-', copyindex(),variables('iteration'))]", + "location": "[parameters('location')]", + "copy": { + "name": "rdsh-vm-loop", + "count": "[parameters('rdshNumberOfInstances')]" + }, + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', 'rdsh-', copyindex(),variables('iteration'), '-nic')]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('rdshVmSize')]" }, - "rdshUpdateIteration": { - "type": "string", - "metadata": { - "description": "A unique designator representing update iteration; newly created RDSH instances will have their names in the form: 'rdsh-<index><iteration>" - } + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('availabilitySet'))]" }, - "rdshNumberOfInstances": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "Number of RD Session Hosts" - } + "osProfile": { + "computerName": "[concat('rdsh-', copyindex(),variables('iteration'))]", + "adminUsername": "[parameters('existingAdminUsername')]", + "adminPassword": "[parameters('existingAdminPassword')]" }, - "rdshVmSize": { - "type": "string", - "metadata": { - "description": "The size of the RDSH virtual machines" + "storageProfile": { + "osDisk": { + "name": "[concat('rdsh-', copyindex(),variables('iteration'),'-osDisk')]", + "osType": "Windows", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "[parameters('rdshTemplateImageUri')]" }, - "defaultValue": "Standard_A2" - }, - "userLogoffTimeoutInMinutes": { - "type": "int", - "defaultValue": 60, - "metadata": { - "description": "Timeout before forced user logoff from old RDSH instances" - } - }, - "existingDomainName": { - "type": "string", - "metadata": { - "description": "Domain name of the exisiting RDS deployment" - } - }, - "existingAdminUsername": { - "type": "string", - "metadata": { - "description": "The name of administrator in the existing RDS deployment" - } - }, - "existingAdminPassword": { - "type": "securestring", - "metadata": { - "description": "Domain administrator password" + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob, 'vhds/rdsh-', copyindex(), variables('iteration'), '-osdisk.vhd')]" } + } }, - "existingVnetName": { - "type": "string", - "defaultValue": "vnet", - "metadata": { - "description": "VNET name" + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat('rdsh-', copyindex(),variables('iteration'), '-nic'))]" } + ] }, - "existingSubnetName": { - "type": "string", - "defaultValue": "Subnet", - "metadata": { - "description": "Subnet name" - } - }, - "availabilitySet": { - "type": "string", - "defaultValue": "rdsh-availabilityset", - "metadata": { - "description": "Availability set for new RDSH instances" - } - }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/rds-update-rdsh-collection/" - }, - "_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": "" + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob]" + } } - - }, - - "variables": { - "iteration": "[toLower(parameters('rdshUpdateIteration'))]", - "storageAccountName": "[split( split( parameters('rdshTemplateImageUri'), '/')[2], '.' )[0]]", - "impersonateScript": "https://gallery.technet.microsoft.com/scriptcenter/Impersonate-a-User-9bfeff82/file/127189/1/New-ImpersonateUser.ps1", - "p": { - "domain": "[concat(' -domain ', parameters('existingDomainName'))]", - "user": "[concat(' -username ', parameters('existingAdminUsername'))]", - "pwd": "[concat(' -password ', parameters('existingAdminPassword'))]", - "collection": "[concat(' -collection \"', parameters('existingRdshCollectionName'), '\"')]", - "iteration": "[concat(' -iteration ', toLower(parameters('rdshUpdateIteration')))]", - "servers": "[concat(' -nServers ', parameters('rdshNumberOfInstances'))]", - "timeout": "[concat(' -nTimeoutMinutes ', parameters('userLogoffTimeoutInMinutes'))]" - }, - "scriptParameters": "[concat(variables('p').domain, variables('p').user, variables('p').pwd, variables('p').collection, variables('p').iteration, variables('p').servers, variables('p').timeout)]", - "scriptFolder": "Scripts", - "scriptFileName": "Script.ps1" - }, - - "resources": [ + }, + "resources": [ { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat('rdsh-', copyindex(),variables('iteration'), '-nic')]", - "location": "[resourceGroup().location]", - "copy": { - "name": "rdsh-nic-loop", - "count": "[parameters('rdshNumberOfInstances')]" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('existingVnetName'), parameters('existingSubnetName'))]" - } - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[parameters('availabilitySet')]", - "location": "[resourceGroup().location]" - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat('rdsh-', copyindex(),variables('iteration'))]", - "location": "[resourceGroup().location]", - "copy": { - "name": "rdsh-vm-loop", - "count": "[parameters('rdshNumberOfInstances')]" - }, - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', 'rdsh-', copyindex(),variables('iteration'), '-nic')]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('rdshVmSize')]" - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('availabilitySet'))]" - }, - "osProfile": { - "computerName": "[concat('rdsh-', copyindex(),variables('iteration'))]", - "adminUsername": "[parameters('existingAdminUsername')]", - "adminPassword": "[parameters('existingAdminPassword')]" - }, - "storageProfile": { - "osDisk": { - "name": "[concat('rdsh-', copyindex(),variables('iteration'),'-osDisk')]", - "osType": "Windows", - "caching": "ReadWrite", - "createOption": "FromImage", - "image": { - "uri": "[parameters('rdshTemplateImageUri')]" - }, - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob, 'vhds/rdsh-', copyindex(), variables('iteration'), '-osdisk.vhd')]" - } - - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat('rdsh-', copyindex(),variables('iteration'), '-nic'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob]" - } - } - }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat('rdsh-',copyindex(),variables('iteration'),'/sessionhost')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines', concat('rdsh-', copyindex(),variables('iteration')))]" - ], - "properties": { - "publisher": "Microsoft.Powershell", - "type": "DSC", - "typeHandlerVersion": "2.11", - "autoUpgradeMinorVersion": true, - "settings": { - "ModulesUrl": "[concat(parameters('_artifactsLocation'),'/DSC/Configuration.zip', parameters('_artifactsLocationSasToken'))]", - "ConfigurationFunction": "Configuration.ps1\\SessionHost", - "Properties": { - "DomainName": "[parameters('existingDomainName')]", - "AdminCreds": { - "UserName": "[parameters('existingAdminUsername')]", - "Password": "PrivateSettingsRef:AdminPassword" - } - } - }, - "protectedSettings": { - "Items": { - "AdminPassword": "[parameters('existingAdminPassword')]" - } - } - } + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat('rdsh-',copyindex(),variables('iteration'),'/sessionhost')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines', concat('rdsh-', copyindex(),variables('iteration')))]" + ], + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.11", + "autoUpgradeMinorVersion": true, + "settings": { + "ModulesUrl": "[concat(parameters('_artifactsLocation'),'/DSC/Configuration.zip', parameters('_artifactsLocationSasToken'))]", + "ConfigurationFunction": "Configuration.ps1\\SessionHost", + "Properties": { + "DomainName": "[parameters('existingDomainName')]", + "AdminCreds": { + "UserName": "[parameters('existingAdminUsername')]", + "Password": "PrivateSettingsRef:AdminPassword" } - ] - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "cb-vm/customscript", - "location": "[resourceGroup().location]", - "dependsOn": [ - "rdsh-vm-loop" - ], - "tags": { - "displayName": "script" + } }, - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.8", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[variables('impersonateScript')]", - "[concat(parameters('_artifactsLocation'), '/', variables('scriptFolder'), '/', variables('scriptFileName'), parameters('_artifactsLocationSasToken'))]" - ] - }, - "protectedSettings": { - "commandToExecute": "[concat( 'powershell -noninteractive -executionpolicy bypass -file ', variables('scriptFileName'), variables('scriptParameters'), ' >> script.log 2>&1' )]" - } + "protectedSettings": { + "Items": { + "AdminPassword": "[parameters('existingAdminPassword')]" + } } + } + } + ] + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "cb-vm/customscript", + "location": "[parameters('location')]", + "dependsOn": [ + "rdsh-vm-loop" + ], + "tags": { + "displayName": "script" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.8", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[variables('impersonateScript')]", + "[concat(parameters('_artifactsLocation'), '/', variables('scriptFolder'), '/', variables('scriptFileName'), parameters('_artifactsLocationSasToken'))]" + ] + }, + "protectedSettings": { + "commandToExecute": "[concat( 'powershell -noninteractive -executionpolicy bypass -file ', variables('scriptFileName'), variables('scriptParameters'), ' >> script.log 2>&1' )]" } - ] + } + } + ] } diff --git a/redis-high-availability/azuredeploy.json b/redis-high-availability/azuredeploy.json index 5afa606ef9cc..92d3faa39338 100644 --- a/redis-high-availability/azuredeploy.json +++ b/redis-high-availability/azuredeploy.json @@ -91,6 +91,13 @@ "metadata": { "description": "The arbitrary name of the Redis cluster" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { diff --git a/redis-high-availability/empty-resources.json b/redis-high-availability/empty-resources.json index 25c1ee94254b..252a191a4e95 100644 --- a/redis-high-availability/empty-resources.json +++ b/redis-high-availability/empty-resources.json @@ -31,6 +31,13 @@ "metadata": { "Description": "Administrator password used when provisioning virtual machines" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, diff --git a/redis-high-availability/jumpbox-resources.json b/redis-high-availability/jumpbox-resources.json index afd3d9575646..c4d454c9b1d1 100644 --- a/redis-high-availability/jumpbox-resources.json +++ b/redis-high-availability/jumpbox-resources.json @@ -31,6 +31,13 @@ "metadata": { "Description": "Administrator password used when provisioning virtual machines" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -42,7 +49,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -66,7 +73,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "jumpboxPublicIP", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -75,7 +82,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "jumpboxNIC", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', 'jumpboxPublicIP')]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('securityGroupName'))]" @@ -104,7 +111,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "jumpboxVM", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'jumpboxNIC')]" ], @@ -139,4 +146,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/redis-high-availability/node-resources.json b/redis-high-availability/node-resources.json index 99c547ce1c4b..b03400a23897 100644 --- a/redis-high-availability/node-resources.json +++ b/redis-high-availability/node-resources.json @@ -31,6 +31,13 @@ "metadata": { "Description": "Administrator password used when provisioning virtual machines" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -39,7 +46,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -59,7 +66,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat('vmMember', parameters('machineSettings').machineIndex)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicMember', parameters('machineSettings').machineIndex)]" ], @@ -99,7 +106,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('vmMember', parameters('machineSettings').machineIndex, '/installscript')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'vmMember', parameters('machineSettings').machineIndex)]" ], diff --git a/redis-high-availability/shared-resources.json b/redis-high-availability/shared-resources.json index abc31987fb24..de5b3495fd73 100644 --- a/redis-high-availability/shared-resources.json +++ b/redis-high-availability/shared-resources.json @@ -19,6 +19,13 @@ "metadata": { "Description": "Network settings object" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -26,7 +33,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[concat(parameters('storageSettings').vhdStorageAccountName)]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -35,14 +42,14 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('commonSettings').availabilitySetName]", - "location": "[resourceGroup().location]", - "properties": { } + "location": "[parameters('location')]", + "properties": {} }, { "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ diff --git a/rhel-3tier-iaas/azuredeploy.json b/rhel-3tier-iaas/azuredeploy.json index 15bcb155c222..fdca2bef7c39 100644 --- a/rhel-3tier-iaas/azuredeploy.json +++ b/rhel-3tier-iaas/azuredeploy.json @@ -43,6 +43,13 @@ "metadata": { "description": "Enter Public IP CIDR to allow for accessing the deployment.Enter in 0.0.0.0/0 format, you can always modify these later in NSG Settings" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -89,22 +96,22 @@ "redHatTags": { "type": "object", "provider": "9d2c71fc-96ba-4b4a-93b3-14def5bc96fc" - }, + }, "quickstartTags": { "type": "object", "name": "rhel-3tier-iaas" - } + } }, "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[concat(variables('vmStorageAccountName'), copyindex(1))]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "4 Storage accounts used to store the VM disks for each tier", "tags": { "displayName": "VM Storage Accounts", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "copy": { @@ -115,38 +122,34 @@ "name": "[variables('vmStorageAccountType')]" }, "kind": "Storage", - "properties": { - - } + "properties": {} }, { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('diagStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Storage account used to store the diagnostics data", "tags": { "displayName": "Diagnostics Storage Account", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "sku": { "name": "Standard_LRS" }, "kind": "Storage", - "properties": { - - } + "properties": {} }, { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('webNSGName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "NSG for Web Subnet. Rules for allowing HTTP and HTTPS requests from internet are created", "tags": { "displayName": "Web NSG", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { @@ -184,43 +187,41 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('appNSGName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "NSG for App Subnet. By default, intra Vnet traffic is allowed and requests from internet are denied", "tags": { "displayName": "App NSG", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { - "securityRules": [ - ] + "securityRules": [] } }, { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('databaseNSGName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "NSG for Database Subnet. By default, intra Vnet traffic is allowed and requests from internet are denied", "tags": { "displayName": "Database NSG", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { - "securityRules": [ - ] + "securityRules": [] } }, { "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('jumpNSGName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "NSG for Jump Subnet. Rules for allowing SSH from internet are created", "tags": { "displayName": "Jump NSG", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { @@ -245,11 +246,11 @@ "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('jumpIPAddressName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": " Public IP used by the Jump VM", "tags": { "displayName": "Jump VM Public IP", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { @@ -264,11 +265,11 @@ "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('weblbIPAddressName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Public IP used by the Web Server Load Balancer", "tags": { "displayName": "Web LB Public IP", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "properties": { @@ -283,11 +284,11 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Virtual network for overall solution", "tags": { "displayName": "Virtual Network", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ @@ -346,30 +347,28 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[concat(variables('availSetName'), copyindex(1))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "These are the Availability Sets for Web VMs, App VMs and Database VMs", "tags": { "displayName": "Availability Sets", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "copy": { "name": "availSetLoop", "count": 3 }, - "properties": { - - } + "properties": {} }, { "type": "Microsoft.Network/loadBalancers", "name": "[variables('webLoadBalancerName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This Load Balancer is used to load balance Web traffic among Web Tier VMs", "tags": { "displayName": "External Load Balancer", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ @@ -457,11 +456,11 @@ "type": "Microsoft.Network/loadBalancers", "name": "[variables('internalLoadBalancerName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "This Internal Load Balancer is used to load balance traffic from Web VM's to Bussiness Tier VMs", "tags": { "displayName": "Internal Load Balancer", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ @@ -520,11 +519,11 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('webTierVmNicName'), copyindex(1))]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "NICs for Web Tier VMs", "tags": { "displayName": "Web Tier VM NICs", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ @@ -558,11 +557,11 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('appTierVmNicName'), copyindex(1))]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "NICs for App Tier VMs", "tags": { "displayName": "App Tier VM NICs", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ @@ -596,11 +595,11 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('databaseTierVmNicName'), copyindex(1))]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "NICs for Database Tier VMs", "tags": { "displayName": "Database Tier VM NICs", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ @@ -628,11 +627,11 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[variables('jumpVmNicName')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "NIC for Jump VM", "tags": { "displayName": "Jump VM NIC", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ @@ -659,11 +658,11 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('webTierVmName'),'-', copyindex(1))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": " Web Tier VMs", "tags": { "displayName": "Web Tier VMs", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ @@ -722,11 +721,11 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('appTierVmName'),'-', copyindex(1))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": " App Tier VMs", "tags": { "displayName": "App Tier VMs", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ @@ -785,11 +784,11 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('databaseTierVmName'),'-', copyindex(1))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Database Tier VMs", "tags": { "displayName": "Database Tier VMs", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ @@ -848,11 +847,11 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[variables('jumpVmName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "comments": "Jump VM", "tags": { "displayName": "Jump VM", - "quickstartName": "[variables('quickstartTags').name]", + "quickstartName": "[variables('quickstartTags').name]", "provider": "[variables('redHatTags').provider]" }, "dependsOn": [ diff --git a/sap-2-tier-marketplace-image-md/azuredeploy.json b/sap-2-tier-marketplace-image-md/azuredeploy.json index a7cb327ddfac..21927947e4fe 100644 --- a/sap-2-tier-marketplace-image-md/azuredeploy.json +++ b/sap-2-tier-marketplace-image-md/azuredeploy.json @@ -71,6 +71,13 @@ "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": { @@ -357,7 +364,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameVnet'))]", "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameNIC'))]", @@ -451,4 +458,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-marketplace-image-md/shared/newnsg.json b/sap-2-tier-marketplace-image-md/shared/newnsg.json index 07f71e49f4ae..a4dc17d062e5 100644 --- a/sap-2-tier-marketplace-image-md/shared/newnsg.json +++ b/sap-2-tier-marketplace-image-md/shared/newnsg.json @@ -10,10 +10,20 @@ }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -58,7 +68,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('nsgName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": "[variables('selectedSecurityRules')]" } diff --git a/sap-2-tier-marketplace-image-md/shared/newpip.json b/sap-2-tier-marketplace-image-md/shared/newpip.json index 52fdf2eccd12..07cd7b3f655f 100644 --- a/sap-2-tier-marketplace-image-md/shared/newpip.json +++ b/sap-2-tier-marketplace-image-md/shared/newpip.json @@ -13,19 +13,25 @@ "metadata": { "description": "Type of the public IP address, static or dynamic" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIpName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-marketplace-image-md/shared/newvnet.json b/sap-2-tier-marketplace-image-md/shared/newvnet.json index 42704f16d8ed..bea4086c95f9 100644 --- a/sap-2-tier-marketplace-image-md/shared/newvnet.json +++ b/sap-2-tier-marketplace-image-md/shared/newvnet.json @@ -25,17 +25,22 @@ "metadata": { "description": "IP Address prefix of the Virtual Network Subnet." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ - { "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -53,4 +58,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-marketplace-image-md/shared/nic-config.json b/sap-2-tier-marketplace-image-md/shared/nic-config.json index ab7c369d31b3..fd5a0c945ad8 100644 --- a/sap-2-tier-marketplace-image-md/shared/nic-config.json +++ b/sap-2-tier-marketplace-image-md/shared/nic-config.json @@ -36,6 +36,13 @@ "metadata": { "description": "The id of the subnet you want to use." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -61,12 +68,11 @@ }, "selectedConfiguration": "[variables('nicConfigurations')[string(equals(length(parameters('subnetId')), 0))]]" }, - "resources": [ - ], + "resources": [], "outputs": { "selectedConfiguration": { "value": "[variables('selectedConfiguration')]", "type": "object" } } -} \ No newline at end of file +} diff --git a/sap-2-tier-marketplace-image-md/shared/os-disk-parts-md.json b/sap-2-tier-marketplace-image-md/shared/os-disk-parts-md.json index d26899e2f38e..7c40cc9b7ef1 100644 --- a/sap-2-tier-marketplace-image-md/shared/os-disk-parts-md.json +++ b/sap-2-tier-marketplace-image-md/shared/os-disk-parts-md.json @@ -29,14 +29,21 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } @@ -60,11 +67,18 @@ "metadata": { "description": "Id of the managed disk." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "osDiskCaching": "ReadWrite", - "osDiskParts": { + "osDiskParts": { "image": { "imageReference": { "publisher": "[parameters('imagePublisher')]", diff --git a/sap-2-tier-marketplace-image-md/shared/server-md.json b/sap-2-tier-marketplace-image-md/shared/server-md.json index d74b9812955f..9eccbad557e6 100644 --- a/sap-2-tier-marketplace-image-md/shared/server-md.json +++ b/sap-2-tier-marketplace-image-md/shared/server-md.json @@ -72,7 +72,7 @@ "metadata": { "description": "Availability set." } - }, + }, "useAVSet": { "type": "bool", "defaultValue": false, @@ -97,12 +97,19 @@ "metadata": { "description": "URL to github templates." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "availableAVSetObj": { - "true": "[parameters('avSetObj')]", - "false": null + "true": "[parameters('avSetObj')]", + "false": null }, "internalAVSetObj": "[variables('availableAVSetObj')[toLower(string(parameters('useAVSet')))]]", "csExtension": { @@ -178,14 +185,14 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', variables('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -203,4 +210,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-marketplace-image/azuredeploy.json b/sap-2-tier-marketplace-image/azuredeploy.json index 495d6bd01a32..e0e698e612c2 100644 --- a/sap-2-tier-marketplace-image/azuredeploy.json +++ b/sap-2-tier-marketplace-image/azuredeploy.json @@ -78,6 +78,13 @@ "metadata": { "description": "The id of the subnet you want to use." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -215,7 +222,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('internalStorageType')]" } @@ -369,7 +376,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameVnet'))]", "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameNIC'))]", @@ -443,7 +450,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/', variables('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentName'))]" ], @@ -461,4 +468,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-marketplace-image/shared/cs-server-Standard_D11_multiNIC_No.json b/sap-2-tier-marketplace-image/shared/cs-server-Standard_D11_multiNIC_No.json index d11833cd6904..5b8b32fb29ae 100644 --- a/sap-2-tier-marketplace-image/shared/cs-server-Standard_D11_multiNIC_No.json +++ b/sap-2-tier-marketplace-image/shared/cs-server-Standard_D11_multiNIC_No.json @@ -16,7 +16,11 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } @@ -62,11 +66,16 @@ "metadata": { "description": "Name of the network interface." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "osDiskName": "[concat(parameters('sidlower'),'-os.vhd')]", - "osDiskCaching": "ReadWrite", "dataDisks": [ { "name": "dbdisk1", @@ -134,7 +143,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "userImage": { "hardwareProfile": "[variables('hardwareProfile')]", "osProfile": { @@ -148,7 +156,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "osdisk": { "hardwareProfile": "[variables('hardwareProfile')]", "storageProfile": { @@ -159,14 +166,13 @@ } }, "internalProperties": "[variables('availableProperties')[parameters('osDiskType')]]" - }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" } ], diff --git a/sap-2-tier-marketplace-image/shared/cs-server-Standard_D13_multiNIC_No.json b/sap-2-tier-marketplace-image/shared/cs-server-Standard_D13_multiNIC_No.json index 1274c3d6cec6..a74c23f696f1 100644 --- a/sap-2-tier-marketplace-image/shared/cs-server-Standard_D13_multiNIC_No.json +++ b/sap-2-tier-marketplace-image/shared/cs-server-Standard_D13_multiNIC_No.json @@ -16,7 +16,11 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } @@ -62,11 +66,16 @@ "metadata": { "description": "Name of the network interface." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "osDiskName": "[concat(parameters('sidlower'),'-os.vhd')]", - "osDiskCaching": "ReadWrite", "dataDisks": [ { "name": "dbdisk1", @@ -254,7 +263,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "userImage": { "hardwareProfile": "[variables('hardwareProfile')]", "osProfile": { @@ -268,7 +276,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "osdisk": { "hardwareProfile": "[variables('hardwareProfile')]", "storageProfile": { @@ -279,14 +286,13 @@ } }, "internalProperties": "[variables('availableProperties')[parameters('osDiskType')]]" - }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" } ], diff --git a/sap-2-tier-marketplace-image/shared/cs-server-Standard_D14_multiNIC_No.json b/sap-2-tier-marketplace-image/shared/cs-server-Standard_D14_multiNIC_No.json index 443ec2ddc01e..de735d68fecb 100644 --- a/sap-2-tier-marketplace-image/shared/cs-server-Standard_D14_multiNIC_No.json +++ b/sap-2-tier-marketplace-image/shared/cs-server-Standard_D14_multiNIC_No.json @@ -16,7 +16,11 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } @@ -62,11 +66,16 @@ "metadata": { "description": "Name of the network interface." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "osDiskName": "[concat(parameters('sidlower'),'-os.vhd')]", - "osDiskCaching": "ReadWrite", "dataDisks": [ { "name": "dbdisk1", @@ -414,7 +423,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "userImage": { "hardwareProfile": "[variables('hardwareProfile')]", "osProfile": { @@ -428,7 +436,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "osdisk": { "hardwareProfile": "[variables('hardwareProfile')]", "storageProfile": { @@ -439,14 +446,13 @@ } }, "internalProperties": "[variables('availableProperties')[parameters('osDiskType')]]" - }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" } ], diff --git a/sap-2-tier-marketplace-image/shared/cs-server-Standard_DS11_multiNIC_No.json b/sap-2-tier-marketplace-image/shared/cs-server-Standard_DS11_multiNIC_No.json index 81fff6a9fcd8..3f147cd5d979 100644 --- a/sap-2-tier-marketplace-image/shared/cs-server-Standard_DS11_multiNIC_No.json +++ b/sap-2-tier-marketplace-image/shared/cs-server-Standard_DS11_multiNIC_No.json @@ -16,7 +16,11 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } @@ -62,11 +66,16 @@ "metadata": { "description": "Name of the network interface." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "osDiskName": "[concat(parameters('sidlower'),'-os.vhd')]", - "osDiskCaching": "ReadWrite", "dataDisks": [ { "name": "dbdisk1", @@ -124,7 +133,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "userImage": { "hardwareProfile": "[variables('hardwareProfile')]", "osProfile": { @@ -138,7 +146,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "osdisk": { "hardwareProfile": "[variables('hardwareProfile')]", "storageProfile": { @@ -149,14 +156,13 @@ } }, "internalProperties": "[variables('availableProperties')[parameters('osDiskType')]]" - }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" } ], diff --git a/sap-2-tier-marketplace-image/shared/cs-server-Standard_DS13_multiNIC_No.json b/sap-2-tier-marketplace-image/shared/cs-server-Standard_DS13_multiNIC_No.json index 5f9601473a52..adc3f5f602ea 100644 --- a/sap-2-tier-marketplace-image/shared/cs-server-Standard_DS13_multiNIC_No.json +++ b/sap-2-tier-marketplace-image/shared/cs-server-Standard_DS13_multiNIC_No.json @@ -16,7 +16,11 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } @@ -62,11 +66,16 @@ "metadata": { "description": "Name of the network interface." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "osDiskName": "[concat(parameters('sidlower'),'-os.vhd')]", - "osDiskCaching": "ReadWrite", "dataDisks": [ { "name": "dbdisk1", @@ -134,7 +143,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "userImage": { "hardwareProfile": "[variables('hardwareProfile')]", "osProfile": { @@ -148,7 +156,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "osdisk": { "hardwareProfile": "[variables('hardwareProfile')]", "storageProfile": { @@ -159,14 +166,13 @@ } }, "internalProperties": "[variables('availableProperties')[parameters('osDiskType')]]" - }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" } ], diff --git a/sap-2-tier-marketplace-image/shared/cs-server-Standard_DS14_multiNIC_No.json b/sap-2-tier-marketplace-image/shared/cs-server-Standard_DS14_multiNIC_No.json index 0a8bf4407e66..455f060252ba 100644 --- a/sap-2-tier-marketplace-image/shared/cs-server-Standard_DS14_multiNIC_No.json +++ b/sap-2-tier-marketplace-image/shared/cs-server-Standard_DS14_multiNIC_No.json @@ -16,7 +16,11 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } @@ -62,11 +66,16 @@ "metadata": { "description": "Name of the network interface." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "osDiskName": "[concat(parameters('sidlower'),'-os.vhd')]", - "osDiskCaching": "ReadWrite", "dataDisks": [ { "name": "dbdisk1", @@ -134,7 +143,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "userImage": { "hardwareProfile": "[variables('hardwareProfile')]", "osProfile": { @@ -148,7 +156,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "osdisk": { "hardwareProfile": "[variables('hardwareProfile')]", "storageProfile": { @@ -159,14 +166,13 @@ } }, "internalProperties": "[variables('availableProperties')[parameters('osDiskType')]]" - }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" } ], diff --git a/sap-2-tier-marketplace-image/shared/cs-server-Standard_GS5_multiNIC_No.json b/sap-2-tier-marketplace-image/shared/cs-server-Standard_GS5_multiNIC_No.json index 63236d795540..fb07a43aaf24 100644 --- a/sap-2-tier-marketplace-image/shared/cs-server-Standard_GS5_multiNIC_No.json +++ b/sap-2-tier-marketplace-image/shared/cs-server-Standard_GS5_multiNIC_No.json @@ -16,7 +16,11 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } @@ -62,11 +66,16 @@ "metadata": { "description": "Name of the network interface." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "osDiskName": "[concat(parameters('sidlower'),'-os.vhd')]", - "osDiskCaching": "ReadWrite", "dataDisks": [ { "name": "dbdisk1", @@ -144,7 +153,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "userImage": { "hardwareProfile": "[variables('hardwareProfile')]", "osProfile": { @@ -158,7 +166,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "osdisk": { "hardwareProfile": "[variables('hardwareProfile')]", "storageProfile": { @@ -175,7 +182,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" } ], diff --git a/sap-2-tier-marketplace-image/shared/db-server-Standard_GS2_multiNIC_No.json b/sap-2-tier-marketplace-image/shared/db-server-Standard_GS2_multiNIC_No.json index 40c89025a15f..812d733e80be 100644 --- a/sap-2-tier-marketplace-image/shared/db-server-Standard_GS2_multiNIC_No.json +++ b/sap-2-tier-marketplace-image/shared/db-server-Standard_GS2_multiNIC_No.json @@ -16,7 +16,11 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } @@ -98,6 +102,13 @@ "metadata": { "description": "Name of the network interface." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -183,7 +194,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "userImage": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" @@ -200,7 +210,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "osdisk": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" @@ -220,14 +229,14 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', parameters('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -237,7 +246,9 @@ "typeHandlerVersion": "[parameters('cseExtVersion')]", "autoUpgradeMinorVersion": true, "settings": { - "fileUris": [ "[parameters('csExtensionScript')]" ], + "fileUris": [ + "[parameters('csExtensionScript')]" + ], "commandToExecute": "[concat(parameters('csExtensionscriptCall'), ' -DBDataLUNS \"', variables('dbDataLUNs'), '\" -DBLogLUNS \"', variables('dbLogLUNs'), '\"')]" } } diff --git a/sap-2-tier-marketplace-image/shared/db-server-Standard_GS3_multiNIC_No.json b/sap-2-tier-marketplace-image/shared/db-server-Standard_GS3_multiNIC_No.json index dd80ac2d0b99..9d8acc8ee4f9 100644 --- a/sap-2-tier-marketplace-image/shared/db-server-Standard_GS3_multiNIC_No.json +++ b/sap-2-tier-marketplace-image/shared/db-server-Standard_GS3_multiNIC_No.json @@ -16,7 +16,11 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } @@ -98,6 +102,13 @@ "metadata": { "description": "Name of the network interface." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -203,7 +214,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "userImage": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" @@ -220,7 +230,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "osdisk": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" @@ -240,14 +249,14 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', parameters('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -257,7 +266,9 @@ "typeHandlerVersion": "[parameters('cseExtVersion')]", "autoUpgradeMinorVersion": true, "settings": { - "fileUris": [ "[parameters('csExtensionScript')]" ], + "fileUris": [ + "[parameters('csExtensionScript')]" + ], "commandToExecute": "[concat(parameters('csExtensionscriptCall'), ' -DBDataLUNS \"', variables('dbDataLUNs'), '\" -DBLogLUNS \"', variables('dbLogLUNs'), '\"')]" } } diff --git a/sap-2-tier-marketplace-image/shared/db-server-Standard_GS4_multiNIC_No.json b/sap-2-tier-marketplace-image/shared/db-server-Standard_GS4_multiNIC_No.json index d7a075fbed2b..5420e5637ead 100644 --- a/sap-2-tier-marketplace-image/shared/db-server-Standard_GS4_multiNIC_No.json +++ b/sap-2-tier-marketplace-image/shared/db-server-Standard_GS4_multiNIC_No.json @@ -16,7 +16,11 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } @@ -98,6 +102,13 @@ "metadata": { "description": "Name of the network interface." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -193,7 +204,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "userImage": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" @@ -210,7 +220,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "osdisk": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" @@ -230,14 +239,14 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', parameters('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -247,7 +256,9 @@ "typeHandlerVersion": "[parameters('cseExtVersion')]", "autoUpgradeMinorVersion": true, "settings": { - "fileUris": [ "[parameters('csExtensionScript')]" ], + "fileUris": [ + "[parameters('csExtensionScript')]" + ], "commandToExecute": "[concat(parameters('csExtensionscriptCall'), ' -DBDataLUNS \"', variables('dbDataLUNs'), '\" -DBLogLUNS \"', variables('dbLogLUNs'), '\"')]" } } diff --git a/sap-2-tier-marketplace-image/shared/db-server-Standard_GS5_multiNIC_No.json b/sap-2-tier-marketplace-image/shared/db-server-Standard_GS5_multiNIC_No.json index 9dd52224003f..71365d347817 100644 --- a/sap-2-tier-marketplace-image/shared/db-server-Standard_GS5_multiNIC_No.json +++ b/sap-2-tier-marketplace-image/shared/db-server-Standard_GS5_multiNIC_No.json @@ -16,7 +16,11 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } @@ -98,6 +102,13 @@ "metadata": { "description": "Name of the network interface." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -203,7 +214,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "userImage": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" @@ -220,7 +230,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "osdisk": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" @@ -240,14 +249,14 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', parameters('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -257,7 +266,9 @@ "typeHandlerVersion": "[parameters('cseExtVersion')]", "autoUpgradeMinorVersion": true, "settings": { - "fileUris": [ "[parameters('csExtensionScript')]" ], + "fileUris": [ + "[parameters('csExtensionScript')]" + ], "commandToExecute": "[concat(parameters('csExtensionscriptCall'), ' -DBDataLUNS \"', variables('dbDataLUNs'), '\" -DBLogLUNS \"', variables('dbLogLUNs'), '\"')]" } } diff --git a/sap-2-tier-marketplace-image/shared/disks.json b/sap-2-tier-marketplace-image/shared/disks.json index 6883447e9f86..100ae62c5dce 100644 --- a/sap-2-tier-marketplace-image/shared/disks.json +++ b/sap-2-tier-marketplace-image/shared/disks.json @@ -1,43 +1,50 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "diskName": { - "type": "string" - }, - "diskLun": { - "type": "int" - }, - "diskSize": { - "type": "int" - }, - "storageAccountName": { - "type": "string" - }, - "diskArray": { - "type": "array", - "defaultValue": [] - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "diskName": { + "type": "string" + }, + "diskLun": { + "type": "int" }, - "variables": { - "a": [ - { - "name": "[parameters('diskName')]", - "lun": "[parameters('diskLun')]", - "vhd": { - "uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/', concat('vhds-', uniqueString(resourceGroup().id)), '/', parameters('diskName'), '.vhd')]" - }, - "createOption": "Empty", - "caching": "None", - "diskSizeGB": "[parameters('diskSize')]" - } - ] + "diskSize": { + "type": "int" }, - "resources": [], - "outputs": { - "diskArray": { - "value": "[concat(parameters('diskArray'), variables('a'))]", - "type": "array" - } + "storageAccountName": { + "type": "string" + }, + "diskArray": { + "type": "array", + "defaultValue": [] + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "a": [ + { + "name": "[parameters('diskName')]", + "lun": "[parameters('diskLun')]", + "vhd": { + "uri": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/', concat('vhds-', uniqueString(resourceGroup().id)), '/', parameters('diskName'), '.vhd')]" + }, + "createOption": "Empty", + "caching": "None", + "diskSizeGB": "[parameters('diskSize')]" + } + ] + }, + "resources": [], + "outputs": { + "diskArray": { + "value": "[concat(parameters('diskArray'), variables('a'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-2-tier-marketplace-image/shared/disks0.json b/sap-2-tier-marketplace-image/shared/disks0.json index 0d2e1b6b59f0..485a7248dc6f 100644 --- a/sap-2-tier-marketplace-image/shared/disks0.json +++ b/sap-2-tier-marketplace-image/shared/disks0.json @@ -1,30 +1,37 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "diskName": { - "type": "string" - }, - "diskLun": { - "type": "int" - }, - "diskSize": { - "type": "int" - }, - "storageAccountName": { - "type": "string" - }, - "diskArray": { - "type": "array", - "defaultValue": [] - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "diskName": { + "type": "string" }, - "variables": {}, - "resources": [], - "outputs": { - "diskArray": { - "value": [], - "type": "array" - } + "diskLun": { + "type": "int" + }, + "diskSize": { + "type": "int" + }, + "storageAccountName": { + "type": "string" + }, + "diskArray": { + "type": "array", + "defaultValue": [] + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "diskArray": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-2-tier-marketplace-image/shared/existingnsg.json b/sap-2-tier-marketplace-image/shared/existingnsg.json index 5c1e8d5c030b..effedd4ccb66 100644 --- a/sap-2-tier-marketplace-image/shared/existingnsg.json +++ b/sap-2-tier-marketplace-image/shared/existingnsg.json @@ -10,14 +10,22 @@ }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, - "resources": [ - ] + "variables": {}, + "resources": [] } diff --git a/sap-2-tier-marketplace-image/shared/existingpip.json b/sap-2-tier-marketplace-image/shared/existingpip.json index e1c622e4d6e6..fdb73a0341f8 100644 --- a/sap-2-tier-marketplace-image/shared/existingpip.json +++ b/sap-2-tier-marketplace-image/shared/existingpip.json @@ -13,12 +13,15 @@ "metadata": { "description": "Type of the public IP address, static or dynamic" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - "apiVerion": "2015-06-15", - "apiVerionRm": "2015-01-01" - }, - "resources": [ - ] -} \ No newline at end of file + "variables": {}, + "resources": [] +} diff --git a/sap-2-tier-marketplace-image/shared/existingvnet.json b/sap-2-tier-marketplace-image/shared/existingvnet.json index 753b439c26fa..2a32b23ac755 100644 --- a/sap-2-tier-marketplace-image/shared/existingvnet.json +++ b/sap-2-tier-marketplace-image/shared/existingvnet.json @@ -25,10 +25,15 @@ "metadata": { "description": "IP Address prefix of the Virtual Network Subnet." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, - "resources": [ - ] -} \ No newline at end of file + "variables": {}, + "resources": [] +} diff --git a/sap-2-tier-marketplace-image/shared/existingvnetnsg.json b/sap-2-tier-marketplace-image/shared/existingvnetnsg.json index a97f487c00de..d94a9f1b34c4 100644 --- a/sap-2-tier-marketplace-image/shared/existingvnetnsg.json +++ b/sap-2-tier-marketplace-image/shared/existingvnetnsg.json @@ -31,10 +31,15 @@ "metadata": { "description": "Name of the Network Security Group." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, - "resources": [ - ] -} \ No newline at end of file + "variables": {}, + "resources": [] +} diff --git a/sap-2-tier-marketplace-image/shared/lb-DB-HANA.json b/sap-2-tier-marketplace-image/shared/lb-DB-HANA.json index 3e2fb7cd09de..a57c5a6f769d 100644 --- a/sap-2-tier-marketplace-image/shared/lb-DB-HANA.json +++ b/sap-2-tier-marketplace-image/shared/lb-DB-HANA.json @@ -1,165 +1,171 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } }, - "variables": { - "apiVerion": "2015-06-15", - "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", - "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", - "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", - "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", - "idleTimeoutInMinutesDB": 30, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendDB')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolDB')]" - } - ], - "loadBalancingRulesResult": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", - "backendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '15')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", - "backendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '17')]" - } - ], - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalDB')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortDB')]" - } - ] + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", + "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", + "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", + "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", + "idleTimeoutInMinutesDB": 30, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendDB')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolDB')]" + } + ], + "loadBalancingRulesResult": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", + "backendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '15')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", + "backendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '17')]" + } + ], + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalDB')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortDB')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-2-tier-marketplace-image/shared/lb-DB-SQL.json b/sap-2-tier-marketplace-image/shared/lb-DB-SQL.json index c22d99e8a46a..8cabfc983f64 100644 --- a/sap-2-tier-marketplace-image/shared/lb-DB-SQL.json +++ b/sap-2-tier-marketplace-image/shared/lb-DB-SQL.json @@ -1,146 +1,152 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": { - "apiVerion": "2015-06-15", - "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", - "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", - "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", - "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", - "idleTimeoutInMinutesDB": 30, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendDB')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolDB')]" - } - ], - "loadBalancingRulesResult": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": 1433, - "backendPort": 1433, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '1433')]" - } - ], - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalDB')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortDB')]" - } - ] + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", + "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", + "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", + "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", + "idleTimeoutInMinutesDB": 30, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendDB')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolDB')]" + } + ], + "loadBalancingRulesResult": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": 1433, + "backendPort": 1433, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '1433')]" + } + ], + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalDB')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortDB')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-2-tier-marketplace-image/shared/lb-DB0.json b/sap-2-tier-marketplace-image/shared/lb-DB0.json index c7448bf65245..4c44e52542b6 100644 --- a/sap-2-tier-marketplace-image/shared/lb-DB0.json +++ b/sap-2-tier-marketplace-image/shared/lb-DB0.json @@ -1,84 +1,91 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": [], - "type": "array" - }, - "frontendIPConfigurations": { - "value": [], - "type": "array" - }, - "backendAddressPools": { - "value": [], - "type": "array" - }, - "loadBalancingRules": { - "value": [], - "type": "array" - }, - "probes": { - "value": [], - "type": "array" - } + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": [], + "type": "array" + }, + "frontendIPConfigurations": { + "value": [], + "type": "array" + }, + "backendAddressPools": { + "value": [], + "type": "array" + }, + "loadBalancingRules": { + "value": [], + "type": "array" + }, + "probes": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-2-tier-marketplace-image/shared/lb-ERS-Linux.json b/sap-2-tier-marketplace-image/shared/lb-ERS-Linux.json index bde54ca5dedb..310d42bfddc9 100644 --- a/sap-2-tier-marketplace-image/shared/lb-ERS-Linux.json +++ b/sap-2-tier-marketplace-image/shared/lb-ERS-Linux.json @@ -1,301 +1,306 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolERS": "[concat(variables('lbPrefix'), 'BackendPoolERS')]", + "loadBalancerFrontendERS": "[concat(variables('lbPrefix'), 'FrontendERS')]", + "lbProbePortERS": "[concat(variables('lbPrefix'), 'ProbePortERS')]", + "lbProbePortInternalERS": "[add(62100, parameters('ersASCSInstanceNumber'))]", + "idleTimeoutInMinutesERS": 30, + "loadBalancingRulesASCS": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", + "backendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRulesSCS": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", + "backendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } - }, - "variables": { - "apiVerion": "2015-06-15", - "lbPrefix": "[concat('lb', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolERS": "[concat(variables('lbPrefix'), 'BackendPoolERS')]", - "loadBalancerFrontendERS": "[concat(variables('lbPrefix'), 'FrontendERS')]", - "lbProbePortERS": "[concat(variables('lbPrefix'), 'ProbePortERS')]", - "lbProbePortInternalERS": "[add(62100, parameters('ersASCSInstanceNumber'))]", - "idleTimeoutInMinutesERS": 30, - "loadBalancingRulesASCS": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", - "backendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRulesSCS": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", - "backendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRules": { - "ABAP": "[variables('loadBalancingRulesASCS')]", - "JAVA": "[variables('loadBalancingRulesSCS')]", - "ABAP+JAVA": "[concat(variables('loadBalancingRulesASCS'), variables('loadBalancingRulesSCS'))]" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendERS')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolERS')]" - } - ], - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalERS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortERS')]" - } - ] + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRules": { + "ABAP": "[variables('loadBalancingRulesASCS')]", + "JAVA": "[variables('loadBalancingRulesSCS')]", + "ABAP+JAVA": "[concat(variables('loadBalancingRulesASCS'), variables('loadBalancingRulesSCS'))]" }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendERS')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolERS')]" + } + ], + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalERS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" - }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortERS')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-2-tier-marketplace-image/shared/lb-ERS-Windows.json b/sap-2-tier-marketplace-image/shared/lb-ERS-Windows.json index 31f5e9ffcc7a..2ff354045b0a 100644 --- a/sap-2-tier-marketplace-image/shared/lb-ERS-Windows.json +++ b/sap-2-tier-marketplace-image/shared/lb-ERS-Windows.json @@ -1,97 +1,104 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } - }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[parameters('nicBackAddressPoolsArray')]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[parameters('frontendIPConfigurationsArray')]", - "type": "array" - }, - "backendAddressPools": { - "value": "[parameters('backendAddressPoolsArray')]", - "type": "array" - }, - "loadBalancingRules": { - "value": "[parameters('loadBalancingRulesArray')]", - "type": "array" - }, - "probes": { - "value": "[parameters('probesArray')]", - "type": "array" - } + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[parameters('nicBackAddressPoolsArray')]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[parameters('frontendIPConfigurationsArray')]", + "type": "array" + }, + "backendAddressPools": { + "value": "[parameters('backendAddressPoolsArray')]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[parameters('loadBalancingRulesArray')]", + "type": "array" + }, + "probes": { + "value": "[parameters('probesArray')]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-2-tier-marketplace-image/shared/lb-ERS0.json b/sap-2-tier-marketplace-image/shared/lb-ERS0.json index dad91bc38e71..aa8a93e20eb5 100644 --- a/sap-2-tier-marketplace-image/shared/lb-ERS0.json +++ b/sap-2-tier-marketplace-image/shared/lb-ERS0.json @@ -1,97 +1,104 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } - }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": [], - "type": "array" - }, - "frontendIPConfigurations": { - "value": [], - "type": "array" - }, - "backendAddressPools": { - "value": [], - "type": "array" - }, - "loadBalancingRules": { - "value": [], - "type": "array" - }, - "probes": { - "value": [], - "type": "array" - } + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": [], + "type": "array" + }, + "frontendIPConfigurations": { + "value": [], + "type": "array" + }, + "backendAddressPools": { + "value": [], + "type": "array" + }, + "loadBalancingRules": { + "value": [], + "type": "array" + }, + "probes": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-2-tier-marketplace-image/shared/lb-SCS.json b/sap-2-tier-marketplace-image/shared/lb-SCS.json index b7dc3db775c9..a3acfd5a9802 100644 --- a/sap-2-tier-marketplace-image/shared/lb-SCS.json +++ b/sap-2-tier-marketplace-image/shared/lb-SCS.json @@ -1,463 +1,469 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "metadata": { + "description": "The type of the Operating System" + } + }, + "ascsInstanceNumber": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The instance number of the ASCS." + } + }, + "scsInstanceNumber": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance number of the SCS." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolxSCS": "[concat(variables('lbPrefix'), 'BackendPoolxSCS')]", + "loadBalancerFrontendxSCS": "[concat(variables('lbPrefix'), 'FrontendxSCS')]", + "lbProbePortxSCS": "[concat(variables('lbPrefix'), 'ProbePortxSCS')]", + "lbProbePortInternalxSCS": "[add(62000, parameters('ascsInstanceNumber'))]", + "idleTimeoutInMinutesxSCS": 30, + "lbRulesFileShare": { + "Linux": [], + "Windows": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": 445, + "backendPort": 445, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '445')]" }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": 5985, + "backendPort": 5985, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '5985')]" + } + ] + }, + "lbRulesABAP": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3200, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3200, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "osType": { - "type": "string", - "metadata": { - "description": "The type of the Operating System" - } + "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3600, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3600, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "ascsInstanceNumber": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The instance number of the ASCS." - } + "name": "[concat(variables('lbrulePrefix'), '36', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3900, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3900, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "scsInstanceNumber": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance number of the SCS." - } + "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(8100, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(8100, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } + "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '16')]" + } + ], + "lbRulesJAVA": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3200, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3200, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3300, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } - }, - "variables": { - "apiVerion": "2015-06-15", - "lbPrefix": "[concat('lb', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolxSCS": "[concat(variables('lbPrefix'), 'BackendPoolxSCS')]", - "loadBalancerFrontendxSCS": "[concat(variables('lbPrefix'), 'FrontendxSCS')]", - "lbProbePortxSCS": "[concat(variables('lbPrefix'), 'ProbePortxSCS')]", - "lbProbePortInternalxSCS": "[add(62000, parameters('ascsInstanceNumber'))]", - "idleTimeoutInMinutesxSCS": 30, - "lbRulesFileShare": { - "Linux": [], - "Windows": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": 445, - "backendPort": 445, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '445')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": 5985, - "backendPort": 5985, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5985')]" - } - ] + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3900, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3900, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "lbRulesABAP": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3200, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3200, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3600, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3600, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '36', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3900, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3900, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(8100, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(8100, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '16')]" - } - ], - "lbRulesJAVA": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3200, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3200, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3300, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3900, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3900, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(8100, parameters('scsInstanceNumber'))]", - "backendPort": "[add(8100, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRules": { - "ABAP": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'))]", - "JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesJAVA'))]", - "ABAP+JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'), variables('lbRulesJAVA'))]" + "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(8100, parameters('scsInstanceNumber'))]", + "backendPort": "[add(8100, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendxSCS')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolxSCS')]" - } - ], - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalxSCS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortxSCS')]" - } - ] - }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRules": { + "ABAP": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'))]", + "JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesJAVA'))]", + "ABAP+JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'), variables('lbRulesJAVA'))]" + }, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('loadBalancerFrontendxSCS')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolxSCS')]" + } + ], + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalxSCS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "[variables('lbProbePortxSCS')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-2-tier-marketplace-image/shared/lb-SCS0.json b/sap-2-tier-marketplace-image/shared/lb-SCS0.json index cef2a2eacca2..be872832bb12 100644 --- a/sap-2-tier-marketplace-image/shared/lb-SCS0.json +++ b/sap-2-tier-marketplace-image/shared/lb-SCS0.json @@ -1,199 +1,210 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "osType": { - "type": "string", - "metadata": { - "description": "The type of the Operating System" - } - }, - "ascsInstanceNumber": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The instance number of the ASCS." - } - }, - "scsInstanceNumber": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance number of the SCS." - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "metadata": { + "description": "The type of the Operating System" + } + }, + "ascsInstanceNumber": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The instance number of the ASCS." + } + }, + "scsInstanceNumber": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance number of the SCS." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "lb", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "loadBalancerFrontendNFS": "[concat(variables('lbPrefix'), 'FrontendNFS')]", + "lbProbePortNFS": "[concat(variables('lbPrefix'), 'ProbePortNFS')]", + "backendPoolNFS": "[concat(variables('lbPrefix'), 'BackendPoolNFS')]", + "lbProbePortInternalNFS": 61000, + "idleTimeoutInMinutesNFS": 30, + "nicBackAddressPools": { + "Linux": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" } + ], + "Windows": [] }, - "variables": { - "lbPrefix": "lb", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "loadBalancerFrontendNFS": "[concat(variables('lbPrefix'), 'FrontendNFS')]", - "lbProbePortNFS": "[concat(variables('lbPrefix'), 'ProbePortNFS')]", - "backendPoolNFS": "[concat(variables('lbPrefix'), 'BackendPoolNFS')]", - "lbProbePortInternalNFS": 61000, - "idleTimeoutInMinutesNFS": 30, - "nicBackAddressPools": { - "Linux": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - } - ], - "Windows": [] - }, - "frontendIPConfigurations": { - "Linux": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendNFS')]" - } - ], - "Windows": [] - }, - "backendAddressPools": { - "Linux": [{ - "name": "[variables('backendPoolNFS')]" - }], - "Windows": [] - }, - "loadBalancingRules": { - "Linux": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" - }, - "protocol": "Tcp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '2049T')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" - }, - "protocol": "Udp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '2049U')]" - } - ], - "Windows": [] - }, - "probes": { - "Linux": [{ - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalNFS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortNFS')]" - }], - "Windows": [] - }, - "nicBackAddressPoolsResult": "[variables('nicBackAddressPools')[parameters('osType')]]", - "frontendIPConfigurationsResult": "[variables('frontendIPConfigurations')[parameters('osType')]]", - "backendAddressPoolsResult": "[variables('backendAddressPools')[parameters('osType')]]", - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('osType')]]", - "probesResult": "[variables('probes')[parameters('osType')]]" - }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[variables('nicBackAddressPoolsResult')]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[variables('frontendIPConfigurationsResult')]", - "type": "array" - }, - "backendAddressPools": { - "value": "[variables('backendAddressPoolsResult')]", - "type": "array" - }, - "loadBalancingRules": { - "value": "[variables('loadBalancingRulesResult')]", - "type": "array" - }, - "probes": { - "value": "[variables('probesResult')]", - "type": "array" + "frontendIPConfigurations": { + "Linux": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" + }, + "name": "[variables('loadBalancerFrontendNFS')]" } + ], + "Windows": [] + }, + "backendAddressPools": { + "Linux": [ + { + "name": "[variables('backendPoolNFS')]" + } + ], + "Windows": [] + }, + "loadBalancingRules": { + "Linux": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" + }, + "protocol": "Tcp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '2049T')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" + }, + "protocol": "Udp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '2049U')]" + } + ], + "Windows": [] + }, + "probes": { + "Linux": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalNFS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "[variables('lbProbePortNFS')]" + } + ], + "Windows": [] + }, + "nicBackAddressPoolsResult": "[variables('nicBackAddressPools')[parameters('osType')]]", + "frontendIPConfigurationsResult": "[variables('frontendIPConfigurations')[parameters('osType')]]", + "backendAddressPoolsResult": "[variables('backendAddressPools')[parameters('osType')]]", + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('osType')]]", + "probesResult": "[variables('probes')[parameters('osType')]]" + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[variables('nicBackAddressPoolsResult')]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[variables('frontendIPConfigurationsResult')]", + "type": "array" + }, + "backendAddressPools": { + "value": "[variables('backendAddressPoolsResult')]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[variables('loadBalancingRulesResult')]", + "type": "array" + }, + "probes": { + "value": "[variables('probesResult')]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-2-tier-marketplace-image/shared/loadbalancer.json b/sap-2-tier-marketplace-image/shared/loadbalancer.json index a5036969ad14..db90eead7481 100644 --- a/sap-2-tier-marketplace-image/shared/loadbalancer.json +++ b/sap-2-tier-marketplace-image/shared/loadbalancer.json @@ -61,11 +61,16 @@ "metadata": { "description": "The URL to github where the subtemplates are stored" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVerion": "2015-06-15", - "apiVersionDeployment": "2016-09-01", "ascsInstanceNumber": 0, "scsInstanceNumber": 1, "ersASCSInstanceNumber": 2, @@ -325,7 +330,7 @@ "ersLoop", "dbLoop" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "frontendIPConfigurations": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value)]", "backendAddressPools": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.backendAddressPools.value)]", @@ -340,4 +345,4 @@ "type": "array" } } -} \ No newline at end of file +} diff --git a/sap-2-tier-marketplace-image/shared/newnsg.json b/sap-2-tier-marketplace-image/shared/newnsg.json index 07f71e49f4ae..a4dc17d062e5 100644 --- a/sap-2-tier-marketplace-image/shared/newnsg.json +++ b/sap-2-tier-marketplace-image/shared/newnsg.json @@ -10,10 +10,20 @@ }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -58,7 +68,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('nsgName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": "[variables('selectedSecurityRules')]" } diff --git a/sap-2-tier-marketplace-image/shared/newpip.json b/sap-2-tier-marketplace-image/shared/newpip.json index bd986071aee1..07cd7b3f655f 100644 --- a/sap-2-tier-marketplace-image/shared/newpip.json +++ b/sap-2-tier-marketplace-image/shared/newpip.json @@ -13,21 +13,25 @@ "metadata": { "description": "Type of the public IP address, static or dynamic" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - "apiVerion": "2015-06-15", - "apiVerionRm": "2015-01-01" - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIpName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-marketplace-image/shared/newvnet.json b/sap-2-tier-marketplace-image/shared/newvnet.json index 3fb88b40b4f0..bea4086c95f9 100644 --- a/sap-2-tier-marketplace-image/shared/newvnet.json +++ b/sap-2-tier-marketplace-image/shared/newvnet.json @@ -25,18 +25,22 @@ "metadata": { "description": "IP Address prefix of the Virtual Network Subnet." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - "apiVerion": "2015-06-15", - "apiVerionRm": "2015-01-01" - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -54,4 +58,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-marketplace-image/shared/newvnetnsg.json b/sap-2-tier-marketplace-image/shared/newvnetnsg.json index 7d30e1b59604..1003d60a3611 100644 --- a/sap-2-tier-marketplace-image/shared/newvnetnsg.json +++ b/sap-2-tier-marketplace-image/shared/newvnetnsg.json @@ -31,18 +31,22 @@ "metadata": { "description": "Name of the Network Security Group." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - "apiVerion": "2015-06-15", - "apiVerionRm": "2015-01-01" - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -63,4 +67,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-marketplace-image/shared/nic-config.json b/sap-2-tier-marketplace-image/shared/nic-config.json index 7a530b3b9231..bd376a03e3d3 100644 --- a/sap-2-tier-marketplace-image/shared/nic-config.json +++ b/sap-2-tier-marketplace-image/shared/nic-config.json @@ -33,7 +33,10 @@ "newOrExistingSubnet": { "type": "string", "defaultValue": "new", - "allowedValues": [ "new", "existing" ], + "allowedValues": [ + "new", + "existing" + ], "metadata": { "description": "Determines whether a new virtual network and subnet should be created or an existing subnet should be used." } @@ -44,6 +47,13 @@ "metadata": { "description": "The id of the subnet you want to use." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -69,12 +79,11 @@ }, "selectedConfiguration": "[variables('nicConfigurations')[parameters('newOrExistingSubnet')]]" }, - "resources": [ - ], + "resources": [], "outputs": { "selectedConfiguration": { "value": "[variables('selectedConfiguration')]", "type": "object" } } -} \ No newline at end of file +} diff --git a/sap-2-tier-marketplace-image/shared/os-disk-parts-md.json b/sap-2-tier-marketplace-image/shared/os-disk-parts-md.json index b869f807c537..9bb632c646ca 100644 --- a/sap-2-tier-marketplace-image/shared/os-disk-parts-md.json +++ b/sap-2-tier-marketplace-image/shared/os-disk-parts-md.json @@ -29,14 +29,21 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } @@ -66,11 +73,18 @@ "metadata": { "description": "Id of the managed disk." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "osDiskCaching": "ReadWrite", - "osDiskParts": { + "osDiskParts": { "image": { "imageReference": { "publisher": "[parameters('imagePublisher')]", diff --git a/sap-2-tier-marketplace-image/shared/os-disk-parts.json b/sap-2-tier-marketplace-image/shared/os-disk-parts.json index 5f091ebbcff0..b01500da661c 100644 --- a/sap-2-tier-marketplace-image/shared/os-disk-parts.json +++ b/sap-2-tier-marketplace-image/shared/os-disk-parts.json @@ -47,14 +47,21 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } @@ -76,12 +83,18 @@ "metadata": { "description": "Name of the storage account where the os disk and data disk should be placed." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "osDiskName": "[concat(parameters('sidlower'),'-os.vhd')]", "osDiskCaching": "ReadWrite", - "resourceGroupLower":"[toLower(resourceGroup().name)]", "osDiskParts": { "image": { "imageReference": { @@ -128,7 +141,7 @@ } } }, - "resources": [ ], + "resources": [], "outputs": { "imageReference": { "value": "[variables('osDiskParts')[parameters('osDiskType')].imageReference]", diff --git a/sap-2-tier-marketplace-image/shared/server-Standard_multiNIC_No.json b/sap-2-tier-marketplace-image/shared/server-Standard_multiNIC_No.json index 0cfa35c3b7b7..167053604854 100644 --- a/sap-2-tier-marketplace-image/shared/server-Standard_multiNIC_No.json +++ b/sap-2-tier-marketplace-image/shared/server-Standard_multiNIC_No.json @@ -16,7 +16,11 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } @@ -98,6 +102,13 @@ "metadata": { "description": "Name of the network interface." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -175,7 +186,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "userImage": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" @@ -192,7 +202,6 @@ }, "networkProfile": "[variables('networkProfile')]" }, - "osdisk": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" @@ -212,14 +221,14 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', parameters('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -229,7 +238,9 @@ "typeHandlerVersion": "[parameters('cseExtVersion')]", "autoUpgradeMinorVersion": true, "settings": { - "fileUris": [ "[parameters('csExtensionScript')]" ], + "fileUris": [ + "[parameters('csExtensionScript')]" + ], "commandToExecute": "[concat(parameters('csExtensionscriptCall'), ' -DBDataLUNS \"', variables('dbDataLUNs'), '\" -DBLogLUNS \"', variables('dbLogLUNs'), '\" -DBDataName \"', variables('dbDataName'), '\" -DBLogName \"', variables('dbLogName'), '\"')]" } } diff --git a/sap-2-tier-marketplace-image/shared/server-md.json b/sap-2-tier-marketplace-image/shared/server-md.json index d74b9812955f..9eccbad557e6 100644 --- a/sap-2-tier-marketplace-image/shared/server-md.json +++ b/sap-2-tier-marketplace-image/shared/server-md.json @@ -72,7 +72,7 @@ "metadata": { "description": "Availability set." } - }, + }, "useAVSet": { "type": "bool", "defaultValue": false, @@ -97,12 +97,19 @@ "metadata": { "description": "URL to github templates." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "availableAVSetObj": { - "true": "[parameters('avSetObj')]", - "false": null + "true": "[parameters('avSetObj')]", + "false": null }, "internalAVSetObj": "[variables('availableAVSetObj')[toLower(string(parameters('useAVSet')))]]", "csExtension": { @@ -178,14 +185,14 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', variables('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -203,4 +210,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-marketplace-image/shared/server.json b/sap-2-tier-marketplace-image/shared/server.json index 93a23538d23e..547d2a179da9 100644 --- a/sap-2-tier-marketplace-image/shared/server.json +++ b/sap-2-tier-marketplace-image/shared/server.json @@ -123,24 +123,27 @@ "description": "Information about the data disks that the VM should have." } }, - "github" : { + "github": { "type": "string", "metadata": { "description": "URL to github templates." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "dbDataLUNs": "0,1,2,3", - "dbLogLUNs": "", - "dbDataName": "space", - "dbLogName": "", "nestedDeploymentNameDisk": "[concat('nestedTemplateDisks', parameters('vmName'))]", - "nestedDeploymentNameSub": "[concat('nestedTemplateVMSub', parameters('vmName'))]", - "diskCount" : "[length(parameters('dataDiskSizes'))]", + "nestedDeploymentNameSub": "[concat('nestedTemplateVMSub', parameters('vmName'))]", + "diskCount": "[length(parameters('dataDiskSizes'))]", "serverTemplates": { "true": "server2.json", - "false":"server2-noplan.json" + "false": "server2-noplan.json" }, "serverTemplate": "[variables('serverTemplates')[toLower(string(parameters('usePlanReference')))]]" }, diff --git a/sap-2-tier-marketplace-image/shared/server2-noplan.json b/sap-2-tier-marketplace-image/shared/server2-noplan.json index 28616d1ca701..edc07cc72050 100644 --- a/sap-2-tier-marketplace-image/shared/server2-noplan.json +++ b/sap-2-tier-marketplace-image/shared/server2-noplan.json @@ -1,219 +1,225 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "imageReference": { - "type": "object", - "metadata": { - "description": "imageReference object that should be used to create the virtual machine" - } - }, - "planReference": { - "type": "object", - "metadata": { - "description": "imageReference object that should be used to create the virtual machine" - } - }, - "osDisk": { - "type": "object", - "metadata": { - "description": "osDisk object that should be used to create the virtual machine" - } - }, - "osDiskType": { - "type": "string", - "allowedValues": [ - "image", - "userImage", - "osdisk" - ], - "metadata": { - "description": "The type of OS disk." - } - }, - "sidlower": { - "type": "string", - "metadata": { - "description": "SAP System ID in lower case." - } - }, - "vmName": { - "type": "string", - "metadata": { - "description": "Prefix of the virtual machine name." - } - }, - "vmSize": { - "type": "string", - "metadata": { - "description": "Size of the Virtual Machine." - } - }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "Username for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "cseExtPublisher": { - "type": "string", - "metadata": { - "description": "Publisher of the CustomScriptExtension." - } - }, - "cseExtName": { - "type": "string", - "metadata": { - "description": "Name of the CustomScriptExtension." - } - }, - "cseExtVersion": { - "type": "string", - "metadata": { - "description": "Version of the CustomScriptExtension." - } - }, - "csExtensionScript": { - "type": "string", - "metadata": { - "description": "Script that should be passed to the CustomScriptExtension." - } - }, - "csExtensionscriptCall": { - "type": "string", - "metadata": { - "description": "Script call that should be passed to the CustomScriptExtension." - } - }, - "avSetName": { - "type": "string", - "metadata": { - "description": "Name of the availability set." - } - }, - "storageAccountName": { - "type": "string", - "metadata": { - "description": "Name of the storage account where the os disk and data disk should be placed." - } - }, - "nicName": { - "type": "string", - "metadata": { - "description": "Name of the network interface." - } - }, - "dataDisks": { - "type": "array", - "metadata": { - "description": "Information about the data disks that the VM should have." - } - }, - "github": { - "type": "string", - "metadata": { - "description": "URL to github templates." - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "imageReference": { + "type": "object", + "metadata": { + "description": "imageReference object that should be used to create the virtual machine" + } }, - "variables": { - "dbDataLUNs": "0,1,2,3", - "dbLogLUNs": "", - "dbDataName": "space", - "dbLogName": "", - "diskCount": "[length(parameters('dataDisks'))]", - "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('nicName'))]" - } - ] - }, - "availableProperties": { - "image": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" - }, - "hardwareProfile": "[variables('hardwareProfile')]", - "osProfile": { - "computerName": "[parameters('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": "[parameters('imageReference')]", - "osDisk": "[parameters('osDisk')]", - "dataDisks": "[parameters('dataDisks')]" - }, - "networkProfile": "[variables('networkProfile')]" - }, - "userImage": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" - }, - "hardwareProfile": "[variables('hardwareProfile')]", - "osProfile": { - "computerName": "[parameters('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "osDisk": "[parameters('osDisk')]", - "dataDisks": "[parameters('dataDisks')]" - }, - "networkProfile": "[variables('networkProfile')]" - }, - "osdisk": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" - }, - "hardwareProfile": "[variables('hardwareProfile')]", - "storageProfile": { - "osDisk": "[parameters('osDisk')]", - "dataDisks": "[parameters('dataDisks')]" - }, - "networkProfile": "[variables('networkProfile')]" - } - }, - "internalProperties": "[variables('availableProperties')[parameters('osDiskType')]]" + "planReference": { + "type": "object", + "metadata": { + "description": "imageReference object that should be used to create the virtual machine" + } }, - "resources": [ - { - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('vmName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": "[variables('internalProperties')]" - }, + "osDisk": { + "type": "object", + "metadata": { + "description": "osDisk object that should be used to create the virtual machine" + } + }, + "osDiskType": { + "type": "string", + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], + "metadata": { + "description": "The type of OS disk." + } + }, + "sidlower": { + "type": "string", + "metadata": { + "description": "SAP System ID in lower case." + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Prefix of the virtual machine name." + } + }, + "vmSize": { + "type": "string", + "metadata": { + "description": "Size of the Virtual Machine." + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the Virtual Machine." + } + }, + "cseExtPublisher": { + "type": "string", + "metadata": { + "description": "Publisher of the CustomScriptExtension." + } + }, + "cseExtName": { + "type": "string", + "metadata": { + "description": "Name of the CustomScriptExtension." + } + }, + "cseExtVersion": { + "type": "string", + "metadata": { + "description": "Version of the CustomScriptExtension." + } + }, + "csExtensionScript": { + "type": "string", + "metadata": { + "description": "Script that should be passed to the CustomScriptExtension." + } + }, + "csExtensionscriptCall": { + "type": "string", + "metadata": { + "description": "Script call that should be passed to the CustomScriptExtension." + } + }, + "avSetName": { + "type": "string", + "metadata": { + "description": "Name of the availability set." + } + }, + "storageAccountName": { + "type": "string", + "metadata": { + "description": "Name of the storage account where the os disk and data disk should be placed." + } + }, + "nicName": { + "type": "string", + "metadata": { + "description": "Name of the network interface." + } + }, + "dataDisks": { + "type": "array", + "metadata": { + "description": "Information about the data disks that the VM should have." + } + }, + "github": { + "type": "string", + "metadata": { + "description": "URL to github templates." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "dbDataLUNs": "0,1,2,3", + "dbLogLUNs": "", + "dbDataName": "space", + "dbLogName": "", + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('vmName'), '/', parameters('cseExtName'))]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" - ], - "properties": { - "publisher": "[parameters('cseExtPublisher')]", - "type": "[parameters('cseExtName')]", - "typeHandlerVersion": "[parameters('cseExtVersion')]", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[parameters('csExtensionScript')]" - ], - "commandToExecute": "[concat(parameters('csExtensionscriptCall'), ' -DBDataLUNS \"', variables('dbDataLUNs'), '\" -DBLogLUNS \"', variables('dbLogLUNs'), '\" -DBDataName \"', variables('dbDataName'), '\" -DBLogName \"', variables('dbLogName'), '\"')]" - } - } + "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('nicName'))]" + } + ] + }, + "availableProperties": { + "image": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" + }, + "hardwareProfile": "[variables('hardwareProfile')]", + "osProfile": { + "computerName": "[parameters('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": "[parameters('imageReference')]", + "osDisk": "[parameters('osDisk')]", + "dataDisks": "[parameters('dataDisks')]" + }, + "networkProfile": "[variables('networkProfile')]" + }, + "userImage": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" + }, + "hardwareProfile": "[variables('hardwareProfile')]", + "osProfile": { + "computerName": "[parameters('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "osDisk": "[parameters('osDisk')]", + "dataDisks": "[parameters('dataDisks')]" + }, + "networkProfile": "[variables('networkProfile')]" + }, + "osdisk": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('avSetName'))]" + }, + "hardwareProfile": "[variables('hardwareProfile')]", + "storageProfile": { + "osDisk": "[parameters('osDisk')]", + "dataDisks": "[parameters('dataDisks')]" + }, + "networkProfile": "[variables('networkProfile')]" + } + }, + "internalProperties": "[variables('availableProperties')[parameters('osDiskType')]]" + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('vmName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": "[variables('internalProperties')]" + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('vmName'), '/', parameters('cseExtName'))]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" + ], + "properties": { + "publisher": "[parameters('cseExtPublisher')]", + "type": "[parameters('cseExtName')]", + "typeHandlerVersion": "[parameters('cseExtVersion')]", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[parameters('csExtensionScript')]" + ], + "commandToExecute": "[concat(parameters('csExtensionscriptCall'), ' -DBDataLUNS \"', variables('dbDataLUNs'), '\" -DBLogLUNS \"', variables('dbLogLUNs'), '\" -DBDataName \"', variables('dbDataName'), '\" -DBLogName \"', variables('dbLogName'), '\"')]" } - ] -} \ No newline at end of file + } + } + ] +} diff --git a/sap-2-tier-marketplace-image/shared/server2.json b/sap-2-tier-marketplace-image/shared/server2.json index 12d8f465105a..440e61a64740 100644 --- a/sap-2-tier-marketplace-image/shared/server2.json +++ b/sap-2-tier-marketplace-image/shared/server2.json @@ -120,6 +120,13 @@ "metadata": { "description": "URL to github templates." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -127,7 +134,6 @@ "dbLogLUNs": "", "dbDataName": "space", "dbLogName": "", - "diskCount": "[length(parameters('dataDisks'))]", "hardwareProfile": { "vmSize": "[parameters('vmSize')]" }, @@ -191,7 +197,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "plan": "[parameters('planReference')]", "properties": "[variables('internalProperties')]" }, @@ -199,7 +205,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', parameters('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -217,4 +223,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-user-disk-md/azuredeploy.json b/sap-2-tier-user-disk-md/azuredeploy.json index 60ba5a293d21..74811e95d135 100644 --- a/sap-2-tier-user-disk-md/azuredeploy.json +++ b/sap-2-tier-user-disk-md/azuredeploy.json @@ -59,6 +59,13 @@ "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": { @@ -310,7 +317,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameVnet'))]", "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameNIC'))]", @@ -407,4 +414,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-user-disk-md/shared/newnsg.json b/sap-2-tier-user-disk-md/shared/newnsg.json index 07f71e49f4ae..a4dc17d062e5 100644 --- a/sap-2-tier-user-disk-md/shared/newnsg.json +++ b/sap-2-tier-user-disk-md/shared/newnsg.json @@ -10,10 +10,20 @@ }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -58,7 +68,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('nsgName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": "[variables('selectedSecurityRules')]" } diff --git a/sap-2-tier-user-disk-md/shared/newpip.json b/sap-2-tier-user-disk-md/shared/newpip.json index 52fdf2eccd12..07cd7b3f655f 100644 --- a/sap-2-tier-user-disk-md/shared/newpip.json +++ b/sap-2-tier-user-disk-md/shared/newpip.json @@ -13,19 +13,25 @@ "metadata": { "description": "Type of the public IP address, static or dynamic" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIpName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-user-disk-md/shared/newvnetnsg.json b/sap-2-tier-user-disk-md/shared/newvnetnsg.json index cd79e863e6ab..1003d60a3611 100644 --- a/sap-2-tier-user-disk-md/shared/newvnetnsg.json +++ b/sap-2-tier-user-disk-md/shared/newvnetnsg.json @@ -31,16 +31,22 @@ "metadata": { "description": "Name of the Network Security Group." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -61,4 +67,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-user-disk-md/shared/nic-config.json b/sap-2-tier-user-disk-md/shared/nic-config.json index ab7c369d31b3..fd5a0c945ad8 100644 --- a/sap-2-tier-user-disk-md/shared/nic-config.json +++ b/sap-2-tier-user-disk-md/shared/nic-config.json @@ -36,6 +36,13 @@ "metadata": { "description": "The id of the subnet you want to use." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -61,12 +68,11 @@ }, "selectedConfiguration": "[variables('nicConfigurations')[string(equals(length(parameters('subnetId')), 0))]]" }, - "resources": [ - ], + "resources": [], "outputs": { "selectedConfiguration": { "value": "[variables('selectedConfiguration')]", "type": "object" } } -} \ No newline at end of file +} diff --git a/sap-2-tier-user-disk-md/shared/os-disk-parts-md.json b/sap-2-tier-user-disk-md/shared/os-disk-parts-md.json index ec076e76967a..f218f3cd3f6c 100644 --- a/sap-2-tier-user-disk-md/shared/os-disk-parts-md.json +++ b/sap-2-tier-user-disk-md/shared/os-disk-parts-md.json @@ -29,14 +29,21 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } @@ -60,11 +67,18 @@ "metadata": { "description": "Id of the managed disk." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "osDiskCaching": "ReadWrite", - "osDiskParts": { + "osDiskParts": { "image": { "imageReference": { "publisher": "[parameters('imagePublisher')]", diff --git a/sap-2-tier-user-disk-md/shared/server-md.json b/sap-2-tier-user-disk-md/shared/server-md.json index d74b9812955f..9eccbad557e6 100644 --- a/sap-2-tier-user-disk-md/shared/server-md.json +++ b/sap-2-tier-user-disk-md/shared/server-md.json @@ -72,7 +72,7 @@ "metadata": { "description": "Availability set." } - }, + }, "useAVSet": { "type": "bool", "defaultValue": false, @@ -97,12 +97,19 @@ "metadata": { "description": "URL to github templates." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "availableAVSetObj": { - "true": "[parameters('avSetObj')]", - "false": null + "true": "[parameters('avSetObj')]", + "false": null }, "internalAVSetObj": "[variables('availableAVSetObj')[toLower(string(parameters('useAVSet')))]]", "csExtension": { @@ -178,14 +185,14 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', variables('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -203,4 +210,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-2-tier-user-image-md/azuredeploy.json b/sap-2-tier-user-image-md/azuredeploy.json index fc83a7e2b3e1..55e98f85e4ca 100644 --- a/sap-2-tier-user-image-md/azuredeploy.json +++ b/sap-2-tier-user-image-md/azuredeploy.json @@ -79,6 +79,13 @@ "metadata": { "description": "The id of the subnet you want to use." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -438,7 +445,7 @@ "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameVnet'))]", "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameNIC'))]", @@ -532,4 +539,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-converged-md/azuredeploy.json b/sap-3-tier-marketplace-image-converged-md/azuredeploy.json index 991a0b5adac3..9245ca292133 100644 --- a/sap-3-tier-marketplace-image-converged-md/azuredeploy.json +++ b/sap-3-tier-marketplace-image-converged-md/azuredeploy.json @@ -107,6 +107,13 @@ "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": { @@ -181,7 +188,7 @@ "imageVersion": "[variables('images')[parameters('osType')].version]", "internalOSType": "[variables('images')[parameters('osType')].OSType]", "csExtension": { - "Windows": { + "Windows": { "script": "[concat(parameters('_artifactsLocation'), '/shared/noop.ps1', parameters('_artifactsLocationSasToken'))]", "scriptCall": "powershell.exe -ExecutionPolicy bypass -File .\\shared\\noop.ps1" }, @@ -534,7 +541,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameCL')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -662,7 +669,7 @@ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameVnet'))]", "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBCL'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -805,7 +812,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameDI')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -859,7 +866,7 @@ "name": "nicDILoop", "count": "[variables('divmCount')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { diff --git a/sap-3-tier-marketplace-image-converged-md/shared/lb-DB-HANA.json b/sap-3-tier-marketplace-image-converged-md/shared/lb-DB-HANA.json index a94e284e3140..a57c5a6f769d 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/lb-DB-HANA.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/lb-DB-HANA.json @@ -1,164 +1,171 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", - "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", - "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", - "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", - "idleTimeoutInMinutesDB": 30, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendDB')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolDB')]" - } - ], - "loadBalancingRulesResult": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", - "backendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '15')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", - "backendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '17')]" - } - ], - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalDB')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortDB')]" - } - ] + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", + "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", + "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", + "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", + "idleTimeoutInMinutesDB": 30, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendDB')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolDB')]" + } + ], + "loadBalancingRulesResult": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", + "backendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '15')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", + "backendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '17')]" + } + ], + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalDB')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortDB')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-converged-md/shared/lb-DB-SQL.json b/sap-3-tier-marketplace-image-converged-md/shared/lb-DB-SQL.json index 8045d5654028..8cabfc983f64 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/lb-DB-SQL.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/lb-DB-SQL.json @@ -1,145 +1,152 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", - "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", - "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", - "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", - "idleTimeoutInMinutesDB": 30, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendDB')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolDB')]" - } - ], - "loadBalancingRulesResult": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": 1433, - "backendPort": 1433, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '1433')]" - } - ], - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalDB')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortDB')]" - } - ] + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", + "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", + "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", + "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", + "idleTimeoutInMinutesDB": 30, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendDB')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolDB')]" + } + ], + "loadBalancingRulesResult": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": 1433, + "backendPort": 1433, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '1433')]" + } + ], + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalDB')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortDB')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-converged-md/shared/lb-DB0.json b/sap-3-tier-marketplace-image-converged-md/shared/lb-DB0.json index c7448bf65245..4c44e52542b6 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/lb-DB0.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/lb-DB0.json @@ -1,84 +1,91 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": [], - "type": "array" - }, - "frontendIPConfigurations": { - "value": [], - "type": "array" - }, - "backendAddressPools": { - "value": [], - "type": "array" - }, - "loadBalancingRules": { - "value": [], - "type": "array" - }, - "probes": { - "value": [], - "type": "array" - } + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": [], + "type": "array" + }, + "frontendIPConfigurations": { + "value": [], + "type": "array" + }, + "backendAddressPools": { + "value": [], + "type": "array" + }, + "loadBalancingRules": { + "value": [], + "type": "array" + }, + "probes": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-converged-md/shared/lb-ERS-Linux.json b/sap-3-tier-marketplace-image-converged-md/shared/lb-ERS-Linux.json index eab7cd301d3c..310d42bfddc9 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/lb-ERS-Linux.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/lb-ERS-Linux.json @@ -1,300 +1,306 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolERS": "[concat(variables('lbPrefix'), 'BackendPoolERS')]", + "loadBalancerFrontendERS": "[concat(variables('lbPrefix'), 'FrontendERS')]", + "lbProbePortERS": "[concat(variables('lbPrefix'), 'ProbePortERS')]", + "lbProbePortInternalERS": "[add(62100, parameters('ersASCSInstanceNumber'))]", + "idleTimeoutInMinutesERS": 30, + "loadBalancingRulesASCS": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", + "backendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRulesSCS": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", + "backendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } - }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolERS": "[concat(variables('lbPrefix'), 'BackendPoolERS')]", - "loadBalancerFrontendERS": "[concat(variables('lbPrefix'), 'FrontendERS')]", - "lbProbePortERS": "[concat(variables('lbPrefix'), 'ProbePortERS')]", - "lbProbePortInternalERS": "[add(62100, parameters('ersASCSInstanceNumber'))]", - "idleTimeoutInMinutesERS": 30, - "loadBalancingRulesASCS": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", - "backendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRulesSCS": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", - "backendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRules": { - "ABAP": "[variables('loadBalancingRulesASCS')]", - "JAVA": "[variables('loadBalancingRulesSCS')]", - "ABAP+JAVA": "[concat(variables('loadBalancingRulesASCS'), variables('loadBalancingRulesSCS'))]" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendERS')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolERS')]" - } - ], - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalERS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortERS')]" - } - ] + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRules": { + "ABAP": "[variables('loadBalancingRulesASCS')]", + "JAVA": "[variables('loadBalancingRulesSCS')]", + "ABAP+JAVA": "[concat(variables('loadBalancingRulesASCS'), variables('loadBalancingRulesSCS'))]" }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendERS')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolERS')]" + } + ], + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalERS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" - }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortERS')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-converged-md/shared/lb-ERS-Windows.json b/sap-3-tier-marketplace-image-converged-md/shared/lb-ERS-Windows.json index 31f5e9ffcc7a..2ff354045b0a 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/lb-ERS-Windows.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/lb-ERS-Windows.json @@ -1,97 +1,104 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } - }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[parameters('nicBackAddressPoolsArray')]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[parameters('frontendIPConfigurationsArray')]", - "type": "array" - }, - "backendAddressPools": { - "value": "[parameters('backendAddressPoolsArray')]", - "type": "array" - }, - "loadBalancingRules": { - "value": "[parameters('loadBalancingRulesArray')]", - "type": "array" - }, - "probes": { - "value": "[parameters('probesArray')]", - "type": "array" - } + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[parameters('nicBackAddressPoolsArray')]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[parameters('frontendIPConfigurationsArray')]", + "type": "array" + }, + "backendAddressPools": { + "value": "[parameters('backendAddressPoolsArray')]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[parameters('loadBalancingRulesArray')]", + "type": "array" + }, + "probes": { + "value": "[parameters('probesArray')]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-converged-md/shared/lb-ERS0.json b/sap-3-tier-marketplace-image-converged-md/shared/lb-ERS0.json index dad91bc38e71..aa8a93e20eb5 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/lb-ERS0.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/lb-ERS0.json @@ -1,97 +1,104 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } - }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": [], - "type": "array" - }, - "frontendIPConfigurations": { - "value": [], - "type": "array" - }, - "backendAddressPools": { - "value": [], - "type": "array" - }, - "loadBalancingRules": { - "value": [], - "type": "array" - }, - "probes": { - "value": [], - "type": "array" - } + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": [], + "type": "array" + }, + "frontendIPConfigurations": { + "value": [], + "type": "array" + }, + "backendAddressPools": { + "value": [], + "type": "array" + }, + "loadBalancingRules": { + "value": [], + "type": "array" + }, + "probes": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-converged-md/shared/lb-SCS.json b/sap-3-tier-marketplace-image-converged-md/shared/lb-SCS.json index 226e5eaaab30..a3acfd5a9802 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/lb-SCS.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/lb-SCS.json @@ -1,462 +1,469 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "metadata": { + "description": "The type of the Operating System" + } + }, + "ascsInstanceNumber": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The instance number of the ASCS." + } + }, + "scsInstanceNumber": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance number of the SCS." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolxSCS": "[concat(variables('lbPrefix'), 'BackendPoolxSCS')]", + "loadBalancerFrontendxSCS": "[concat(variables('lbPrefix'), 'FrontendxSCS')]", + "lbProbePortxSCS": "[concat(variables('lbPrefix'), 'ProbePortxSCS')]", + "lbProbePortInternalxSCS": "[add(62000, parameters('ascsInstanceNumber'))]", + "idleTimeoutInMinutesxSCS": 30, + "lbRulesFileShare": { + "Linux": [], + "Windows": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": 445, + "backendPort": 445, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '445')]" }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": 5985, + "backendPort": 5985, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '5985')]" + } + ] + }, + "lbRulesABAP": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3200, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3200, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "osType": { - "type": "string", - "metadata": { - "description": "The type of the Operating System" - } + "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3600, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3600, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "ascsInstanceNumber": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The instance number of the ASCS." - } + "name": "[concat(variables('lbrulePrefix'), '36', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3900, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3900, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "scsInstanceNumber": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance number of the SCS." - } + "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(8100, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(8100, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } + "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '16')]" + } + ], + "lbRulesJAVA": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3200, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3200, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3300, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } - }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolxSCS": "[concat(variables('lbPrefix'), 'BackendPoolxSCS')]", - "loadBalancerFrontendxSCS": "[concat(variables('lbPrefix'), 'FrontendxSCS')]", - "lbProbePortxSCS": "[concat(variables('lbPrefix'), 'ProbePortxSCS')]", - "lbProbePortInternalxSCS": "[add(62000, parameters('ascsInstanceNumber'))]", - "idleTimeoutInMinutesxSCS": 30, - "lbRulesFileShare": { - "Linux": [], - "Windows": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": 445, - "backendPort": 445, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '445')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": 5985, - "backendPort": 5985, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5985')]" - } - ] + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3900, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3900, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "lbRulesABAP": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3200, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3200, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3600, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3600, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '36', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3900, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3900, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(8100, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(8100, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '16')]" - } - ], - "lbRulesJAVA": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3200, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3200, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3300, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3900, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3900, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(8100, parameters('scsInstanceNumber'))]", - "backendPort": "[add(8100, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRules": { - "ABAP": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'))]", - "JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesJAVA'))]", - "ABAP+JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'), variables('lbRulesJAVA'))]" + "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(8100, parameters('scsInstanceNumber'))]", + "backendPort": "[add(8100, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendxSCS')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolxSCS')]" - } - ], - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalxSCS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortxSCS')]" - } - ] - }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRules": { + "ABAP": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'))]", + "JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesJAVA'))]", + "ABAP+JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'), variables('lbRulesJAVA'))]" + }, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('loadBalancerFrontendxSCS')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolxSCS')]" + } + ], + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalxSCS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "[variables('lbProbePortxSCS')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-converged-md/shared/lb-SCS0.json b/sap-3-tier-marketplace-image-converged-md/shared/lb-SCS0.json index cef2a2eacca2..be872832bb12 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/lb-SCS0.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/lb-SCS0.json @@ -1,199 +1,210 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "osType": { - "type": "string", - "metadata": { - "description": "The type of the Operating System" - } - }, - "ascsInstanceNumber": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The instance number of the ASCS." - } - }, - "scsInstanceNumber": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance number of the SCS." - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "metadata": { + "description": "The type of the Operating System" + } + }, + "ascsInstanceNumber": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The instance number of the ASCS." + } + }, + "scsInstanceNumber": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance number of the SCS." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "lb", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "loadBalancerFrontendNFS": "[concat(variables('lbPrefix'), 'FrontendNFS')]", + "lbProbePortNFS": "[concat(variables('lbPrefix'), 'ProbePortNFS')]", + "backendPoolNFS": "[concat(variables('lbPrefix'), 'BackendPoolNFS')]", + "lbProbePortInternalNFS": 61000, + "idleTimeoutInMinutesNFS": 30, + "nicBackAddressPools": { + "Linux": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" } + ], + "Windows": [] }, - "variables": { - "lbPrefix": "lb", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "loadBalancerFrontendNFS": "[concat(variables('lbPrefix'), 'FrontendNFS')]", - "lbProbePortNFS": "[concat(variables('lbPrefix'), 'ProbePortNFS')]", - "backendPoolNFS": "[concat(variables('lbPrefix'), 'BackendPoolNFS')]", - "lbProbePortInternalNFS": 61000, - "idleTimeoutInMinutesNFS": 30, - "nicBackAddressPools": { - "Linux": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - } - ], - "Windows": [] - }, - "frontendIPConfigurations": { - "Linux": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendNFS')]" - } - ], - "Windows": [] - }, - "backendAddressPools": { - "Linux": [{ - "name": "[variables('backendPoolNFS')]" - }], - "Windows": [] - }, - "loadBalancingRules": { - "Linux": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" - }, - "protocol": "Tcp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '2049T')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" - }, - "protocol": "Udp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '2049U')]" - } - ], - "Windows": [] - }, - "probes": { - "Linux": [{ - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalNFS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortNFS')]" - }], - "Windows": [] - }, - "nicBackAddressPoolsResult": "[variables('nicBackAddressPools')[parameters('osType')]]", - "frontendIPConfigurationsResult": "[variables('frontendIPConfigurations')[parameters('osType')]]", - "backendAddressPoolsResult": "[variables('backendAddressPools')[parameters('osType')]]", - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('osType')]]", - "probesResult": "[variables('probes')[parameters('osType')]]" - }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[variables('nicBackAddressPoolsResult')]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[variables('frontendIPConfigurationsResult')]", - "type": "array" - }, - "backendAddressPools": { - "value": "[variables('backendAddressPoolsResult')]", - "type": "array" - }, - "loadBalancingRules": { - "value": "[variables('loadBalancingRulesResult')]", - "type": "array" - }, - "probes": { - "value": "[variables('probesResult')]", - "type": "array" + "frontendIPConfigurations": { + "Linux": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" + }, + "name": "[variables('loadBalancerFrontendNFS')]" } + ], + "Windows": [] + }, + "backendAddressPools": { + "Linux": [ + { + "name": "[variables('backendPoolNFS')]" + } + ], + "Windows": [] + }, + "loadBalancingRules": { + "Linux": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" + }, + "protocol": "Tcp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '2049T')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" + }, + "protocol": "Udp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '2049U')]" + } + ], + "Windows": [] + }, + "probes": { + "Linux": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalNFS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "[variables('lbProbePortNFS')]" + } + ], + "Windows": [] + }, + "nicBackAddressPoolsResult": "[variables('nicBackAddressPools')[parameters('osType')]]", + "frontendIPConfigurationsResult": "[variables('frontendIPConfigurations')[parameters('osType')]]", + "backendAddressPoolsResult": "[variables('backendAddressPools')[parameters('osType')]]", + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('osType')]]", + "probesResult": "[variables('probes')[parameters('osType')]]" + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[variables('nicBackAddressPoolsResult')]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[variables('frontendIPConfigurationsResult')]", + "type": "array" + }, + "backendAddressPools": { + "value": "[variables('backendAddressPoolsResult')]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[variables('loadBalancingRulesResult')]", + "type": "array" + }, + "probes": { + "value": "[variables('probesResult')]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-converged-md/shared/loadbalancer.json b/sap-3-tier-marketplace-image-converged-md/shared/loadbalancer.json index 9c12e39b48e6..8b87b6c92dbb 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/loadbalancer.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/loadbalancer.json @@ -1,349 +1,356 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "sapSystemCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The number of SAP systems for which the load balancer should be configured" - } - }, - "stackType": { - "type": "string", - "defaultValue": "ABAP", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "osType": { - "type": "string", - "defaultValue": "Windows", - "metadata": { - "description": "The type of the Operating System" - } - }, - "createXSCS": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Determines if the load balancer should be configured for one or more ASCS/SCS." - } - }, - "createDB": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Determines if the load balancer should be configured for one or more databases." - } - }, - "dbType": { - "type": "string", - "defaultValue": "SQL", - "metadata": { - "description": "The type of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sap-file-server-md/" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "sapSystemCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The number of SAP systems for which the load balancer should be configured" + } + }, + "stackType": { + "type": "string", + "defaultValue": "ABAP", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "defaultValue": "Windows", + "metadata": { + "description": "The type of the Operating System" + } + }, + "createXSCS": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Determines if the load balancer should be configured for one or more ASCS/SCS." + } + }, + "createDB": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Determines if the load balancer should be configured for one or more databases." + } + }, + "dbType": { + "type": "string", + "defaultValue": "SQL", + "metadata": { + "description": "The type of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sap-file-server-md/" + }, + "_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": { + "ascsInstanceNumber": 0, + "scsInstanceNumber": 1, + "ersASCSInstanceNumber": 2, + "ersSCSInstanceNumber": 3, + "dbInstanceNumber": 3, + "nestedDeploymentNameLBSCS": "[concat(parameters('loadBalancerName'), 'LBSCS')]", + "nestedDeploymentNameLBERS": "[concat(parameters('loadBalancerName'), 'LBERS')]", + "nestedDeploymentNameLBDB": "[concat(parameters('loadBalancerName'), 'LBDB')]", + "scsTemplates": { + "true": "[concat('lb-SCS.json')]", + "false": "[concat('lb-SCS0.json')]" + }, + "ersTemplates": { + "true": "[concat('lb-ERS-', parameters('osType'), '.json')]", + "false": "[concat('lb-ERS0.json')]" + }, + "dbTemplates": { + "true": "[concat('lb-DB-', parameters('dbType'), '.json')]", + "false": "[concat('lb-DB0.json')]" + }, + "scsTemplate": "[variables('scsTemplates')[string(parameters('createXSCS'))]]", + "ersTemplate": "[variables('ersTemplates')[string(parameters('createXSCS'))]]", + "dbTemplate": "[variables('dbTemplates')[string(parameters('createDB'))]]" + }, + "resources": [ + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBSCS'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-SCS0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "_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": "" + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "osType": { + "value": "[parameters('osType')]" + }, + "ascsInstanceNumber": { + "value": "[variables('ascsInstanceNumber')]" + }, + "scsInstanceNumber": { + "value": "[variables('scsInstanceNumber')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } } + } }, - "variables": { - "ascsInstanceNumber": 0, - "scsInstanceNumber": 1, - "ersASCSInstanceNumber": 2, - "ersSCSInstanceNumber": 3, - "dbInstanceNumber": 3, - "nestedDeploymentNameLBSCS": "[concat(parameters('loadBalancerName'), 'LBSCS')]", - "nestedDeploymentNameLBERS": "[concat(parameters('loadBalancerName'), 'LBERS')]", - "nestedDeploymentNameLBDB": "[concat(parameters('loadBalancerName'), 'LBDB')]", - "scsTemplates": { - "true": "[concat('lb-SCS.json')]", - "false": "[concat('lb-SCS0.json')]" - }, - "ersTemplates": { - "true": "[concat('lb-ERS-', parameters('osType'), '.json')]", - "false": "[concat('lb-ERS0.json')]" + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBSCS'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBSCS'), '0')]" + ], + "copy": { + "name": "scsLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('scsTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "dbTemplates": { - "true": "[concat('lb-DB-', parameters('dbType'), '.json')]", - "false": "[concat('lb-DB0.json')]" - }, - "scsTemplate": "[variables('scsTemplates')[string(parameters('createXSCS'))]]", - "ersTemplate": "[variables('ersTemplates')[string(parameters('createXSCS'))]]", - "dbTemplate": "[variables('dbTemplates')[string(parameters('createDB'))]]" + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "osType": { + "value": "[parameters('osType')]" + }, + "ascsInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ascsInstanceNumber'))]" + }, + "scsInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('scsInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.probes.value]" + } + } + } }, - "resources": [ - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBSCS'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-SCS0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "osType": { - "value": "[parameters('osType')]" - }, - "ascsInstanceNumber": { - "value": "[variables('ascsInstanceNumber')]" - }, - "scsInstanceNumber": { - "value": "[variables('scsInstanceNumber')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBSCS'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBSCS'), '0')]" - ], - "copy": { - "name": "scsLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('scsTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "osType": { - "value": "[parameters('osType')]" - }, - "ascsInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ascsInstanceNumber'))]" - }, - "scsInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('scsInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.probes.value]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBERS'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-ERS0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "stackType": { - "value": "[parameters('stackType')]" - }, - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBERS'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-ERS0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBERS'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBERS'), '0')]" - ], - "copy": { - "name": "ersLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('ersTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "ersASCSInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ersASCSInstanceNumber'))]" - }, - "ersSCSInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ersSCSInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.probes.value]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBDB'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-DB0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } + "parameters": { + "stackType": { + "value": "[parameters('stackType')]" + }, + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } + } + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBERS'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBERS'), '0')]" + ], + "copy": { + "name": "ersLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('ersTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBDB'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBDB'), '0')]" - ], - "copy": { - "name": "dbLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('dbTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "dbInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('dbInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.probes.value]" - } - } - } + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "ersASCSInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ersASCSInstanceNumber'))]" + }, + "ersSCSInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ersSCSInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.probes.value]" + } + } + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBDB'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-DB0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "type": "Microsoft.Network/loadBalancers", - "name": "[parameters('loadBalancerName')]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "scsLoop", - "ersLoop", - "dbLoop" - ], - "location": "[resourceGroup().location]", - "properties": { - "frontendIPConfigurations": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value)]", - "backendAddressPools": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.backendAddressPools.value)]", - "loadBalancingRules": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value)]", - "probes": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.probes.value)]" - } + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } } - ], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value)]", - "type": "array" + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBDB'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBDB'), '0')]" + ], + "copy": { + "name": "dbLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('dbTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "dbInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('dbInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.probes.value]" + } } + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "name": "[parameters('loadBalancerName')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "scsLoop", + "ersLoop", + "dbLoop" + ], + "location": "[parameters('location')]", + "properties": { + "frontendIPConfigurations": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value)]", + "backendAddressPools": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.backendAddressPools.value)]", + "loadBalancingRules": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value)]", + "probes": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.probes.value)]" + } + } + ], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value)]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-converged-md/shared/newnsg.json b/sap-3-tier-marketplace-image-converged-md/shared/newnsg.json index 07f71e49f4ae..a4dc17d062e5 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/newnsg.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/newnsg.json @@ -10,10 +10,20 @@ }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -58,7 +68,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('nsgName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": "[variables('selectedSecurityRules')]" } diff --git a/sap-3-tier-marketplace-image-converged-md/shared/newpip.json b/sap-3-tier-marketplace-image-converged-md/shared/newpip.json index 52fdf2eccd12..07cd7b3f655f 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/newpip.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/newpip.json @@ -13,19 +13,25 @@ "metadata": { "description": "Type of the public IP address, static or dynamic" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIpName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-converged-md/shared/newvnetnsg.json b/sap-3-tier-marketplace-image-converged-md/shared/newvnetnsg.json index cd79e863e6ab..1003d60a3611 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/newvnetnsg.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/newvnetnsg.json @@ -31,16 +31,22 @@ "metadata": { "description": "Name of the Network Security Group." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -61,4 +67,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-converged-md/shared/nic-config.json b/sap-3-tier-marketplace-image-converged-md/shared/nic-config.json index ab7c369d31b3..fd5a0c945ad8 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/nic-config.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/nic-config.json @@ -36,6 +36,13 @@ "metadata": { "description": "The id of the subnet you want to use." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -61,12 +68,11 @@ }, "selectedConfiguration": "[variables('nicConfigurations')[string(equals(length(parameters('subnetId')), 0))]]" }, - "resources": [ - ], + "resources": [], "outputs": { "selectedConfiguration": { "value": "[variables('selectedConfiguration')]", "type": "object" } } -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-converged-md/shared/os-disk-parts-md.json b/sap-3-tier-marketplace-image-converged-md/shared/os-disk-parts-md.json index d26899e2f38e..7c40cc9b7ef1 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/os-disk-parts-md.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/os-disk-parts-md.json @@ -29,14 +29,21 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } @@ -60,11 +67,18 @@ "metadata": { "description": "Id of the managed disk." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "osDiskCaching": "ReadWrite", - "osDiskParts": { + "osDiskParts": { "image": { "imageReference": { "publisher": "[parameters('imagePublisher')]", diff --git a/sap-3-tier-marketplace-image-converged-md/shared/server-md.json b/sap-3-tier-marketplace-image-converged-md/shared/server-md.json index d74b9812955f..9eccbad557e6 100644 --- a/sap-3-tier-marketplace-image-converged-md/shared/server-md.json +++ b/sap-3-tier-marketplace-image-converged-md/shared/server-md.json @@ -72,7 +72,7 @@ "metadata": { "description": "Availability set." } - }, + }, "useAVSet": { "type": "bool", "defaultValue": false, @@ -97,12 +97,19 @@ "metadata": { "description": "URL to github templates." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "availableAVSetObj": { - "true": "[parameters('avSetObj')]", - "false": null + "true": "[parameters('avSetObj')]", + "false": null }, "internalAVSetObj": "[variables('availableAVSetObj')[toLower(string(parameters('useAVSet')))]]", "csExtension": { @@ -178,14 +185,14 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', variables('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -203,4 +210,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-md/azuredeploy.json b/sap-3-tier-marketplace-image-md/azuredeploy.json index 3e19d5d5e918..a8465c2711cb 100644 --- a/sap-3-tier-marketplace-image-md/azuredeploy.json +++ b/sap-3-tier-marketplace-image-md/azuredeploy.json @@ -84,6 +84,13 @@ "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": { @@ -538,7 +545,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameASCS')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -660,7 +667,7 @@ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameVnet'))]", "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBASCS'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -799,7 +806,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameDB')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -898,7 +905,7 @@ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameVnet'))]", "nicConfigDBLoop" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -1040,7 +1047,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameDI')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -1091,7 +1098,7 @@ "name": "nicDILoop", "count": "[variables('divmCount')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { diff --git a/sap-3-tier-marketplace-image-md/shared/lb-DB-HANA.json b/sap-3-tier-marketplace-image-md/shared/lb-DB-HANA.json index a94e284e3140..a57c5a6f769d 100644 --- a/sap-3-tier-marketplace-image-md/shared/lb-DB-HANA.json +++ b/sap-3-tier-marketplace-image-md/shared/lb-DB-HANA.json @@ -1,164 +1,171 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", - "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", - "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", - "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", - "idleTimeoutInMinutesDB": 30, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendDB')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolDB')]" - } - ], - "loadBalancingRulesResult": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", - "backendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '15')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", - "backendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '17')]" - } - ], - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalDB')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortDB')]" - } - ] + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", + "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", + "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", + "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", + "idleTimeoutInMinutesDB": 30, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendDB')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolDB')]" + } + ], + "loadBalancingRulesResult": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", + "backendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '15')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", + "backendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '17')]" + } + ], + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalDB')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortDB')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-md/shared/lb-DB-SQL.json b/sap-3-tier-marketplace-image-md/shared/lb-DB-SQL.json index 8045d5654028..8cabfc983f64 100644 --- a/sap-3-tier-marketplace-image-md/shared/lb-DB-SQL.json +++ b/sap-3-tier-marketplace-image-md/shared/lb-DB-SQL.json @@ -1,145 +1,152 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", - "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", - "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", - "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", - "idleTimeoutInMinutesDB": 30, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendDB')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolDB')]" - } - ], - "loadBalancingRulesResult": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": 1433, - "backendPort": 1433, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '1433')]" - } - ], - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalDB')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortDB')]" - } - ] + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", + "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", + "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", + "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", + "idleTimeoutInMinutesDB": 30, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendDB')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolDB')]" + } + ], + "loadBalancingRulesResult": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": 1433, + "backendPort": 1433, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '1433')]" + } + ], + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalDB')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortDB')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-md/shared/lb-DB0.json b/sap-3-tier-marketplace-image-md/shared/lb-DB0.json index c7448bf65245..4c44e52542b6 100644 --- a/sap-3-tier-marketplace-image-md/shared/lb-DB0.json +++ b/sap-3-tier-marketplace-image-md/shared/lb-DB0.json @@ -1,84 +1,91 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": [], - "type": "array" - }, - "frontendIPConfigurations": { - "value": [], - "type": "array" - }, - "backendAddressPools": { - "value": [], - "type": "array" - }, - "loadBalancingRules": { - "value": [], - "type": "array" - }, - "probes": { - "value": [], - "type": "array" - } + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": [], + "type": "array" + }, + "frontendIPConfigurations": { + "value": [], + "type": "array" + }, + "backendAddressPools": { + "value": [], + "type": "array" + }, + "loadBalancingRules": { + "value": [], + "type": "array" + }, + "probes": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-md/shared/lb-ERS-Linux.json b/sap-3-tier-marketplace-image-md/shared/lb-ERS-Linux.json index eab7cd301d3c..310d42bfddc9 100644 --- a/sap-3-tier-marketplace-image-md/shared/lb-ERS-Linux.json +++ b/sap-3-tier-marketplace-image-md/shared/lb-ERS-Linux.json @@ -1,300 +1,306 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolERS": "[concat(variables('lbPrefix'), 'BackendPoolERS')]", + "loadBalancerFrontendERS": "[concat(variables('lbPrefix'), 'FrontendERS')]", + "lbProbePortERS": "[concat(variables('lbPrefix'), 'ProbePortERS')]", + "lbProbePortInternalERS": "[add(62100, parameters('ersASCSInstanceNumber'))]", + "idleTimeoutInMinutesERS": 30, + "loadBalancingRulesASCS": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", + "backendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRulesSCS": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", + "backendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } - }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolERS": "[concat(variables('lbPrefix'), 'BackendPoolERS')]", - "loadBalancerFrontendERS": "[concat(variables('lbPrefix'), 'FrontendERS')]", - "lbProbePortERS": "[concat(variables('lbPrefix'), 'ProbePortERS')]", - "lbProbePortInternalERS": "[add(62100, parameters('ersASCSInstanceNumber'))]", - "idleTimeoutInMinutesERS": 30, - "loadBalancingRulesASCS": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", - "backendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRulesSCS": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", - "backendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRules": { - "ABAP": "[variables('loadBalancingRulesASCS')]", - "JAVA": "[variables('loadBalancingRulesSCS')]", - "ABAP+JAVA": "[concat(variables('loadBalancingRulesASCS'), variables('loadBalancingRulesSCS'))]" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendERS')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolERS')]" - } - ], - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalERS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortERS')]" - } - ] + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRules": { + "ABAP": "[variables('loadBalancingRulesASCS')]", + "JAVA": "[variables('loadBalancingRulesSCS')]", + "ABAP+JAVA": "[concat(variables('loadBalancingRulesASCS'), variables('loadBalancingRulesSCS'))]" }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendERS')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolERS')]" + } + ], + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalERS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" - }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortERS')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-md/shared/lb-ERS-Windows.json b/sap-3-tier-marketplace-image-md/shared/lb-ERS-Windows.json index 31f5e9ffcc7a..2ff354045b0a 100644 --- a/sap-3-tier-marketplace-image-md/shared/lb-ERS-Windows.json +++ b/sap-3-tier-marketplace-image-md/shared/lb-ERS-Windows.json @@ -1,97 +1,104 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } - }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[parameters('nicBackAddressPoolsArray')]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[parameters('frontendIPConfigurationsArray')]", - "type": "array" - }, - "backendAddressPools": { - "value": "[parameters('backendAddressPoolsArray')]", - "type": "array" - }, - "loadBalancingRules": { - "value": "[parameters('loadBalancingRulesArray')]", - "type": "array" - }, - "probes": { - "value": "[parameters('probesArray')]", - "type": "array" - } + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[parameters('nicBackAddressPoolsArray')]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[parameters('frontendIPConfigurationsArray')]", + "type": "array" + }, + "backendAddressPools": { + "value": "[parameters('backendAddressPoolsArray')]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[parameters('loadBalancingRulesArray')]", + "type": "array" + }, + "probes": { + "value": "[parameters('probesArray')]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-md/shared/lb-ERS0.json b/sap-3-tier-marketplace-image-md/shared/lb-ERS0.json index dad91bc38e71..aa8a93e20eb5 100644 --- a/sap-3-tier-marketplace-image-md/shared/lb-ERS0.json +++ b/sap-3-tier-marketplace-image-md/shared/lb-ERS0.json @@ -1,97 +1,104 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } - }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": [], - "type": "array" - }, - "frontendIPConfigurations": { - "value": [], - "type": "array" - }, - "backendAddressPools": { - "value": [], - "type": "array" - }, - "loadBalancingRules": { - "value": [], - "type": "array" - }, - "probes": { - "value": [], - "type": "array" - } + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": [], + "type": "array" + }, + "frontendIPConfigurations": { + "value": [], + "type": "array" + }, + "backendAddressPools": { + "value": [], + "type": "array" + }, + "loadBalancingRules": { + "value": [], + "type": "array" + }, + "probes": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-md/shared/lb-SCS.json b/sap-3-tier-marketplace-image-md/shared/lb-SCS.json index 226e5eaaab30..a3acfd5a9802 100644 --- a/sap-3-tier-marketplace-image-md/shared/lb-SCS.json +++ b/sap-3-tier-marketplace-image-md/shared/lb-SCS.json @@ -1,462 +1,469 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "metadata": { + "description": "The type of the Operating System" + } + }, + "ascsInstanceNumber": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The instance number of the ASCS." + } + }, + "scsInstanceNumber": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance number of the SCS." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolxSCS": "[concat(variables('lbPrefix'), 'BackendPoolxSCS')]", + "loadBalancerFrontendxSCS": "[concat(variables('lbPrefix'), 'FrontendxSCS')]", + "lbProbePortxSCS": "[concat(variables('lbPrefix'), 'ProbePortxSCS')]", + "lbProbePortInternalxSCS": "[add(62000, parameters('ascsInstanceNumber'))]", + "idleTimeoutInMinutesxSCS": 30, + "lbRulesFileShare": { + "Linux": [], + "Windows": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": 445, + "backendPort": 445, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '445')]" }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": 5985, + "backendPort": 5985, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '5985')]" + } + ] + }, + "lbRulesABAP": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3200, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3200, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "osType": { - "type": "string", - "metadata": { - "description": "The type of the Operating System" - } + "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3600, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3600, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "ascsInstanceNumber": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The instance number of the ASCS." - } + "name": "[concat(variables('lbrulePrefix'), '36', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3900, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3900, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "scsInstanceNumber": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance number of the SCS." - } + "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(8100, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(8100, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } + "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '16')]" + } + ], + "lbRulesJAVA": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3200, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3200, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3300, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } - }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolxSCS": "[concat(variables('lbPrefix'), 'BackendPoolxSCS')]", - "loadBalancerFrontendxSCS": "[concat(variables('lbPrefix'), 'FrontendxSCS')]", - "lbProbePortxSCS": "[concat(variables('lbPrefix'), 'ProbePortxSCS')]", - "lbProbePortInternalxSCS": "[add(62000, parameters('ascsInstanceNumber'))]", - "idleTimeoutInMinutesxSCS": 30, - "lbRulesFileShare": { - "Linux": [], - "Windows": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": 445, - "backendPort": 445, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '445')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": 5985, - "backendPort": 5985, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5985')]" - } - ] + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3900, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3900, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "lbRulesABAP": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3200, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3200, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3600, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3600, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '36', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3900, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3900, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(8100, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(8100, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '16')]" - } - ], - "lbRulesJAVA": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3200, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3200, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3300, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3900, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3900, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(8100, parameters('scsInstanceNumber'))]", - "backendPort": "[add(8100, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRules": { - "ABAP": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'))]", - "JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesJAVA'))]", - "ABAP+JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'), variables('lbRulesJAVA'))]" + "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(8100, parameters('scsInstanceNumber'))]", + "backendPort": "[add(8100, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendxSCS')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolxSCS')]" - } - ], - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalxSCS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortxSCS')]" - } - ] - }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRules": { + "ABAP": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'))]", + "JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesJAVA'))]", + "ABAP+JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'), variables('lbRulesJAVA'))]" + }, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('loadBalancerFrontendxSCS')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolxSCS')]" + } + ], + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalxSCS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "[variables('lbProbePortxSCS')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-md/shared/lb-SCS0.json b/sap-3-tier-marketplace-image-md/shared/lb-SCS0.json index cef2a2eacca2..be872832bb12 100644 --- a/sap-3-tier-marketplace-image-md/shared/lb-SCS0.json +++ b/sap-3-tier-marketplace-image-md/shared/lb-SCS0.json @@ -1,199 +1,210 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "osType": { - "type": "string", - "metadata": { - "description": "The type of the Operating System" - } - }, - "ascsInstanceNumber": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The instance number of the ASCS." - } - }, - "scsInstanceNumber": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance number of the SCS." - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "metadata": { + "description": "The type of the Operating System" + } + }, + "ascsInstanceNumber": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The instance number of the ASCS." + } + }, + "scsInstanceNumber": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance number of the SCS." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "lb", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "loadBalancerFrontendNFS": "[concat(variables('lbPrefix'), 'FrontendNFS')]", + "lbProbePortNFS": "[concat(variables('lbPrefix'), 'ProbePortNFS')]", + "backendPoolNFS": "[concat(variables('lbPrefix'), 'BackendPoolNFS')]", + "lbProbePortInternalNFS": 61000, + "idleTimeoutInMinutesNFS": 30, + "nicBackAddressPools": { + "Linux": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" } + ], + "Windows": [] }, - "variables": { - "lbPrefix": "lb", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "loadBalancerFrontendNFS": "[concat(variables('lbPrefix'), 'FrontendNFS')]", - "lbProbePortNFS": "[concat(variables('lbPrefix'), 'ProbePortNFS')]", - "backendPoolNFS": "[concat(variables('lbPrefix'), 'BackendPoolNFS')]", - "lbProbePortInternalNFS": 61000, - "idleTimeoutInMinutesNFS": 30, - "nicBackAddressPools": { - "Linux": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - } - ], - "Windows": [] - }, - "frontendIPConfigurations": { - "Linux": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendNFS')]" - } - ], - "Windows": [] - }, - "backendAddressPools": { - "Linux": [{ - "name": "[variables('backendPoolNFS')]" - }], - "Windows": [] - }, - "loadBalancingRules": { - "Linux": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" - }, - "protocol": "Tcp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '2049T')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" - }, - "protocol": "Udp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '2049U')]" - } - ], - "Windows": [] - }, - "probes": { - "Linux": [{ - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalNFS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortNFS')]" - }], - "Windows": [] - }, - "nicBackAddressPoolsResult": "[variables('nicBackAddressPools')[parameters('osType')]]", - "frontendIPConfigurationsResult": "[variables('frontendIPConfigurations')[parameters('osType')]]", - "backendAddressPoolsResult": "[variables('backendAddressPools')[parameters('osType')]]", - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('osType')]]", - "probesResult": "[variables('probes')[parameters('osType')]]" - }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[variables('nicBackAddressPoolsResult')]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[variables('frontendIPConfigurationsResult')]", - "type": "array" - }, - "backendAddressPools": { - "value": "[variables('backendAddressPoolsResult')]", - "type": "array" - }, - "loadBalancingRules": { - "value": "[variables('loadBalancingRulesResult')]", - "type": "array" - }, - "probes": { - "value": "[variables('probesResult')]", - "type": "array" + "frontendIPConfigurations": { + "Linux": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" + }, + "name": "[variables('loadBalancerFrontendNFS')]" } + ], + "Windows": [] + }, + "backendAddressPools": { + "Linux": [ + { + "name": "[variables('backendPoolNFS')]" + } + ], + "Windows": [] + }, + "loadBalancingRules": { + "Linux": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" + }, + "protocol": "Tcp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '2049T')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" + }, + "protocol": "Udp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '2049U')]" + } + ], + "Windows": [] + }, + "probes": { + "Linux": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalNFS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "[variables('lbProbePortNFS')]" + } + ], + "Windows": [] + }, + "nicBackAddressPoolsResult": "[variables('nicBackAddressPools')[parameters('osType')]]", + "frontendIPConfigurationsResult": "[variables('frontendIPConfigurations')[parameters('osType')]]", + "backendAddressPoolsResult": "[variables('backendAddressPools')[parameters('osType')]]", + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('osType')]]", + "probesResult": "[variables('probes')[parameters('osType')]]" + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[variables('nicBackAddressPoolsResult')]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[variables('frontendIPConfigurationsResult')]", + "type": "array" + }, + "backendAddressPools": { + "value": "[variables('backendAddressPoolsResult')]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[variables('loadBalancingRulesResult')]", + "type": "array" + }, + "probes": { + "value": "[variables('probesResult')]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-md/shared/loadbalancer.json b/sap-3-tier-marketplace-image-md/shared/loadbalancer.json index 9c12e39b48e6..8b87b6c92dbb 100644 --- a/sap-3-tier-marketplace-image-md/shared/loadbalancer.json +++ b/sap-3-tier-marketplace-image-md/shared/loadbalancer.json @@ -1,349 +1,356 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "sapSystemCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The number of SAP systems for which the load balancer should be configured" - } - }, - "stackType": { - "type": "string", - "defaultValue": "ABAP", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "osType": { - "type": "string", - "defaultValue": "Windows", - "metadata": { - "description": "The type of the Operating System" - } - }, - "createXSCS": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Determines if the load balancer should be configured for one or more ASCS/SCS." - } - }, - "createDB": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Determines if the load balancer should be configured for one or more databases." - } - }, - "dbType": { - "type": "string", - "defaultValue": "SQL", - "metadata": { - "description": "The type of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sap-file-server-md/" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "sapSystemCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The number of SAP systems for which the load balancer should be configured" + } + }, + "stackType": { + "type": "string", + "defaultValue": "ABAP", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "defaultValue": "Windows", + "metadata": { + "description": "The type of the Operating System" + } + }, + "createXSCS": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Determines if the load balancer should be configured for one or more ASCS/SCS." + } + }, + "createDB": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Determines if the load balancer should be configured for one or more databases." + } + }, + "dbType": { + "type": "string", + "defaultValue": "SQL", + "metadata": { + "description": "The type of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sap-file-server-md/" + }, + "_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": { + "ascsInstanceNumber": 0, + "scsInstanceNumber": 1, + "ersASCSInstanceNumber": 2, + "ersSCSInstanceNumber": 3, + "dbInstanceNumber": 3, + "nestedDeploymentNameLBSCS": "[concat(parameters('loadBalancerName'), 'LBSCS')]", + "nestedDeploymentNameLBERS": "[concat(parameters('loadBalancerName'), 'LBERS')]", + "nestedDeploymentNameLBDB": "[concat(parameters('loadBalancerName'), 'LBDB')]", + "scsTemplates": { + "true": "[concat('lb-SCS.json')]", + "false": "[concat('lb-SCS0.json')]" + }, + "ersTemplates": { + "true": "[concat('lb-ERS-', parameters('osType'), '.json')]", + "false": "[concat('lb-ERS0.json')]" + }, + "dbTemplates": { + "true": "[concat('lb-DB-', parameters('dbType'), '.json')]", + "false": "[concat('lb-DB0.json')]" + }, + "scsTemplate": "[variables('scsTemplates')[string(parameters('createXSCS'))]]", + "ersTemplate": "[variables('ersTemplates')[string(parameters('createXSCS'))]]", + "dbTemplate": "[variables('dbTemplates')[string(parameters('createDB'))]]" + }, + "resources": [ + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBSCS'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-SCS0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "_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": "" + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "osType": { + "value": "[parameters('osType')]" + }, + "ascsInstanceNumber": { + "value": "[variables('ascsInstanceNumber')]" + }, + "scsInstanceNumber": { + "value": "[variables('scsInstanceNumber')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } } + } }, - "variables": { - "ascsInstanceNumber": 0, - "scsInstanceNumber": 1, - "ersASCSInstanceNumber": 2, - "ersSCSInstanceNumber": 3, - "dbInstanceNumber": 3, - "nestedDeploymentNameLBSCS": "[concat(parameters('loadBalancerName'), 'LBSCS')]", - "nestedDeploymentNameLBERS": "[concat(parameters('loadBalancerName'), 'LBERS')]", - "nestedDeploymentNameLBDB": "[concat(parameters('loadBalancerName'), 'LBDB')]", - "scsTemplates": { - "true": "[concat('lb-SCS.json')]", - "false": "[concat('lb-SCS0.json')]" - }, - "ersTemplates": { - "true": "[concat('lb-ERS-', parameters('osType'), '.json')]", - "false": "[concat('lb-ERS0.json')]" + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBSCS'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBSCS'), '0')]" + ], + "copy": { + "name": "scsLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('scsTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "dbTemplates": { - "true": "[concat('lb-DB-', parameters('dbType'), '.json')]", - "false": "[concat('lb-DB0.json')]" - }, - "scsTemplate": "[variables('scsTemplates')[string(parameters('createXSCS'))]]", - "ersTemplate": "[variables('ersTemplates')[string(parameters('createXSCS'))]]", - "dbTemplate": "[variables('dbTemplates')[string(parameters('createDB'))]]" + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "osType": { + "value": "[parameters('osType')]" + }, + "ascsInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ascsInstanceNumber'))]" + }, + "scsInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('scsInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.probes.value]" + } + } + } }, - "resources": [ - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBSCS'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-SCS0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "osType": { - "value": "[parameters('osType')]" - }, - "ascsInstanceNumber": { - "value": "[variables('ascsInstanceNumber')]" - }, - "scsInstanceNumber": { - "value": "[variables('scsInstanceNumber')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBSCS'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBSCS'), '0')]" - ], - "copy": { - "name": "scsLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('scsTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "osType": { - "value": "[parameters('osType')]" - }, - "ascsInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ascsInstanceNumber'))]" - }, - "scsInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('scsInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.probes.value]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBERS'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-ERS0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "stackType": { - "value": "[parameters('stackType')]" - }, - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBERS'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-ERS0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBERS'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBERS'), '0')]" - ], - "copy": { - "name": "ersLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('ersTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "ersASCSInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ersASCSInstanceNumber'))]" - }, - "ersSCSInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ersSCSInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.probes.value]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBDB'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-DB0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } + "parameters": { + "stackType": { + "value": "[parameters('stackType')]" + }, + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } + } + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBERS'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBERS'), '0')]" + ], + "copy": { + "name": "ersLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('ersTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBDB'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBDB'), '0')]" - ], - "copy": { - "name": "dbLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('dbTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "dbInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('dbInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.probes.value]" - } - } - } + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "ersASCSInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ersASCSInstanceNumber'))]" + }, + "ersSCSInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ersSCSInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.probes.value]" + } + } + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBDB'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-DB0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "type": "Microsoft.Network/loadBalancers", - "name": "[parameters('loadBalancerName')]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "scsLoop", - "ersLoop", - "dbLoop" - ], - "location": "[resourceGroup().location]", - "properties": { - "frontendIPConfigurations": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value)]", - "backendAddressPools": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.backendAddressPools.value)]", - "loadBalancingRules": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value)]", - "probes": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.probes.value)]" - } + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } } - ], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value)]", - "type": "array" + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBDB'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBDB'), '0')]" + ], + "copy": { + "name": "dbLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('dbTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "dbInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('dbInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.probes.value]" + } } + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "name": "[parameters('loadBalancerName')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "scsLoop", + "ersLoop", + "dbLoop" + ], + "location": "[parameters('location')]", + "properties": { + "frontendIPConfigurations": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value)]", + "backendAddressPools": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.backendAddressPools.value)]", + "loadBalancingRules": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value)]", + "probes": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.probes.value)]" + } + } + ], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value)]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-md/shared/newnsg.json b/sap-3-tier-marketplace-image-md/shared/newnsg.json index 07f71e49f4ae..a4dc17d062e5 100644 --- a/sap-3-tier-marketplace-image-md/shared/newnsg.json +++ b/sap-3-tier-marketplace-image-md/shared/newnsg.json @@ -10,10 +10,20 @@ }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -58,7 +68,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('nsgName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": "[variables('selectedSecurityRules')]" } diff --git a/sap-3-tier-marketplace-image-md/shared/newpip.json b/sap-3-tier-marketplace-image-md/shared/newpip.json index 52fdf2eccd12..07cd7b3f655f 100644 --- a/sap-3-tier-marketplace-image-md/shared/newpip.json +++ b/sap-3-tier-marketplace-image-md/shared/newpip.json @@ -13,19 +13,25 @@ "metadata": { "description": "Type of the public IP address, static or dynamic" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIpName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-md/shared/newvnetnsg.json b/sap-3-tier-marketplace-image-md/shared/newvnetnsg.json index cd79e863e6ab..1003d60a3611 100644 --- a/sap-3-tier-marketplace-image-md/shared/newvnetnsg.json +++ b/sap-3-tier-marketplace-image-md/shared/newvnetnsg.json @@ -31,16 +31,22 @@ "metadata": { "description": "Name of the Network Security Group." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -61,4 +67,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-md/shared/nic-config.json b/sap-3-tier-marketplace-image-md/shared/nic-config.json index 526ea073896b..0a66cebe78ce 100644 --- a/sap-3-tier-marketplace-image-md/shared/nic-config.json +++ b/sap-3-tier-marketplace-image-md/shared/nic-config.json @@ -29,6 +29,13 @@ "metadata": { "description": "The id of the subnet you want to use." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -51,8 +58,7 @@ }, "selectedConfiguration": "[variables('nicConfigurations')[string(equals(length(parameters('subnetId')), 0))]]" }, - "resources": [ - ], + "resources": [], "outputs": { "selectedConfiguration": { "value": "[variables('selectedConfiguration')]", diff --git a/sap-3-tier-marketplace-image-md/shared/os-disk-parts-md.json b/sap-3-tier-marketplace-image-md/shared/os-disk-parts-md.json index d26899e2f38e..7c40cc9b7ef1 100644 --- a/sap-3-tier-marketplace-image-md/shared/os-disk-parts-md.json +++ b/sap-3-tier-marketplace-image-md/shared/os-disk-parts-md.json @@ -29,14 +29,21 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } @@ -60,11 +67,18 @@ "metadata": { "description": "Id of the managed disk." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "osDiskCaching": "ReadWrite", - "osDiskParts": { + "osDiskParts": { "image": { "imageReference": { "publisher": "[parameters('imagePublisher')]", diff --git a/sap-3-tier-marketplace-image-md/shared/server-md.json b/sap-3-tier-marketplace-image-md/shared/server-md.json index d74b9812955f..9eccbad557e6 100644 --- a/sap-3-tier-marketplace-image-md/shared/server-md.json +++ b/sap-3-tier-marketplace-image-md/shared/server-md.json @@ -72,7 +72,7 @@ "metadata": { "description": "Availability set." } - }, + }, "useAVSet": { "type": "bool", "defaultValue": false, @@ -97,12 +97,19 @@ "metadata": { "description": "URL to github templates." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "availableAVSetObj": { - "true": "[parameters('avSetObj')]", - "false": null + "true": "[parameters('avSetObj')]", + "false": null }, "internalAVSetObj": "[variables('availableAVSetObj')[toLower(string(parameters('useAVSet')))]]", "csExtension": { @@ -178,14 +185,14 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', variables('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -203,4 +210,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-multi-sid-apps-md/azuredeploy.json b/sap-3-tier-marketplace-image-multi-sid-apps-md/azuredeploy.json index d8b997485837..c232c8d8cb08 100644 --- a/sap-3-tier-marketplace-image-multi-sid-apps-md/azuredeploy.json +++ b/sap-3-tier-marketplace-image-multi-sid-apps-md/azuredeploy.json @@ -83,6 +83,13 @@ "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": { @@ -233,7 +240,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameDI')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -250,7 +257,7 @@ "name": "nicDILoop", "count": "[variables('divmCount')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -390,4 +397,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-multi-sid-apps-md/shared/os-disk-parts-md.json b/sap-3-tier-marketplace-image-multi-sid-apps-md/shared/os-disk-parts-md.json index d26899e2f38e..7c40cc9b7ef1 100644 --- a/sap-3-tier-marketplace-image-multi-sid-apps-md/shared/os-disk-parts-md.json +++ b/sap-3-tier-marketplace-image-multi-sid-apps-md/shared/os-disk-parts-md.json @@ -29,14 +29,21 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } @@ -60,11 +67,18 @@ "metadata": { "description": "Id of the managed disk." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "osDiskCaching": "ReadWrite", - "osDiskParts": { + "osDiskParts": { "image": { "imageReference": { "publisher": "[parameters('imagePublisher')]", diff --git a/sap-3-tier-marketplace-image-multi-sid-apps-md/shared/server-md.json b/sap-3-tier-marketplace-image-multi-sid-apps-md/shared/server-md.json index d74b9812955f..9eccbad557e6 100644 --- a/sap-3-tier-marketplace-image-multi-sid-apps-md/shared/server-md.json +++ b/sap-3-tier-marketplace-image-multi-sid-apps-md/shared/server-md.json @@ -72,7 +72,7 @@ "metadata": { "description": "Availability set." } - }, + }, "useAVSet": { "type": "bool", "defaultValue": false, @@ -97,12 +97,19 @@ "metadata": { "description": "URL to github templates." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "availableAVSetObj": { - "true": "[parameters('avSetObj')]", - "false": null + "true": "[parameters('avSetObj')]", + "false": null }, "internalAVSetObj": "[variables('availableAVSetObj')[toLower(string(parameters('useAVSet')))]]", "csExtension": { @@ -178,14 +185,14 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', variables('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -203,4 +210,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-multi-sid-db-md/azuredeploy.json b/sap-3-tier-marketplace-image-multi-sid-db-md/azuredeploy.json index 382738050d2e..da531274d07e 100644 --- a/sap-3-tier-marketplace-image-multi-sid-db-md/azuredeploy.json +++ b/sap-3-tier-marketplace-image-multi-sid-db-md/azuredeploy.json @@ -102,6 +102,13 @@ "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": { @@ -1018,7 +1025,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(variables('nsgName'))]", "apiVersion": "2018-04-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "condition": "[equals(length(parameters('subnetId')), 0)]", "properties": { "securityRules": "[variables('selectedSecurityRules')]" @@ -1028,7 +1035,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vnetName')]", "apiVersion": "2018-04-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ], @@ -1056,7 +1063,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameDB')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -1073,7 +1080,7 @@ "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('vnetName'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "dbpipLoop", "count": "[variables('dbvmCount')]" @@ -1086,7 +1093,7 @@ "type": "Microsoft.Network/loadBalancers", "name": "[variables('loadBalancerNameDB')]", "apiVersion": "2018-04-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('vnetName'))]" ], @@ -1110,7 +1117,7 @@ "[concat('Microsoft.Network/virtualNetworks/', variables('vnetName'))]", "[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerNameDB'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -1174,7 +1181,7 @@ "[concat('Microsoft.Compute/availabilitySets/', variables('avSetNameDB'))]" ], "apiVersion": "2017-12-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('avSetNameDB'))]" @@ -1218,7 +1225,7 @@ "name": "dbCSELoop", "count": "[variables('dbvmCount')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "dbVMLoop" ], @@ -1236,4 +1243,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-multi-sid-db-md/nestedtemplates/osprofile.json b/sap-3-tier-marketplace-image-multi-sid-db-md/nestedtemplates/osprofile.json index 6b14c463dacc..9ca146e3e093 100644 --- a/sap-3-tier-marketplace-image-multi-sid-db-md/nestedtemplates/osprofile.json +++ b/sap-3-tier-marketplace-image-multi-sid-db-md/nestedtemplates/osprofile.json @@ -1,77 +1,83 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "osType": { - "type": "string", - "allowedValues": [ - "Linux", - "Windows" - ], - "metadata": { - "description": "Operating system type of the virtual machine." - } - }, - "computerName": { - "type": "string", - "metadata": { - "description": "Computername of the virtual machine." - } - }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "Username for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "sshKeyData": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Public SSH key for the virtual machines." - } - } - }, - "variables": { - "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", - "sshKeysArrayKey": [ - { - "path": "[variables('sshKeyPath')]", - "keyData": "[parameters('sshKeyData')]" - } - ], - "sshKeysArrayEmpty": [], - "sshKeysArray": "[if(equals(length(parameters('sshKeyData')), 0), variables('sshKeysArrayEmpty'), variables('sshKeysArrayKey'))]", - "osProfileLnx": { - "computerName": "[parameters('computerName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "linuxConfiguration": { - "disablePasswordAuthentication": "[if(equals(length(parameters('sshKeyData')), 0), bool('false'), bool('true'))]", - "ssh": { - "publicKeys": "[variables('sshKeysArray')]" - } - } - }, - "osProfileWin": { - "computerName": "[parameters('computerName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "osType": { + "type": "string", + "allowedValues": [ + "Linux", + "Windows" + ], + "metadata": { + "description": "Operating system type of the virtual machine." + } + }, + "computerName": { + "type": "string", + "metadata": { + "description": "Computername of the virtual machine." + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "Password for the Virtual Machine." + } }, - "resources": [ + "sshKeyData": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Public SSH key for the virtual machines." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", + "sshKeysArrayKey": [ + { + "path": "[variables('sshKeyPath')]", + "keyData": "[parameters('sshKeyData')]" + } ], - "outputs": { - "profile": { - "value": "[if(equals(parameters('osType'), 'Windows'), variables('osProfileWin'), variables('osProfileLnx'))]", - "type": "object" + "sshKeysArrayEmpty": [], + "sshKeysArray": "[if(equals(length(parameters('sshKeyData')), 0), variables('sshKeysArrayEmpty'), variables('sshKeysArrayKey'))]", + "osProfileLnx": { + "computerName": "[parameters('computerName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]", + "linuxConfiguration": { + "disablePasswordAuthentication": "[if(equals(length(parameters('sshKeyData')), 0), bool('false'), bool('true'))]", + "ssh": { + "publicKeys": "[variables('sshKeysArray')]" } + } + }, + "osProfileWin": { + "computerName": "[parameters('computerName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + } + }, + "resources": [], + "outputs": { + "profile": { + "value": "[if(equals(parameters('osType'), 'Windows'), variables('osProfileWin'), variables('osProfileLnx'))]", + "type": "object" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/azuredeploy.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/azuredeploy.json index e7a6d6e0e1b8..fc1a756f3b5e 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/azuredeploy.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/azuredeploy.json @@ -90,6 +90,13 @@ "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": { @@ -500,7 +507,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameXSCS')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -622,7 +629,7 @@ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameVnet'))]", "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBXSCS'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -762,4 +769,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-DB-HANA.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-DB-HANA.json index a94e284e3140..a57c5a6f769d 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-DB-HANA.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-DB-HANA.json @@ -1,164 +1,171 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", - "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", - "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", - "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", - "idleTimeoutInMinutesDB": 30, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendDB')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolDB')]" - } - ], - "loadBalancingRulesResult": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", - "backendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '15')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", - "backendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '17')]" - } - ], - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalDB')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortDB')]" - } - ] + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", + "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", + "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", + "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", + "idleTimeoutInMinutesDB": 30, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendDB')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolDB')]" + } + ], + "loadBalancingRulesResult": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", + "backendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '15')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", + "backendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '17')]" + } + ], + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalDB')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortDB')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-DB-SQL.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-DB-SQL.json index 8045d5654028..8cabfc983f64 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-DB-SQL.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-DB-SQL.json @@ -1,145 +1,152 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", - "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", - "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", - "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", - "idleTimeoutInMinutesDB": 30, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendDB')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolDB')]" - } - ], - "loadBalancingRulesResult": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": 1433, - "backendPort": 1433, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '1433')]" - } - ], - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalDB')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortDB')]" - } - ] + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", + "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", + "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", + "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", + "idleTimeoutInMinutesDB": 30, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendDB')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolDB')]" + } + ], + "loadBalancingRulesResult": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": 1433, + "backendPort": 1433, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '1433')]" + } + ], + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalDB')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortDB')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-DB0.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-DB0.json index c7448bf65245..4c44e52542b6 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-DB0.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-DB0.json @@ -1,84 +1,91 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": [], - "type": "array" - }, - "frontendIPConfigurations": { - "value": [], - "type": "array" - }, - "backendAddressPools": { - "value": [], - "type": "array" - }, - "loadBalancingRules": { - "value": [], - "type": "array" - }, - "probes": { - "value": [], - "type": "array" - } + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": [], + "type": "array" + }, + "frontendIPConfigurations": { + "value": [], + "type": "array" + }, + "backendAddressPools": { + "value": [], + "type": "array" + }, + "loadBalancingRules": { + "value": [], + "type": "array" + }, + "probes": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-ERS-Linux.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-ERS-Linux.json index eab7cd301d3c..310d42bfddc9 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-ERS-Linux.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-ERS-Linux.json @@ -1,300 +1,306 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolERS": "[concat(variables('lbPrefix'), 'BackendPoolERS')]", + "loadBalancerFrontendERS": "[concat(variables('lbPrefix'), 'FrontendERS')]", + "lbProbePortERS": "[concat(variables('lbPrefix'), 'ProbePortERS')]", + "lbProbePortInternalERS": "[add(62100, parameters('ersASCSInstanceNumber'))]", + "idleTimeoutInMinutesERS": 30, + "loadBalancingRulesASCS": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", + "backendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRulesSCS": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", + "backendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } - }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolERS": "[concat(variables('lbPrefix'), 'BackendPoolERS')]", - "loadBalancerFrontendERS": "[concat(variables('lbPrefix'), 'FrontendERS')]", - "lbProbePortERS": "[concat(variables('lbPrefix'), 'ProbePortERS')]", - "lbProbePortInternalERS": "[add(62100, parameters('ersASCSInstanceNumber'))]", - "idleTimeoutInMinutesERS": 30, - "loadBalancingRulesASCS": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", - "backendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRulesSCS": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", - "backendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRules": { - "ABAP": "[variables('loadBalancingRulesASCS')]", - "JAVA": "[variables('loadBalancingRulesSCS')]", - "ABAP+JAVA": "[concat(variables('loadBalancingRulesASCS'), variables('loadBalancingRulesSCS'))]" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendERS')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolERS')]" - } - ], - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalERS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortERS')]" - } - ] + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRules": { + "ABAP": "[variables('loadBalancingRulesASCS')]", + "JAVA": "[variables('loadBalancingRulesSCS')]", + "ABAP+JAVA": "[concat(variables('loadBalancingRulesASCS'), variables('loadBalancingRulesSCS'))]" }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendERS')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolERS')]" + } + ], + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalERS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" - }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortERS')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-ERS-Windows.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-ERS-Windows.json index 31f5e9ffcc7a..2ff354045b0a 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-ERS-Windows.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-ERS-Windows.json @@ -1,97 +1,104 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } - }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[parameters('nicBackAddressPoolsArray')]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[parameters('frontendIPConfigurationsArray')]", - "type": "array" - }, - "backendAddressPools": { - "value": "[parameters('backendAddressPoolsArray')]", - "type": "array" - }, - "loadBalancingRules": { - "value": "[parameters('loadBalancingRulesArray')]", - "type": "array" - }, - "probes": { - "value": "[parameters('probesArray')]", - "type": "array" - } + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[parameters('nicBackAddressPoolsArray')]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[parameters('frontendIPConfigurationsArray')]", + "type": "array" + }, + "backendAddressPools": { + "value": "[parameters('backendAddressPoolsArray')]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[parameters('loadBalancingRulesArray')]", + "type": "array" + }, + "probes": { + "value": "[parameters('probesArray')]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-ERS0.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-ERS0.json index dad91bc38e71..aa8a93e20eb5 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-ERS0.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-ERS0.json @@ -1,97 +1,104 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } - }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": [], - "type": "array" - }, - "frontendIPConfigurations": { - "value": [], - "type": "array" - }, - "backendAddressPools": { - "value": [], - "type": "array" - }, - "loadBalancingRules": { - "value": [], - "type": "array" - }, - "probes": { - "value": [], - "type": "array" - } + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": [], + "type": "array" + }, + "frontendIPConfigurations": { + "value": [], + "type": "array" + }, + "backendAddressPools": { + "value": [], + "type": "array" + }, + "loadBalancingRules": { + "value": [], + "type": "array" + }, + "probes": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-SCS.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-SCS.json index 226e5eaaab30..a3acfd5a9802 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-SCS.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-SCS.json @@ -1,462 +1,469 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "metadata": { + "description": "The type of the Operating System" + } + }, + "ascsInstanceNumber": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The instance number of the ASCS." + } + }, + "scsInstanceNumber": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance number of the SCS." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolxSCS": "[concat(variables('lbPrefix'), 'BackendPoolxSCS')]", + "loadBalancerFrontendxSCS": "[concat(variables('lbPrefix'), 'FrontendxSCS')]", + "lbProbePortxSCS": "[concat(variables('lbPrefix'), 'ProbePortxSCS')]", + "lbProbePortInternalxSCS": "[add(62000, parameters('ascsInstanceNumber'))]", + "idleTimeoutInMinutesxSCS": 30, + "lbRulesFileShare": { + "Linux": [], + "Windows": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": 445, + "backendPort": 445, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '445')]" }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": 5985, + "backendPort": 5985, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '5985')]" + } + ] + }, + "lbRulesABAP": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3200, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3200, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "osType": { - "type": "string", - "metadata": { - "description": "The type of the Operating System" - } + "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3600, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3600, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "ascsInstanceNumber": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The instance number of the ASCS." - } + "name": "[concat(variables('lbrulePrefix'), '36', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3900, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3900, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "scsInstanceNumber": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance number of the SCS." - } + "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(8100, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(8100, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } + "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '16')]" + } + ], + "lbRulesJAVA": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3200, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3200, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3300, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } - }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolxSCS": "[concat(variables('lbPrefix'), 'BackendPoolxSCS')]", - "loadBalancerFrontendxSCS": "[concat(variables('lbPrefix'), 'FrontendxSCS')]", - "lbProbePortxSCS": "[concat(variables('lbPrefix'), 'ProbePortxSCS')]", - "lbProbePortInternalxSCS": "[add(62000, parameters('ascsInstanceNumber'))]", - "idleTimeoutInMinutesxSCS": 30, - "lbRulesFileShare": { - "Linux": [], - "Windows": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": 445, - "backendPort": 445, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '445')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": 5985, - "backendPort": 5985, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5985')]" - } - ] + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3900, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3900, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "lbRulesABAP": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3200, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3200, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3600, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3600, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '36', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3900, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3900, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(8100, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(8100, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '16')]" - } - ], - "lbRulesJAVA": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3200, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3200, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3300, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3900, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3900, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(8100, parameters('scsInstanceNumber'))]", - "backendPort": "[add(8100, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRules": { - "ABAP": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'))]", - "JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesJAVA'))]", - "ABAP+JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'), variables('lbRulesJAVA'))]" + "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(8100, parameters('scsInstanceNumber'))]", + "backendPort": "[add(8100, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendxSCS')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolxSCS')]" - } - ], - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalxSCS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortxSCS')]" - } - ] - }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRules": { + "ABAP": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'))]", + "JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesJAVA'))]", + "ABAP+JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'), variables('lbRulesJAVA'))]" + }, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('loadBalancerFrontendxSCS')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolxSCS')]" + } + ], + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalxSCS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "[variables('lbProbePortxSCS')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-SCS0.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-SCS0.json index cef2a2eacca2..be872832bb12 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-SCS0.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/lb-SCS0.json @@ -1,199 +1,210 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "osType": { - "type": "string", - "metadata": { - "description": "The type of the Operating System" - } - }, - "ascsInstanceNumber": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The instance number of the ASCS." - } - }, - "scsInstanceNumber": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance number of the SCS." - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "metadata": { + "description": "The type of the Operating System" + } + }, + "ascsInstanceNumber": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The instance number of the ASCS." + } + }, + "scsInstanceNumber": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance number of the SCS." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "lb", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "loadBalancerFrontendNFS": "[concat(variables('lbPrefix'), 'FrontendNFS')]", + "lbProbePortNFS": "[concat(variables('lbPrefix'), 'ProbePortNFS')]", + "backendPoolNFS": "[concat(variables('lbPrefix'), 'BackendPoolNFS')]", + "lbProbePortInternalNFS": 61000, + "idleTimeoutInMinutesNFS": 30, + "nicBackAddressPools": { + "Linux": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" } + ], + "Windows": [] }, - "variables": { - "lbPrefix": "lb", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "loadBalancerFrontendNFS": "[concat(variables('lbPrefix'), 'FrontendNFS')]", - "lbProbePortNFS": "[concat(variables('lbPrefix'), 'ProbePortNFS')]", - "backendPoolNFS": "[concat(variables('lbPrefix'), 'BackendPoolNFS')]", - "lbProbePortInternalNFS": 61000, - "idleTimeoutInMinutesNFS": 30, - "nicBackAddressPools": { - "Linux": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - } - ], - "Windows": [] - }, - "frontendIPConfigurations": { - "Linux": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendNFS')]" - } - ], - "Windows": [] - }, - "backendAddressPools": { - "Linux": [{ - "name": "[variables('backendPoolNFS')]" - }], - "Windows": [] - }, - "loadBalancingRules": { - "Linux": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" - }, - "protocol": "Tcp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '2049T')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" - }, - "protocol": "Udp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '2049U')]" - } - ], - "Windows": [] - }, - "probes": { - "Linux": [{ - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalNFS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortNFS')]" - }], - "Windows": [] - }, - "nicBackAddressPoolsResult": "[variables('nicBackAddressPools')[parameters('osType')]]", - "frontendIPConfigurationsResult": "[variables('frontendIPConfigurations')[parameters('osType')]]", - "backendAddressPoolsResult": "[variables('backendAddressPools')[parameters('osType')]]", - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('osType')]]", - "probesResult": "[variables('probes')[parameters('osType')]]" - }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[variables('nicBackAddressPoolsResult')]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[variables('frontendIPConfigurationsResult')]", - "type": "array" - }, - "backendAddressPools": { - "value": "[variables('backendAddressPoolsResult')]", - "type": "array" - }, - "loadBalancingRules": { - "value": "[variables('loadBalancingRulesResult')]", - "type": "array" - }, - "probes": { - "value": "[variables('probesResult')]", - "type": "array" + "frontendIPConfigurations": { + "Linux": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" + }, + "name": "[variables('loadBalancerFrontendNFS')]" } + ], + "Windows": [] + }, + "backendAddressPools": { + "Linux": [ + { + "name": "[variables('backendPoolNFS')]" + } + ], + "Windows": [] + }, + "loadBalancingRules": { + "Linux": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" + }, + "protocol": "Tcp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '2049T')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" + }, + "protocol": "Udp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '2049U')]" + } + ], + "Windows": [] + }, + "probes": { + "Linux": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalNFS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "[variables('lbProbePortNFS')]" + } + ], + "Windows": [] + }, + "nicBackAddressPoolsResult": "[variables('nicBackAddressPools')[parameters('osType')]]", + "frontendIPConfigurationsResult": "[variables('frontendIPConfigurations')[parameters('osType')]]", + "backendAddressPoolsResult": "[variables('backendAddressPools')[parameters('osType')]]", + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('osType')]]", + "probesResult": "[variables('probes')[parameters('osType')]]" + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[variables('nicBackAddressPoolsResult')]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[variables('frontendIPConfigurationsResult')]", + "type": "array" + }, + "backendAddressPools": { + "value": "[variables('backendAddressPoolsResult')]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[variables('loadBalancingRulesResult')]", + "type": "array" + }, + "probes": { + "value": "[variables('probesResult')]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/loadbalancer.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/loadbalancer.json index 9c12e39b48e6..8b87b6c92dbb 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/loadbalancer.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/loadbalancer.json @@ -1,349 +1,356 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "sapSystemCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The number of SAP systems for which the load balancer should be configured" - } - }, - "stackType": { - "type": "string", - "defaultValue": "ABAP", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "osType": { - "type": "string", - "defaultValue": "Windows", - "metadata": { - "description": "The type of the Operating System" - } - }, - "createXSCS": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Determines if the load balancer should be configured for one or more ASCS/SCS." - } - }, - "createDB": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Determines if the load balancer should be configured for one or more databases." - } - }, - "dbType": { - "type": "string", - "defaultValue": "SQL", - "metadata": { - "description": "The type of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sap-file-server-md/" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "sapSystemCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The number of SAP systems for which the load balancer should be configured" + } + }, + "stackType": { + "type": "string", + "defaultValue": "ABAP", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "defaultValue": "Windows", + "metadata": { + "description": "The type of the Operating System" + } + }, + "createXSCS": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Determines if the load balancer should be configured for one or more ASCS/SCS." + } + }, + "createDB": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Determines if the load balancer should be configured for one or more databases." + } + }, + "dbType": { + "type": "string", + "defaultValue": "SQL", + "metadata": { + "description": "The type of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sap-file-server-md/" + }, + "_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": { + "ascsInstanceNumber": 0, + "scsInstanceNumber": 1, + "ersASCSInstanceNumber": 2, + "ersSCSInstanceNumber": 3, + "dbInstanceNumber": 3, + "nestedDeploymentNameLBSCS": "[concat(parameters('loadBalancerName'), 'LBSCS')]", + "nestedDeploymentNameLBERS": "[concat(parameters('loadBalancerName'), 'LBERS')]", + "nestedDeploymentNameLBDB": "[concat(parameters('loadBalancerName'), 'LBDB')]", + "scsTemplates": { + "true": "[concat('lb-SCS.json')]", + "false": "[concat('lb-SCS0.json')]" + }, + "ersTemplates": { + "true": "[concat('lb-ERS-', parameters('osType'), '.json')]", + "false": "[concat('lb-ERS0.json')]" + }, + "dbTemplates": { + "true": "[concat('lb-DB-', parameters('dbType'), '.json')]", + "false": "[concat('lb-DB0.json')]" + }, + "scsTemplate": "[variables('scsTemplates')[string(parameters('createXSCS'))]]", + "ersTemplate": "[variables('ersTemplates')[string(parameters('createXSCS'))]]", + "dbTemplate": "[variables('dbTemplates')[string(parameters('createDB'))]]" + }, + "resources": [ + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBSCS'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-SCS0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "_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": "" + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "osType": { + "value": "[parameters('osType')]" + }, + "ascsInstanceNumber": { + "value": "[variables('ascsInstanceNumber')]" + }, + "scsInstanceNumber": { + "value": "[variables('scsInstanceNumber')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } } + } }, - "variables": { - "ascsInstanceNumber": 0, - "scsInstanceNumber": 1, - "ersASCSInstanceNumber": 2, - "ersSCSInstanceNumber": 3, - "dbInstanceNumber": 3, - "nestedDeploymentNameLBSCS": "[concat(parameters('loadBalancerName'), 'LBSCS')]", - "nestedDeploymentNameLBERS": "[concat(parameters('loadBalancerName'), 'LBERS')]", - "nestedDeploymentNameLBDB": "[concat(parameters('loadBalancerName'), 'LBDB')]", - "scsTemplates": { - "true": "[concat('lb-SCS.json')]", - "false": "[concat('lb-SCS0.json')]" - }, - "ersTemplates": { - "true": "[concat('lb-ERS-', parameters('osType'), '.json')]", - "false": "[concat('lb-ERS0.json')]" + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBSCS'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBSCS'), '0')]" + ], + "copy": { + "name": "scsLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('scsTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "dbTemplates": { - "true": "[concat('lb-DB-', parameters('dbType'), '.json')]", - "false": "[concat('lb-DB0.json')]" - }, - "scsTemplate": "[variables('scsTemplates')[string(parameters('createXSCS'))]]", - "ersTemplate": "[variables('ersTemplates')[string(parameters('createXSCS'))]]", - "dbTemplate": "[variables('dbTemplates')[string(parameters('createDB'))]]" + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "osType": { + "value": "[parameters('osType')]" + }, + "ascsInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ascsInstanceNumber'))]" + }, + "scsInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('scsInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.probes.value]" + } + } + } }, - "resources": [ - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBSCS'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-SCS0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "osType": { - "value": "[parameters('osType')]" - }, - "ascsInstanceNumber": { - "value": "[variables('ascsInstanceNumber')]" - }, - "scsInstanceNumber": { - "value": "[variables('scsInstanceNumber')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBSCS'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBSCS'), '0')]" - ], - "copy": { - "name": "scsLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('scsTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "osType": { - "value": "[parameters('osType')]" - }, - "ascsInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ascsInstanceNumber'))]" - }, - "scsInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('scsInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.probes.value]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBERS'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-ERS0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "stackType": { - "value": "[parameters('stackType')]" - }, - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBERS'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-ERS0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBERS'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBERS'), '0')]" - ], - "copy": { - "name": "ersLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('ersTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "ersASCSInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ersASCSInstanceNumber'))]" - }, - "ersSCSInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ersSCSInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.probes.value]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBDB'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-DB0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } + "parameters": { + "stackType": { + "value": "[parameters('stackType')]" + }, + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } + } + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBERS'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBERS'), '0')]" + ], + "copy": { + "name": "ersLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('ersTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBDB'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBDB'), '0')]" - ], - "copy": { - "name": "dbLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('dbTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "dbInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('dbInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.probes.value]" - } - } - } + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "ersASCSInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ersASCSInstanceNumber'))]" + }, + "ersSCSInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ersSCSInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.probes.value]" + } + } + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBDB'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-DB0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "type": "Microsoft.Network/loadBalancers", - "name": "[parameters('loadBalancerName')]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "scsLoop", - "ersLoop", - "dbLoop" - ], - "location": "[resourceGroup().location]", - "properties": { - "frontendIPConfigurations": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value)]", - "backendAddressPools": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.backendAddressPools.value)]", - "loadBalancingRules": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value)]", - "probes": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.probes.value)]" - } + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } } - ], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value)]", - "type": "array" + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBDB'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBDB'), '0')]" + ], + "copy": { + "name": "dbLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('dbTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "dbInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('dbInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.probes.value]" + } } + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "name": "[parameters('loadBalancerName')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "scsLoop", + "ersLoop", + "dbLoop" + ], + "location": "[parameters('location')]", + "properties": { + "frontendIPConfigurations": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value)]", + "backendAddressPools": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.backendAddressPools.value)]", + "loadBalancingRules": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value)]", + "probes": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.probes.value)]" + } + } + ], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value)]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/newnsg.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/newnsg.json index 07f71e49f4ae..a4dc17d062e5 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/newnsg.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/newnsg.json @@ -10,10 +10,20 @@ }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -58,7 +68,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('nsgName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": "[variables('selectedSecurityRules')]" } diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/newpip.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/newpip.json index 52fdf2eccd12..07cd7b3f655f 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/newpip.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/newpip.json @@ -13,19 +13,25 @@ "metadata": { "description": "Type of the public IP address, static or dynamic" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIpName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/newvnetnsg.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/newvnetnsg.json index cd79e863e6ab..1003d60a3611 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/newvnetnsg.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/newvnetnsg.json @@ -31,16 +31,22 @@ "metadata": { "description": "Name of the Network Security Group." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -61,4 +67,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/nic-config.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/nic-config.json index ef0154ea5216..a2d2bbf9bb51 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/nic-config.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/nic-config.json @@ -29,6 +29,13 @@ "metadata": { "description": "The id of the subnet you want to use." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -50,12 +57,11 @@ }, "selectedConfiguration": "[variables('nicConfigurations')[string(equals(length(parameters('subnetId')), 0))]]" }, - "resources": [ - ], + "resources": [], "outputs": { "selectedConfiguration": { "value": "[variables('selectedConfiguration')]", "type": "object" } } -} \ No newline at end of file +} diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/os-disk-parts-md.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/os-disk-parts-md.json index d26899e2f38e..7c40cc9b7ef1 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/os-disk-parts-md.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/os-disk-parts-md.json @@ -29,14 +29,21 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } @@ -60,11 +67,18 @@ "metadata": { "description": "Id of the managed disk." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "osDiskCaching": "ReadWrite", - "osDiskParts": { + "osDiskParts": { "image": { "imageReference": { "publisher": "[parameters('imagePublisher')]", diff --git a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/server-md.json b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/server-md.json index d74b9812955f..9eccbad557e6 100644 --- a/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/server-md.json +++ b/sap-3-tier-marketplace-image-multi-sid-xscs-md/shared/server-md.json @@ -72,7 +72,7 @@ "metadata": { "description": "Availability set." } - }, + }, "useAVSet": { "type": "bool", "defaultValue": false, @@ -97,12 +97,19 @@ "metadata": { "description": "URL to github templates." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "availableAVSetObj": { - "true": "[parameters('avSetObj')]", - "false": null + "true": "[parameters('avSetObj')]", + "false": null }, "internalAVSetObj": "[variables('availableAVSetObj')[toLower(string(parameters('useAVSet')))]]", "csExtension": { @@ -178,14 +185,14 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', variables('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -203,4 +210,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-user-image-converged-md/azuredeploy.json b/sap-3-tier-user-image-converged-md/azuredeploy.json index e3670d82fdf4..39faae9abd71 100644 --- a/sap-3-tier-user-image-converged-md/azuredeploy.json +++ b/sap-3-tier-user-image-converged-md/azuredeploy.json @@ -107,6 +107,13 @@ "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": { @@ -466,7 +473,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameCL')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -591,7 +598,7 @@ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameVnet'))]", "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBCL'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -737,7 +744,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameDI')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -788,7 +795,7 @@ "name": "nicDILoop", "count": "[variables('divmCount')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -925,4 +932,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-user-image-converged-md/shared/lb-DB-HANA.json b/sap-3-tier-user-image-converged-md/shared/lb-DB-HANA.json index a94e284e3140..a57c5a6f769d 100644 --- a/sap-3-tier-user-image-converged-md/shared/lb-DB-HANA.json +++ b/sap-3-tier-user-image-converged-md/shared/lb-DB-HANA.json @@ -1,164 +1,171 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", - "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", - "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", - "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", - "idleTimeoutInMinutesDB": 30, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendDB')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolDB')]" - } - ], - "loadBalancingRulesResult": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", - "backendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '15')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", - "backendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '17')]" - } - ], - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalDB')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortDB')]" - } - ] + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", + "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", + "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", + "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", + "idleTimeoutInMinutesDB": 30, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendDB')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolDB')]" + } + ], + "loadBalancingRulesResult": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", + "backendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '15')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", + "backendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '17')]" + } + ], + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalDB')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortDB')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-converged-md/shared/lb-DB-SQL.json b/sap-3-tier-user-image-converged-md/shared/lb-DB-SQL.json index 8045d5654028..8cabfc983f64 100644 --- a/sap-3-tier-user-image-converged-md/shared/lb-DB-SQL.json +++ b/sap-3-tier-user-image-converged-md/shared/lb-DB-SQL.json @@ -1,145 +1,152 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", - "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", - "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", - "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", - "idleTimeoutInMinutesDB": 30, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendDB')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolDB')]" - } - ], - "loadBalancingRulesResult": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": 1433, - "backendPort": 1433, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '1433')]" - } - ], - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalDB')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortDB')]" - } - ] + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", + "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", + "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", + "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", + "idleTimeoutInMinutesDB": 30, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendDB')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolDB')]" + } + ], + "loadBalancingRulesResult": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": 1433, + "backendPort": 1433, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '1433')]" + } + ], + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalDB')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortDB')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-converged-md/shared/lb-DB0.json b/sap-3-tier-user-image-converged-md/shared/lb-DB0.json index c7448bf65245..4c44e52542b6 100644 --- a/sap-3-tier-user-image-converged-md/shared/lb-DB0.json +++ b/sap-3-tier-user-image-converged-md/shared/lb-DB0.json @@ -1,84 +1,91 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": [], - "type": "array" - }, - "frontendIPConfigurations": { - "value": [], - "type": "array" - }, - "backendAddressPools": { - "value": [], - "type": "array" - }, - "loadBalancingRules": { - "value": [], - "type": "array" - }, - "probes": { - "value": [], - "type": "array" - } + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": [], + "type": "array" + }, + "frontendIPConfigurations": { + "value": [], + "type": "array" + }, + "backendAddressPools": { + "value": [], + "type": "array" + }, + "loadBalancingRules": { + "value": [], + "type": "array" + }, + "probes": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-converged-md/shared/lb-ERS-Linux.json b/sap-3-tier-user-image-converged-md/shared/lb-ERS-Linux.json index eab7cd301d3c..310d42bfddc9 100644 --- a/sap-3-tier-user-image-converged-md/shared/lb-ERS-Linux.json +++ b/sap-3-tier-user-image-converged-md/shared/lb-ERS-Linux.json @@ -1,300 +1,306 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolERS": "[concat(variables('lbPrefix'), 'BackendPoolERS')]", + "loadBalancerFrontendERS": "[concat(variables('lbPrefix'), 'FrontendERS')]", + "lbProbePortERS": "[concat(variables('lbPrefix'), 'ProbePortERS')]", + "lbProbePortInternalERS": "[add(62100, parameters('ersASCSInstanceNumber'))]", + "idleTimeoutInMinutesERS": 30, + "loadBalancingRulesASCS": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", + "backendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRulesSCS": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", + "backendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } - }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolERS": "[concat(variables('lbPrefix'), 'BackendPoolERS')]", - "loadBalancerFrontendERS": "[concat(variables('lbPrefix'), 'FrontendERS')]", - "lbProbePortERS": "[concat(variables('lbPrefix'), 'ProbePortERS')]", - "lbProbePortInternalERS": "[add(62100, parameters('ersASCSInstanceNumber'))]", - "idleTimeoutInMinutesERS": 30, - "loadBalancingRulesASCS": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", - "backendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRulesSCS": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", - "backendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRules": { - "ABAP": "[variables('loadBalancingRulesASCS')]", - "JAVA": "[variables('loadBalancingRulesSCS')]", - "ABAP+JAVA": "[concat(variables('loadBalancingRulesASCS'), variables('loadBalancingRulesSCS'))]" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendERS')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolERS')]" - } - ], - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalERS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortERS')]" - } - ] + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRules": { + "ABAP": "[variables('loadBalancingRulesASCS')]", + "JAVA": "[variables('loadBalancingRulesSCS')]", + "ABAP+JAVA": "[concat(variables('loadBalancingRulesASCS'), variables('loadBalancingRulesSCS'))]" }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendERS')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolERS')]" + } + ], + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalERS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" - }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortERS')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-converged-md/shared/lb-ERS-Windows.json b/sap-3-tier-user-image-converged-md/shared/lb-ERS-Windows.json index 31f5e9ffcc7a..2ff354045b0a 100644 --- a/sap-3-tier-user-image-converged-md/shared/lb-ERS-Windows.json +++ b/sap-3-tier-user-image-converged-md/shared/lb-ERS-Windows.json @@ -1,97 +1,104 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } - }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[parameters('nicBackAddressPoolsArray')]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[parameters('frontendIPConfigurationsArray')]", - "type": "array" - }, - "backendAddressPools": { - "value": "[parameters('backendAddressPoolsArray')]", - "type": "array" - }, - "loadBalancingRules": { - "value": "[parameters('loadBalancingRulesArray')]", - "type": "array" - }, - "probes": { - "value": "[parameters('probesArray')]", - "type": "array" - } + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[parameters('nicBackAddressPoolsArray')]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[parameters('frontendIPConfigurationsArray')]", + "type": "array" + }, + "backendAddressPools": { + "value": "[parameters('backendAddressPoolsArray')]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[parameters('loadBalancingRulesArray')]", + "type": "array" + }, + "probes": { + "value": "[parameters('probesArray')]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-converged-md/shared/lb-ERS0.json b/sap-3-tier-user-image-converged-md/shared/lb-ERS0.json index dad91bc38e71..aa8a93e20eb5 100644 --- a/sap-3-tier-user-image-converged-md/shared/lb-ERS0.json +++ b/sap-3-tier-user-image-converged-md/shared/lb-ERS0.json @@ -1,97 +1,104 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } - }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": [], - "type": "array" - }, - "frontendIPConfigurations": { - "value": [], - "type": "array" - }, - "backendAddressPools": { - "value": [], - "type": "array" - }, - "loadBalancingRules": { - "value": [], - "type": "array" - }, - "probes": { - "value": [], - "type": "array" - } + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": [], + "type": "array" + }, + "frontendIPConfigurations": { + "value": [], + "type": "array" + }, + "backendAddressPools": { + "value": [], + "type": "array" + }, + "loadBalancingRules": { + "value": [], + "type": "array" + }, + "probes": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-converged-md/shared/lb-SCS.json b/sap-3-tier-user-image-converged-md/shared/lb-SCS.json index 226e5eaaab30..a3acfd5a9802 100644 --- a/sap-3-tier-user-image-converged-md/shared/lb-SCS.json +++ b/sap-3-tier-user-image-converged-md/shared/lb-SCS.json @@ -1,462 +1,469 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "metadata": { + "description": "The type of the Operating System" + } + }, + "ascsInstanceNumber": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The instance number of the ASCS." + } + }, + "scsInstanceNumber": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance number of the SCS." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolxSCS": "[concat(variables('lbPrefix'), 'BackendPoolxSCS')]", + "loadBalancerFrontendxSCS": "[concat(variables('lbPrefix'), 'FrontendxSCS')]", + "lbProbePortxSCS": "[concat(variables('lbPrefix'), 'ProbePortxSCS')]", + "lbProbePortInternalxSCS": "[add(62000, parameters('ascsInstanceNumber'))]", + "idleTimeoutInMinutesxSCS": 30, + "lbRulesFileShare": { + "Linux": [], + "Windows": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": 445, + "backendPort": 445, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '445')]" }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": 5985, + "backendPort": 5985, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '5985')]" + } + ] + }, + "lbRulesABAP": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3200, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3200, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "osType": { - "type": "string", - "metadata": { - "description": "The type of the Operating System" - } + "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3600, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3600, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "ascsInstanceNumber": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The instance number of the ASCS." - } + "name": "[concat(variables('lbrulePrefix'), '36', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3900, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3900, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "scsInstanceNumber": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance number of the SCS." - } + "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(8100, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(8100, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } + "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '16')]" + } + ], + "lbRulesJAVA": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3200, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3200, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3300, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } - }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolxSCS": "[concat(variables('lbPrefix'), 'BackendPoolxSCS')]", - "loadBalancerFrontendxSCS": "[concat(variables('lbPrefix'), 'FrontendxSCS')]", - "lbProbePortxSCS": "[concat(variables('lbPrefix'), 'ProbePortxSCS')]", - "lbProbePortInternalxSCS": "[add(62000, parameters('ascsInstanceNumber'))]", - "idleTimeoutInMinutesxSCS": 30, - "lbRulesFileShare": { - "Linux": [], - "Windows": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": 445, - "backendPort": 445, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '445')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": 5985, - "backendPort": 5985, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5985')]" - } - ] + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3900, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3900, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "lbRulesABAP": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3200, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3200, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3600, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3600, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '36', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3900, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3900, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(8100, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(8100, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '16')]" - } - ], - "lbRulesJAVA": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3200, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3200, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3300, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3900, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3900, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(8100, parameters('scsInstanceNumber'))]", - "backendPort": "[add(8100, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRules": { - "ABAP": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'))]", - "JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesJAVA'))]", - "ABAP+JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'), variables('lbRulesJAVA'))]" + "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(8100, parameters('scsInstanceNumber'))]", + "backendPort": "[add(8100, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendxSCS')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolxSCS')]" - } - ], - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalxSCS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortxSCS')]" - } - ] - }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRules": { + "ABAP": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'))]", + "JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesJAVA'))]", + "ABAP+JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'), variables('lbRulesJAVA'))]" + }, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('loadBalancerFrontendxSCS')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolxSCS')]" + } + ], + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalxSCS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "[variables('lbProbePortxSCS')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-converged-md/shared/lb-SCS0.json b/sap-3-tier-user-image-converged-md/shared/lb-SCS0.json index cef2a2eacca2..be872832bb12 100644 --- a/sap-3-tier-user-image-converged-md/shared/lb-SCS0.json +++ b/sap-3-tier-user-image-converged-md/shared/lb-SCS0.json @@ -1,199 +1,210 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "osType": { - "type": "string", - "metadata": { - "description": "The type of the Operating System" - } - }, - "ascsInstanceNumber": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The instance number of the ASCS." - } - }, - "scsInstanceNumber": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance number of the SCS." - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "metadata": { + "description": "The type of the Operating System" + } + }, + "ascsInstanceNumber": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The instance number of the ASCS." + } + }, + "scsInstanceNumber": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance number of the SCS." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "lb", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "loadBalancerFrontendNFS": "[concat(variables('lbPrefix'), 'FrontendNFS')]", + "lbProbePortNFS": "[concat(variables('lbPrefix'), 'ProbePortNFS')]", + "backendPoolNFS": "[concat(variables('lbPrefix'), 'BackendPoolNFS')]", + "lbProbePortInternalNFS": 61000, + "idleTimeoutInMinutesNFS": 30, + "nicBackAddressPools": { + "Linux": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" } + ], + "Windows": [] }, - "variables": { - "lbPrefix": "lb", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "loadBalancerFrontendNFS": "[concat(variables('lbPrefix'), 'FrontendNFS')]", - "lbProbePortNFS": "[concat(variables('lbPrefix'), 'ProbePortNFS')]", - "backendPoolNFS": "[concat(variables('lbPrefix'), 'BackendPoolNFS')]", - "lbProbePortInternalNFS": 61000, - "idleTimeoutInMinutesNFS": 30, - "nicBackAddressPools": { - "Linux": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - } - ], - "Windows": [] - }, - "frontendIPConfigurations": { - "Linux": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendNFS')]" - } - ], - "Windows": [] - }, - "backendAddressPools": { - "Linux": [{ - "name": "[variables('backendPoolNFS')]" - }], - "Windows": [] - }, - "loadBalancingRules": { - "Linux": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" - }, - "protocol": "Tcp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '2049T')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" - }, - "protocol": "Udp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '2049U')]" - } - ], - "Windows": [] - }, - "probes": { - "Linux": [{ - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalNFS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortNFS')]" - }], - "Windows": [] - }, - "nicBackAddressPoolsResult": "[variables('nicBackAddressPools')[parameters('osType')]]", - "frontendIPConfigurationsResult": "[variables('frontendIPConfigurations')[parameters('osType')]]", - "backendAddressPoolsResult": "[variables('backendAddressPools')[parameters('osType')]]", - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('osType')]]", - "probesResult": "[variables('probes')[parameters('osType')]]" - }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[variables('nicBackAddressPoolsResult')]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[variables('frontendIPConfigurationsResult')]", - "type": "array" - }, - "backendAddressPools": { - "value": "[variables('backendAddressPoolsResult')]", - "type": "array" - }, - "loadBalancingRules": { - "value": "[variables('loadBalancingRulesResult')]", - "type": "array" - }, - "probes": { - "value": "[variables('probesResult')]", - "type": "array" + "frontendIPConfigurations": { + "Linux": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" + }, + "name": "[variables('loadBalancerFrontendNFS')]" } + ], + "Windows": [] + }, + "backendAddressPools": { + "Linux": [ + { + "name": "[variables('backendPoolNFS')]" + } + ], + "Windows": [] + }, + "loadBalancingRules": { + "Linux": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" + }, + "protocol": "Tcp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '2049T')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" + }, + "protocol": "Udp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '2049U')]" + } + ], + "Windows": [] + }, + "probes": { + "Linux": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalNFS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "[variables('lbProbePortNFS')]" + } + ], + "Windows": [] + }, + "nicBackAddressPoolsResult": "[variables('nicBackAddressPools')[parameters('osType')]]", + "frontendIPConfigurationsResult": "[variables('frontendIPConfigurations')[parameters('osType')]]", + "backendAddressPoolsResult": "[variables('backendAddressPools')[parameters('osType')]]", + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('osType')]]", + "probesResult": "[variables('probes')[parameters('osType')]]" + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[variables('nicBackAddressPoolsResult')]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[variables('frontendIPConfigurationsResult')]", + "type": "array" + }, + "backendAddressPools": { + "value": "[variables('backendAddressPoolsResult')]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[variables('loadBalancingRulesResult')]", + "type": "array" + }, + "probes": { + "value": "[variables('probesResult')]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-converged-md/shared/loadbalancer.json b/sap-3-tier-user-image-converged-md/shared/loadbalancer.json index 9c12e39b48e6..8b87b6c92dbb 100644 --- a/sap-3-tier-user-image-converged-md/shared/loadbalancer.json +++ b/sap-3-tier-user-image-converged-md/shared/loadbalancer.json @@ -1,349 +1,356 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "sapSystemCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The number of SAP systems for which the load balancer should be configured" - } - }, - "stackType": { - "type": "string", - "defaultValue": "ABAP", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "osType": { - "type": "string", - "defaultValue": "Windows", - "metadata": { - "description": "The type of the Operating System" - } - }, - "createXSCS": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Determines if the load balancer should be configured for one or more ASCS/SCS." - } - }, - "createDB": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Determines if the load balancer should be configured for one or more databases." - } - }, - "dbType": { - "type": "string", - "defaultValue": "SQL", - "metadata": { - "description": "The type of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sap-file-server-md/" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "sapSystemCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The number of SAP systems for which the load balancer should be configured" + } + }, + "stackType": { + "type": "string", + "defaultValue": "ABAP", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "defaultValue": "Windows", + "metadata": { + "description": "The type of the Operating System" + } + }, + "createXSCS": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Determines if the load balancer should be configured for one or more ASCS/SCS." + } + }, + "createDB": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Determines if the load balancer should be configured for one or more databases." + } + }, + "dbType": { + "type": "string", + "defaultValue": "SQL", + "metadata": { + "description": "The type of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sap-file-server-md/" + }, + "_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": { + "ascsInstanceNumber": 0, + "scsInstanceNumber": 1, + "ersASCSInstanceNumber": 2, + "ersSCSInstanceNumber": 3, + "dbInstanceNumber": 3, + "nestedDeploymentNameLBSCS": "[concat(parameters('loadBalancerName'), 'LBSCS')]", + "nestedDeploymentNameLBERS": "[concat(parameters('loadBalancerName'), 'LBERS')]", + "nestedDeploymentNameLBDB": "[concat(parameters('loadBalancerName'), 'LBDB')]", + "scsTemplates": { + "true": "[concat('lb-SCS.json')]", + "false": "[concat('lb-SCS0.json')]" + }, + "ersTemplates": { + "true": "[concat('lb-ERS-', parameters('osType'), '.json')]", + "false": "[concat('lb-ERS0.json')]" + }, + "dbTemplates": { + "true": "[concat('lb-DB-', parameters('dbType'), '.json')]", + "false": "[concat('lb-DB0.json')]" + }, + "scsTemplate": "[variables('scsTemplates')[string(parameters('createXSCS'))]]", + "ersTemplate": "[variables('ersTemplates')[string(parameters('createXSCS'))]]", + "dbTemplate": "[variables('dbTemplates')[string(parameters('createDB'))]]" + }, + "resources": [ + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBSCS'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-SCS0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "_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": "" + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "osType": { + "value": "[parameters('osType')]" + }, + "ascsInstanceNumber": { + "value": "[variables('ascsInstanceNumber')]" + }, + "scsInstanceNumber": { + "value": "[variables('scsInstanceNumber')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } } + } }, - "variables": { - "ascsInstanceNumber": 0, - "scsInstanceNumber": 1, - "ersASCSInstanceNumber": 2, - "ersSCSInstanceNumber": 3, - "dbInstanceNumber": 3, - "nestedDeploymentNameLBSCS": "[concat(parameters('loadBalancerName'), 'LBSCS')]", - "nestedDeploymentNameLBERS": "[concat(parameters('loadBalancerName'), 'LBERS')]", - "nestedDeploymentNameLBDB": "[concat(parameters('loadBalancerName'), 'LBDB')]", - "scsTemplates": { - "true": "[concat('lb-SCS.json')]", - "false": "[concat('lb-SCS0.json')]" - }, - "ersTemplates": { - "true": "[concat('lb-ERS-', parameters('osType'), '.json')]", - "false": "[concat('lb-ERS0.json')]" + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBSCS'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBSCS'), '0')]" + ], + "copy": { + "name": "scsLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('scsTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "dbTemplates": { - "true": "[concat('lb-DB-', parameters('dbType'), '.json')]", - "false": "[concat('lb-DB0.json')]" - }, - "scsTemplate": "[variables('scsTemplates')[string(parameters('createXSCS'))]]", - "ersTemplate": "[variables('ersTemplates')[string(parameters('createXSCS'))]]", - "dbTemplate": "[variables('dbTemplates')[string(parameters('createDB'))]]" + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "osType": { + "value": "[parameters('osType')]" + }, + "ascsInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ascsInstanceNumber'))]" + }, + "scsInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('scsInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.probes.value]" + } + } + } }, - "resources": [ - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBSCS'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-SCS0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "osType": { - "value": "[parameters('osType')]" - }, - "ascsInstanceNumber": { - "value": "[variables('ascsInstanceNumber')]" - }, - "scsInstanceNumber": { - "value": "[variables('scsInstanceNumber')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBSCS'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBSCS'), '0')]" - ], - "copy": { - "name": "scsLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('scsTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "osType": { - "value": "[parameters('osType')]" - }, - "ascsInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ascsInstanceNumber'))]" - }, - "scsInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('scsInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.probes.value]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBERS'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-ERS0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "stackType": { - "value": "[parameters('stackType')]" - }, - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBERS'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-ERS0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBERS'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBERS'), '0')]" - ], - "copy": { - "name": "ersLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('ersTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "ersASCSInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ersASCSInstanceNumber'))]" - }, - "ersSCSInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ersSCSInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.probes.value]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBDB'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-DB0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } + "parameters": { + "stackType": { + "value": "[parameters('stackType')]" + }, + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } + } + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBERS'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBERS'), '0')]" + ], + "copy": { + "name": "ersLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('ersTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBDB'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBDB'), '0')]" - ], - "copy": { - "name": "dbLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('dbTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "dbInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('dbInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.probes.value]" - } - } - } + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "ersASCSInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ersASCSInstanceNumber'))]" + }, + "ersSCSInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ersSCSInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.probes.value]" + } + } + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBDB'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-DB0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "type": "Microsoft.Network/loadBalancers", - "name": "[parameters('loadBalancerName')]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "scsLoop", - "ersLoop", - "dbLoop" - ], - "location": "[resourceGroup().location]", - "properties": { - "frontendIPConfigurations": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value)]", - "backendAddressPools": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.backendAddressPools.value)]", - "loadBalancingRules": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value)]", - "probes": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.probes.value)]" - } + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } } - ], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value)]", - "type": "array" + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBDB'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBDB'), '0')]" + ], + "copy": { + "name": "dbLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('dbTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "dbInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('dbInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.probes.value]" + } } + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "name": "[parameters('loadBalancerName')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "scsLoop", + "ersLoop", + "dbLoop" + ], + "location": "[parameters('location')]", + "properties": { + "frontendIPConfigurations": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value)]", + "backendAddressPools": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.backendAddressPools.value)]", + "loadBalancingRules": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value)]", + "probes": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.probes.value)]" + } + } + ], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value)]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-converged-md/shared/newnsg.json b/sap-3-tier-user-image-converged-md/shared/newnsg.json index 07f71e49f4ae..a4dc17d062e5 100644 --- a/sap-3-tier-user-image-converged-md/shared/newnsg.json +++ b/sap-3-tier-user-image-converged-md/shared/newnsg.json @@ -10,10 +10,20 @@ }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -58,7 +68,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('nsgName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": "[variables('selectedSecurityRules')]" } diff --git a/sap-3-tier-user-image-converged-md/shared/newpip.json b/sap-3-tier-user-image-converged-md/shared/newpip.json index 52fdf2eccd12..07cd7b3f655f 100644 --- a/sap-3-tier-user-image-converged-md/shared/newpip.json +++ b/sap-3-tier-user-image-converged-md/shared/newpip.json @@ -13,19 +13,25 @@ "metadata": { "description": "Type of the public IP address, static or dynamic" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIpName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-user-image-converged-md/shared/newvnetnsg.json b/sap-3-tier-user-image-converged-md/shared/newvnetnsg.json index cd79e863e6ab..1003d60a3611 100644 --- a/sap-3-tier-user-image-converged-md/shared/newvnetnsg.json +++ b/sap-3-tier-user-image-converged-md/shared/newvnetnsg.json @@ -31,16 +31,22 @@ "metadata": { "description": "Name of the Network Security Group." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -61,4 +67,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-user-image-converged-md/shared/nic-config.json b/sap-3-tier-user-image-converged-md/shared/nic-config.json index ab7c369d31b3..fd5a0c945ad8 100644 --- a/sap-3-tier-user-image-converged-md/shared/nic-config.json +++ b/sap-3-tier-user-image-converged-md/shared/nic-config.json @@ -36,6 +36,13 @@ "metadata": { "description": "The id of the subnet you want to use." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -61,12 +68,11 @@ }, "selectedConfiguration": "[variables('nicConfigurations')[string(equals(length(parameters('subnetId')), 0))]]" }, - "resources": [ - ], + "resources": [], "outputs": { "selectedConfiguration": { "value": "[variables('selectedConfiguration')]", "type": "object" } } -} \ No newline at end of file +} diff --git a/sap-3-tier-user-image-converged-md/shared/os-disk-parts-md.json b/sap-3-tier-user-image-converged-md/shared/os-disk-parts-md.json index d26899e2f38e..7c40cc9b7ef1 100644 --- a/sap-3-tier-user-image-converged-md/shared/os-disk-parts-md.json +++ b/sap-3-tier-user-image-converged-md/shared/os-disk-parts-md.json @@ -29,14 +29,21 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } @@ -60,11 +67,18 @@ "metadata": { "description": "Id of the managed disk." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "osDiskCaching": "ReadWrite", - "osDiskParts": { + "osDiskParts": { "image": { "imageReference": { "publisher": "[parameters('imagePublisher')]", diff --git a/sap-3-tier-user-image-converged-md/shared/server-md.json b/sap-3-tier-user-image-converged-md/shared/server-md.json index d74b9812955f..9eccbad557e6 100644 --- a/sap-3-tier-user-image-converged-md/shared/server-md.json +++ b/sap-3-tier-user-image-converged-md/shared/server-md.json @@ -72,7 +72,7 @@ "metadata": { "description": "Availability set." } - }, + }, "useAVSet": { "type": "bool", "defaultValue": false, @@ -97,12 +97,19 @@ "metadata": { "description": "URL to github templates." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "availableAVSetObj": { - "true": "[parameters('avSetObj')]", - "false": null + "true": "[parameters('avSetObj')]", + "false": null }, "internalAVSetObj": "[variables('availableAVSetObj')[toLower(string(parameters('useAVSet')))]]", "csExtension": { @@ -178,14 +185,14 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', variables('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -203,4 +210,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-user-image-md/azuredeploy.json b/sap-3-tier-user-image-md/azuredeploy.json index 65306598b9f2..f2615f88022b 100644 --- a/sap-3-tier-user-image-md/azuredeploy.json +++ b/sap-3-tier-user-image-md/azuredeploy.json @@ -106,6 +106,13 @@ "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": { @@ -489,7 +496,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameASCS')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -611,7 +618,7 @@ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameVnet'))]", "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBASCS'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -753,7 +760,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameDB')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -852,7 +859,7 @@ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBDB'))]", "nicConfigDBloop" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -1000,7 +1007,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameDI')]", "apiVersion": "2016-04-30-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -1051,7 +1058,7 @@ "name": "nicDIloop", "count": "[variables('divmCount')]" }, - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -1191,4 +1198,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-user-image-md/shared/lb-DB-HANA.json b/sap-3-tier-user-image-md/shared/lb-DB-HANA.json index a94e284e3140..a57c5a6f769d 100644 --- a/sap-3-tier-user-image-md/shared/lb-DB-HANA.json +++ b/sap-3-tier-user-image-md/shared/lb-DB-HANA.json @@ -1,164 +1,171 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", - "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", - "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", - "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", - "idleTimeoutInMinutesDB": 30, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendDB')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolDB')]" - } - ], - "loadBalancingRulesResult": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", - "backendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '15')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", - "backendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '17')]" - } - ], - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalDB')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortDB')]" - } - ] + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", + "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", + "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", + "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", + "idleTimeoutInMinutesDB": 30, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendDB')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolDB')]" + } + ], + "loadBalancingRulesResult": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", + "backendPort": "[add(30015, mul(parameters('dbInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '15')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", + "backendPort": "[add(30017, mul(parameters('dbInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '3', padLeft(parameters('dbInstanceNumber'), 2, '0'), '17')]" + } + ], + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalDB')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortDB')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-md/shared/lb-DB-SQL.json b/sap-3-tier-user-image-md/shared/lb-DB-SQL.json index 8045d5654028..8cabfc983f64 100644 --- a/sap-3-tier-user-image-md/shared/lb-DB-SQL.json +++ b/sap-3-tier-user-image-md/shared/lb-DB-SQL.json @@ -1,145 +1,152 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", - "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", - "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", - "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", - "idleTimeoutInMinutesDB": 30, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendDB')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolDB')]" - } - ], - "loadBalancingRulesResult": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" - }, - "protocol": "Tcp", - "frontendPort": 1433, - "backendPort": 1433, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" - }, - "name": "[concat(variables('lbrulePrefix'), '1433')]" - } - ], - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalDB')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortDB')]" - } - ] + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('dbInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolDB": "[concat(variables('lbPrefix'), 'BackendPoolDB')]", + "loadBalancerFrontendDB": "[concat(variables('lbPrefix'), 'FrontendDB')]", + "lbProbePortDB": "[concat(variables('lbPrefix'), 'ProbePortDB')]", + "lbProbePortInternalDB": "[add(62500, parameters('dbInstanceNumber'))]", + "idleTimeoutInMinutesDB": 30, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendDB')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolDB')]" + } + ], + "loadBalancingRulesResult": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendDB'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolDB'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortDB'))]" + }, + "protocol": "Tcp", + "frontendPort": 1433, + "backendPort": 1433, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesDB')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '1433')]" + } + ], + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalDB')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortDB')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-md/shared/lb-DB0.json b/sap-3-tier-user-image-md/shared/lb-DB0.json index c7448bf65245..4c44e52542b6 100644 --- a/sap-3-tier-user-image-md/shared/lb-DB0.json +++ b/sap-3-tier-user-image-md/shared/lb-DB0.json @@ -1,84 +1,91 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "dbInstanceNumber": { - "type": "int", - "defaultValue": 4, - "metadata": { - "description": "The instance number of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": [], - "type": "array" - }, - "frontendIPConfigurations": { - "value": [], - "type": "array" - }, - "backendAddressPools": { - "value": [], - "type": "array" - }, - "loadBalancingRules": { - "value": [], - "type": "array" - }, - "probes": { - "value": [], - "type": "array" - } + "dbInstanceNumber": { + "type": "int", + "defaultValue": 4, + "metadata": { + "description": "The instance number of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": [], + "type": "array" + }, + "frontendIPConfigurations": { + "value": [], + "type": "array" + }, + "backendAddressPools": { + "value": [], + "type": "array" + }, + "loadBalancingRules": { + "value": [], + "type": "array" + }, + "probes": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-md/shared/lb-ERS-Linux.json b/sap-3-tier-user-image-md/shared/lb-ERS-Linux.json index eab7cd301d3c..310d42bfddc9 100644 --- a/sap-3-tier-user-image-md/shared/lb-ERS-Linux.json +++ b/sap-3-tier-user-image-md/shared/lb-ERS-Linux.json @@ -1,300 +1,306 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolERS": "[concat(variables('lbPrefix'), 'BackendPoolERS')]", + "loadBalancerFrontendERS": "[concat(variables('lbPrefix'), 'FrontendERS')]", + "lbProbePortERS": "[concat(variables('lbPrefix'), 'ProbePortERS')]", + "lbProbePortInternalERS": "[add(62100, parameters('ersASCSInstanceNumber'))]", + "idleTimeoutInMinutesERS": 30, + "loadBalancingRulesASCS": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", + "backendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRulesSCS": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", + "backendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } - }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolERS": "[concat(variables('lbPrefix'), 'BackendPoolERS')]", - "loadBalancerFrontendERS": "[concat(variables('lbPrefix'), 'FrontendERS')]", - "lbProbePortERS": "[concat(variables('lbPrefix'), 'ProbePortERS')]", - "lbProbePortInternalERS": "[add(62100, parameters('ersASCSInstanceNumber'))]", - "idleTimeoutInMinutesERS": 30, - "loadBalancingRulesASCS": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", - "backendPort": "[add(3300, parameters('ersASCSInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ersASCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersASCSInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRulesSCS": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", - "backendPort": "[add(3300, parameters('ersSCSInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRules": { - "ABAP": "[variables('loadBalancingRulesASCS')]", - "JAVA": "[variables('loadBalancingRulesSCS')]", - "ABAP+JAVA": "[concat(variables('loadBalancingRulesASCS'), variables('loadBalancingRulesSCS'))]" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendERS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortERS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ersSCSInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesERS')]" }, - - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendERS')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolERS')]" - } - ], - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalERS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortERS')]" - } - ] + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ersSCSInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRules": { + "ABAP": "[variables('loadBalancingRulesASCS')]", + "JAVA": "[variables('loadBalancingRulesSCS')]", + "ABAP+JAVA": "[concat(variables('loadBalancingRulesASCS'), variables('loadBalancingRulesSCS'))]" }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolERS'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[variables('loadBalancerFrontendERS')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolERS')]" + } + ], + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalERS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" - }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('lbProbePortERS')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-md/shared/lb-ERS-Windows.json b/sap-3-tier-user-image-md/shared/lb-ERS-Windows.json index 31f5e9ffcc7a..2ff354045b0a 100644 --- a/sap-3-tier-user-image-md/shared/lb-ERS-Windows.json +++ b/sap-3-tier-user-image-md/shared/lb-ERS-Windows.json @@ -1,97 +1,104 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } - }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[parameters('nicBackAddressPoolsArray')]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[parameters('frontendIPConfigurationsArray')]", - "type": "array" - }, - "backendAddressPools": { - "value": "[parameters('backendAddressPoolsArray')]", - "type": "array" - }, - "loadBalancingRules": { - "value": "[parameters('loadBalancingRulesArray')]", - "type": "array" - }, - "probes": { - "value": "[parameters('probesArray')]", - "type": "array" - } + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[parameters('nicBackAddressPoolsArray')]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[parameters('frontendIPConfigurationsArray')]", + "type": "array" + }, + "backendAddressPools": { + "value": "[parameters('backendAddressPoolsArray')]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[parameters('loadBalancingRulesArray')]", + "type": "array" + }, + "probes": { + "value": "[parameters('probesArray')]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-md/shared/lb-ERS0.json b/sap-3-tier-user-image-md/shared/lb-ERS0.json index dad91bc38e71..aa8a93e20eb5 100644 --- a/sap-3-tier-user-image-md/shared/lb-ERS0.json +++ b/sap-3-tier-user-image-md/shared/lb-ERS0.json @@ -1,97 +1,104 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "ersASCSInstanceNumber": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "The instance number of the ABAP ERS instance" - } - }, - "ersSCSInstanceNumber": { - "type": "int", - "defaultValue": 3, - "metadata": { - "description": "The instance number of the JAVA ERS instance" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } }, - "variables": {}, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": [], - "type": "array" - }, - "frontendIPConfigurations": { - "value": [], - "type": "array" - }, - "backendAddressPools": { - "value": [], - "type": "array" - }, - "loadBalancingRules": { - "value": [], - "type": "array" - }, - "probes": { - "value": [], - "type": "array" - } + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "ersASCSInstanceNumber": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "The instance number of the ABAP ERS instance" + } + }, + "ersSCSInstanceNumber": { + "type": "int", + "defaultValue": 3, + "metadata": { + "description": "The instance number of the JAVA ERS instance" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": [], + "type": "array" + }, + "frontendIPConfigurations": { + "value": [], + "type": "array" + }, + "backendAddressPools": { + "value": [], + "type": "array" + }, + "loadBalancingRules": { + "value": [], + "type": "array" + }, + "probes": { + "value": [], + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-md/shared/lb-SCS.json b/sap-3-tier-user-image-md/shared/lb-SCS.json index 226e5eaaab30..a3acfd5a9802 100644 --- a/sap-3-tier-user-image-md/shared/lb-SCS.json +++ b/sap-3-tier-user-image-md/shared/lb-SCS.json @@ -1,462 +1,469 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "metadata": { + "description": "The type of the Operating System" + } + }, + "ascsInstanceNumber": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The instance number of the ASCS." + } + }, + "scsInstanceNumber": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance number of the SCS." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "[concat('lb', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "backendPoolxSCS": "[concat(variables('lbPrefix'), 'BackendPoolxSCS')]", + "loadBalancerFrontendxSCS": "[concat(variables('lbPrefix'), 'FrontendxSCS')]", + "lbProbePortxSCS": "[concat(variables('lbPrefix'), 'ProbePortxSCS')]", + "lbProbePortInternalxSCS": "[add(62000, parameters('ascsInstanceNumber'))]", + "idleTimeoutInMinutesxSCS": 30, + "lbRulesFileShare": { + "Linux": [], + "Windows": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": 445, + "backendPort": 445, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '445')]" }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": 5985, + "backendPort": 5985, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '5985')]" + } + ] + }, + "lbRulesABAP": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3200, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3200, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "osType": { - "type": "string", - "metadata": { - "description": "The type of the Operating System" - } + "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3600, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3600, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "ascsInstanceNumber": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The instance number of the ASCS." - } + "name": "[concat(variables('lbrulePrefix'), '36', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3900, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(3900, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "scsInstanceNumber": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance number of the SCS." - } + "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(8100, parameters('ascsInstanceNumber'))]", + "backendPort": "[add(8100, parameters('ascsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } + "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '16')]" + } + ], + "lbRulesJAVA": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3200, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3200, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } + "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3300, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3300, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } - } - }, - "variables": { - "lbPrefix": "[concat('lb', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "backendPoolxSCS": "[concat(variables('lbPrefix'), 'BackendPoolxSCS')]", - "loadBalancerFrontendxSCS": "[concat(variables('lbPrefix'), 'FrontendxSCS')]", - "lbProbePortxSCS": "[concat(variables('lbPrefix'), 'ProbePortxSCS')]", - "lbProbePortInternalxSCS": "[add(62000, parameters('ascsInstanceNumber'))]", - "idleTimeoutInMinutesxSCS": 30, - "lbRulesFileShare": { - "Linux": [], - "Windows": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": 445, - "backendPort": 445, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '445')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": 5985, - "backendPort": 5985, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5985')]" - } - ] + "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(3900, parameters('scsInstanceNumber'))]", + "backendPort": "[add(3900, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "lbRulesABAP": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3200, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3200, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3600, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3600, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '36', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3900, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(3900, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(8100, parameters('ascsInstanceNumber'))]", - "backendPort": "[add(8100, parameters('ascsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('ascsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('ascsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('ascsInstanceNumber'), 2, '0'), '16')]" - } - ], - "lbRulesJAVA": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3200, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3200, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '32', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3300, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3300, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '33', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(3900, parameters('scsInstanceNumber'))]", - "backendPort": "[add(3900, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(8100, parameters('scsInstanceNumber'))]", - "backendPort": "[add(8100, parameters('scsInstanceNumber'))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '13')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '14')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" - }, - "protocol": "Tcp", - "frontendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", - "backendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '16')]" - } - ], - "loadBalancingRules": { - "ABAP": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'))]", - "JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesJAVA'))]", - "ABAP+JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'), variables('lbRulesJAVA'))]" + "name": "[concat(variables('lbrulePrefix'), '39', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(8100, parameters('scsInstanceNumber'))]", + "backendPort": "[add(8100, parameters('scsInstanceNumber'))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "nicBackAddressPoolsResult": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" - } - ], - "frontendIPConfigurationsResult": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendxSCS')]" - } - ], - "backendAddressPoolsResult": [ - { - "name": "[variables('backendPoolxSCS')]" - } - ], - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", - "probesResult": [ - { - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalxSCS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortxSCS')]" - } - ] - }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '81', padLeft(parameters('scsInstanceNumber'), 2, '0'))]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50013, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "frontendIPConfigurations": { - "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '13')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50014, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "backendAddressPools": { - "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '14')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendxSCS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortxSCS'))]" + }, + "protocol": "Tcp", + "frontendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", + "backendPort": "[add(50016, mul(parameters('scsInstanceNumber'), 100))]", + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesxSCS')]" }, - "loadBalancingRules": { - "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", - "type": "array" + "name": "[concat(variables('lbrulePrefix'), '5', padLeft(parameters('scsInstanceNumber'), 2, '0'), '16')]" + } + ], + "loadBalancingRules": { + "ABAP": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'))]", + "JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesJAVA'))]", + "ABAP+JAVA": "[concat(variables('lbRulesFileShare')[parameters('osType')], variables('lbRulesABAP'), variables('lbRulesJAVA'))]" + }, + "nicBackAddressPoolsResult": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolxSCS'))]" + } + ], + "frontendIPConfigurationsResult": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "probes": { - "value": "[concat(parameters('probesArray'), variables('probesResult'))]", - "type": "array" - } + "name": "[variables('loadBalancerFrontendxSCS')]" + } + ], + "backendAddressPoolsResult": [ + { + "name": "[variables('backendPoolxSCS')]" + } + ], + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('stackType')]]", + "probesResult": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalxSCS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "[variables('lbProbePortxSCS')]" + } + ] + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(parameters('nicBackAddressPoolsArray'), variables('nicBackAddressPoolsResult'))]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[concat(parameters('frontendIPConfigurationsArray'), variables('frontendIPConfigurationsResult'))]", + "type": "array" + }, + "backendAddressPools": { + "value": "[concat(parameters('backendAddressPoolsArray'), variables('backendAddressPoolsResult'))]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[concat(parameters('loadBalancingRulesArray'), variables('loadBalancingRulesResult'))]", + "type": "array" + }, + "probes": { + "value": "[concat(parameters('probesArray'), variables('probesResult'))]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-md/shared/lb-SCS0.json b/sap-3-tier-user-image-md/shared/lb-SCS0.json index cef2a2eacca2..be872832bb12 100644 --- a/sap-3-tier-user-image-md/shared/lb-SCS0.json +++ b/sap-3-tier-user-image-md/shared/lb-SCS0.json @@ -1,199 +1,210 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "stackType": { - "type": "string", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "osType": { - "type": "string", - "metadata": { - "description": "The type of the Operating System" - } - }, - "ascsInstanceNumber": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The instance number of the ASCS." - } - }, - "scsInstanceNumber": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The instance number of the SCS." - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "nicBackAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backaddress pools for the Network Interface creation" - } - }, - "frontendIPConfigurationsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the frontend IP configurations for the Load Balancer creation" - } - }, - "backendAddressPoolsArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the backend address pools for the Load Balancer creation" - } - }, - "loadBalancingRulesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the fload balancing rules for the Load Balancer creation" - } - }, - "probesArray": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "The array that contains the probes for the Load Balancer creation" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "stackType": { + "type": "string", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "metadata": { + "description": "The type of the Operating System" + } + }, + "ascsInstanceNumber": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The instance number of the ASCS." + } + }, + "scsInstanceNumber": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The instance number of the SCS." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "nicBackAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backaddress pools for the Network Interface creation" + } + }, + "frontendIPConfigurationsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the frontend IP configurations for the Load Balancer creation" + } + }, + "backendAddressPoolsArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the backend address pools for the Load Balancer creation" + } + }, + "loadBalancingRulesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the fload balancing rules for the Load Balancer creation" + } + }, + "probesArray": { + "type": "array", + "defaultValue": [], + "metadata": { + "description": "The array that contains the probes for the Load Balancer creation" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "lbPrefix": "lb", + "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", + "loadBalancerFrontendNFS": "[concat(variables('lbPrefix'), 'FrontendNFS')]", + "lbProbePortNFS": "[concat(variables('lbPrefix'), 'ProbePortNFS')]", + "backendPoolNFS": "[concat(variables('lbPrefix'), 'BackendPoolNFS')]", + "lbProbePortInternalNFS": 61000, + "idleTimeoutInMinutesNFS": 30, + "nicBackAddressPools": { + "Linux": [ + { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" } + ], + "Windows": [] }, - "variables": { - "lbPrefix": "lb", - "lbrulePrefix": "[concat(variables('lbPrefix'), 'Rule')]", - "loadBalancerFrontendNFS": "[concat(variables('lbPrefix'), 'FrontendNFS')]", - "lbProbePortNFS": "[concat(variables('lbPrefix'), 'ProbePortNFS')]", - "backendPoolNFS": "[concat(variables('lbPrefix'), 'BackendPoolNFS')]", - "lbProbePortInternalNFS": 61000, - "idleTimeoutInMinutesNFS": 30, - "nicBackAddressPools": { - "Linux": [ - { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - } - ], - "Windows": [] - }, - "frontendIPConfigurations": { - "Linux": [ - { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[variables('loadBalancerFrontendNFS')]" - } - ], - "Windows": [] - }, - "backendAddressPools": { - "Linux": [{ - "name": "[variables('backendPoolNFS')]" - }], - "Windows": [] - }, - "loadBalancingRules": { - "Linux": [ - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" - }, - "protocol": "Tcp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '2049T')]" - }, - { - "properties": { - "frontendIPConfiguration": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" - }, - "backendAddressPool": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" - }, - "probe": { - "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" - }, - "protocol": "Udp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" - }, - "name": "[concat(variables('lbrulePrefix'), '2049U')]" - } - ], - "Windows": [] - }, - "probes": { - "Linux": [{ - "properties": { - "protocol": "Tcp", - "port": "[variables('lbProbePortInternalNFS')]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[variables('lbProbePortNFS')]" - }], - "Windows": [] - }, - "nicBackAddressPoolsResult": "[variables('nicBackAddressPools')[parameters('osType')]]", - "frontendIPConfigurationsResult": "[variables('frontendIPConfigurations')[parameters('osType')]]", - "backendAddressPoolsResult": "[variables('backendAddressPools')[parameters('osType')]]", - "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('osType')]]", - "probesResult": "[variables('probes')[parameters('osType')]]" - }, - "resources": [], - "outputs": { - "nicBackAddressPools": { - "value": "[variables('nicBackAddressPoolsResult')]", - "type": "array" - }, - "frontendIPConfigurations": { - "value": "[variables('frontendIPConfigurationsResult')]", - "type": "array" - }, - "backendAddressPools": { - "value": "[variables('backendAddressPoolsResult')]", - "type": "array" - }, - "loadBalancingRules": { - "value": "[variables('loadBalancingRulesResult')]", - "type": "array" - }, - "probes": { - "value": "[variables('probesResult')]", - "type": "array" + "frontendIPConfigurations": { + "Linux": [ + { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" + }, + "name": "[variables('loadBalancerFrontendNFS')]" } + ], + "Windows": [] + }, + "backendAddressPools": { + "Linux": [ + { + "name": "[variables('backendPoolNFS')]" + } + ], + "Windows": [] + }, + "loadBalancingRules": { + "Linux": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" + }, + "protocol": "Tcp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '2049T')]" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/frontendIpConfigurations/', variables('loadBalancerFrontendNFS'))]" + }, + "backendAddressPool": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/backendAddressPools/', variables('backendPoolNFS'))]" + }, + "probe": { + "id": "[concat(resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName')), '/probes/', variables('lbProbePortNFS'))]" + }, + "protocol": "Udp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": "[variables('idleTimeoutInMinutesNFS')]" + }, + "name": "[concat(variables('lbrulePrefix'), '2049U')]" + } + ], + "Windows": [] + }, + "probes": { + "Linux": [ + { + "properties": { + "protocol": "Tcp", + "port": "[variables('lbProbePortInternalNFS')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "[variables('lbProbePortNFS')]" + } + ], + "Windows": [] + }, + "nicBackAddressPoolsResult": "[variables('nicBackAddressPools')[parameters('osType')]]", + "frontendIPConfigurationsResult": "[variables('frontendIPConfigurations')[parameters('osType')]]", + "backendAddressPoolsResult": "[variables('backendAddressPools')[parameters('osType')]]", + "loadBalancingRulesResult": "[variables('loadBalancingRules')[parameters('osType')]]", + "probesResult": "[variables('probes')[parameters('osType')]]" + }, + "resources": [], + "outputs": { + "nicBackAddressPools": { + "value": "[variables('nicBackAddressPoolsResult')]", + "type": "array" + }, + "frontendIPConfigurations": { + "value": "[variables('frontendIPConfigurationsResult')]", + "type": "array" + }, + "backendAddressPools": { + "value": "[variables('backendAddressPoolsResult')]", + "type": "array" + }, + "loadBalancingRules": { + "value": "[variables('loadBalancingRulesResult')]", + "type": "array" + }, + "probes": { + "value": "[variables('probesResult')]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-md/shared/loadbalancer.json b/sap-3-tier-user-image-md/shared/loadbalancer.json index 3ba916d323fa..8b87b6c92dbb 100644 --- a/sap-3-tier-user-image-md/shared/loadbalancer.json +++ b/sap-3-tier-user-image-md/shared/loadbalancer.json @@ -1,349 +1,356 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "sapSystemCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The number of SAP systems for which the load balancer should be configured" - } - }, - "stackType": { - "type": "string", - "defaultValue": "ABAP", - "metadata": { - "description": "The stack type of the SAP system." - } - }, - "osType": { - "type": "string", - "defaultValue": "Windows", - "metadata": { - "description": "The type of the Operating System" - } - }, - "createXSCS": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Determines if the load balancer should be configured for one or more ASCS/SCS." - } - }, - "createDB": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Determines if the load balancer should be configured for one or more databases." - } - }, - "dbType": { - "type": "string", - "defaultValue": "SQL", - "metadata": { - "description": "The type of the database" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sap-file-server-md/" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "sapSystemCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The number of SAP systems for which the load balancer should be configured" + } + }, + "stackType": { + "type": "string", + "defaultValue": "ABAP", + "metadata": { + "description": "The stack type of the SAP system." + } + }, + "osType": { + "type": "string", + "defaultValue": "Windows", + "metadata": { + "description": "The type of the Operating System" + } + }, + "createXSCS": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Determines if the load balancer should be configured for one or more ASCS/SCS." + } + }, + "createDB": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Determines if the load balancer should be configured for one or more databases." + } + }, + "dbType": { + "type": "string", + "defaultValue": "SQL", + "metadata": { + "description": "The type of the database" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sap-file-server-md/" + }, + "_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": { + "ascsInstanceNumber": 0, + "scsInstanceNumber": 1, + "ersASCSInstanceNumber": 2, + "ersSCSInstanceNumber": 3, + "dbInstanceNumber": 3, + "nestedDeploymentNameLBSCS": "[concat(parameters('loadBalancerName'), 'LBSCS')]", + "nestedDeploymentNameLBERS": "[concat(parameters('loadBalancerName'), 'LBERS')]", + "nestedDeploymentNameLBDB": "[concat(parameters('loadBalancerName'), 'LBDB')]", + "scsTemplates": { + "true": "[concat('lb-SCS.json')]", + "false": "[concat('lb-SCS0.json')]" + }, + "ersTemplates": { + "true": "[concat('lb-ERS-', parameters('osType'), '.json')]", + "false": "[concat('lb-ERS0.json')]" + }, + "dbTemplates": { + "true": "[concat('lb-DB-', parameters('dbType'), '.json')]", + "false": "[concat('lb-DB0.json')]" + }, + "scsTemplate": "[variables('scsTemplates')[string(parameters('createXSCS'))]]", + "ersTemplate": "[variables('ersTemplates')[string(parameters('createXSCS'))]]", + "dbTemplate": "[variables('dbTemplates')[string(parameters('createDB'))]]" + }, + "resources": [ + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBSCS'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-SCS0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "_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": "" + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "osType": { + "value": "[parameters('osType')]" + }, + "ascsInstanceNumber": { + "value": "[variables('ascsInstanceNumber')]" + }, + "scsInstanceNumber": { + "value": "[variables('scsInstanceNumber')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } } + } }, - "variables": { - "ascsInstanceNumber": 0, - "scsInstanceNumber": 1, - "ersASCSInstanceNumber": 2, - "ersSCSInstanceNumber": 3, - "dbInstanceNumber": 3, - "nestedDeploymentNameLBSCS": "[concat(parameters('loadBalancerName'), 'LBSCS')]", - "nestedDeploymentNameLBERS": "[concat(parameters('loadBalancerName'), 'LBERS')]", - "nestedDeploymentNameLBDB": "[concat(parameters('loadBalancerName'), 'LBDB')]", - "scsTemplates": { - "true": "[concat('lb-SCS.json')]", - "false": "[concat('lb-SCS0.json')]" - }, - "ersTemplates": { - "true": "[concat('lb-ERS-', parameters('osType'), '.json')]", - "false": "[concat('lb-ERS0.json')]" + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBSCS'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBSCS'), '0')]" + ], + "copy": { + "name": "scsLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('scsTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - "dbTemplates": { - "true": "[concat('lb-DB-', parameters('dbType'), '.json')]", - "false": "[concat('lb-DB0.json')]" - }, - "scsTemplate": "[variables('scsTemplates')[string(parameters('createXSCS'))]]", - "ersTemplate": "[variables('ersTemplates')[string(parameters('createXSCS'))]]", - "dbTemplate": "[variables('dbTemplates')[string(parameters('createDB'))]]" + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "osType": { + "value": "[parameters('osType')]" + }, + "ascsInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ascsInstanceNumber'))]" + }, + "scsInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('scsInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.probes.value]" + } + } + } }, - "resources": [ - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBSCS'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-SCS0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "osType": { - "value": "[parameters('osType')]" - }, - "ascsInstanceNumber": { - "value": "[variables('ascsInstanceNumber')]" - }, - "scsInstanceNumber": { - "value": "[variables('scsInstanceNumber')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBSCS'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBSCS'), '0')]" - ], - "copy": { - "name": "scsLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('scsTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "osType": { - "value": "[parameters('osType')]" - }, - "ascsInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ascsInstanceNumber'))]" - }, - "scsInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('scsInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBSCS'), copyIndex())).outputs.probes.value]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBERS'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-ERS0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "stackType": { - "value": "[parameters('stackType')]" - }, - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBERS'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-ERS0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBERS'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBERS'), '0')]" - ], - "copy": { - "name": "ersLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('ersTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "stackType": { - "value": "[parameters('stackType')]" - }, - "ersASCSInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ersASCSInstanceNumber'))]" - }, - "ersSCSInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('ersSCSInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.probes.value]" - } - } - } - }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBDB'), '0')]", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-DB0.json', parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - } - } - } + "parameters": { + "stackType": { + "value": "[parameters('stackType')]" + }, + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } + } + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBERS'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBERS'), '0')]" + ], + "copy": { + "name": "ersLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('ersTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "apiVersion": "2017-05-10", - "name": "[concat(variables('nestedDeploymentNameLBDB'), copyIndex(1))]", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBDB'), '0')]" - ], - "copy": { - "name": "dbLoop", - "count": "[parameters('sapSystemCount')]" - }, - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('dbTemplate'), parameters('_artifactsLocationSasToken'))]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "loadBalancerName": { - "value": "[parameters('loadBalancerName')]" - }, - "dbInstanceNumber": { - "value": "[add(mul(copyIndex(), 10), variables('dbInstanceNumber'))]" - }, - "subnetId": { - "value": "[parameters('subnetId')]" - }, - "nicBackAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.nicBackAddressPools.value]" - }, - "frontendIPConfigurationsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.frontendIPConfigurations.value]" - }, - "backendAddressPoolsArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.backendAddressPools.value]" - }, - "loadBalancingRulesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.loadBalancingRules.value]" - }, - "probesArray": { - "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.probes.value]" - } - } - } + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "stackType": { + "value": "[parameters('stackType')]" + }, + "ersASCSInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ersASCSInstanceNumber'))]" + }, + "ersSCSInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('ersSCSInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBERS'), copyIndex())).outputs.probes.value]" + } + } + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBDB'), '0')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/lb-DB0.json', parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" }, - { - "type": "Microsoft.Network/loadBalancers", - "name": "[parameters('loadBalancerName')]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "scsLoop", - "ersLoop", - "dbLoop" - ], - "location": "[resourceGroup().location]", - "properties": { - "frontendIPConfigurations": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value)]", - "backendAddressPools": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.backendAddressPools.value)]", - "loadBalancingRules": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value)]", - "probes": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.probes.value)]" - } + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + } } - ], - "outputs": { - "nicBackAddressPools": { - "value": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value)]", - "type": "array" + } + }, + { + "apiVersion": "2017-05-10", + "name": "[concat(variables('nestedDeploymentNameLBDB'), copyIndex(1))]", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBDB'), '0')]" + ], + "copy": { + "name": "dbLoop", + "count": "[parameters('sapSystemCount')]" + }, + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('_artifactsLocation'), '/shared/', variables('dbTemplate'), parameters('_artifactsLocationSasToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "loadBalancerName": { + "value": "[parameters('loadBalancerName')]" + }, + "dbInstanceNumber": { + "value": "[add(mul(copyIndex(), 10), variables('dbInstanceNumber'))]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "nicBackAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.nicBackAddressPools.value]" + }, + "frontendIPConfigurationsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.frontendIPConfigurations.value]" + }, + "backendAddressPoolsArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.backendAddressPools.value]" + }, + "loadBalancingRulesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.loadBalancingRules.value]" + }, + "probesArray": { + "value": "[reference(concat(variables('nestedDeploymentNameLBDB'), copyIndex())).outputs.probes.value]" + } } + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "name": "[parameters('loadBalancerName')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "scsLoop", + "ersLoop", + "dbLoop" + ], + "location": "[parameters('location')]", + "properties": { + "frontendIPConfigurations": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.frontendIPConfigurations.value)]", + "backendAddressPools": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.backendAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.backendAddressPools.value)]", + "loadBalancingRules": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.loadBalancingRules.value)]", + "probes": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.probes.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.probes.value)]" + } + } + ], + "outputs": { + "nicBackAddressPools": { + "value": "[concat(reference(concat(variables('nestedDeploymentNameLBSCS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBERS'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value, reference(concat(variables('nestedDeploymentNameLBDB'), parameters('sapSystemCount'))).outputs.nicBackAddressPools.value)]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-3-tier-user-image-md/shared/newnsg.json b/sap-3-tier-user-image-md/shared/newnsg.json index 07f71e49f4ae..a4dc17d062e5 100644 --- a/sap-3-tier-user-image-md/shared/newnsg.json +++ b/sap-3-tier-user-image-md/shared/newnsg.json @@ -10,10 +10,20 @@ }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -58,7 +68,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('nsgName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": "[variables('selectedSecurityRules')]" } diff --git a/sap-3-tier-user-image-md/shared/newpip.json b/sap-3-tier-user-image-md/shared/newpip.json index 52fdf2eccd12..07cd7b3f655f 100644 --- a/sap-3-tier-user-image-md/shared/newpip.json +++ b/sap-3-tier-user-image-md/shared/newpip.json @@ -13,19 +13,25 @@ "metadata": { "description": "Type of the public IP address, static or dynamic" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIpName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-user-image-md/shared/newvnetnsg.json b/sap-3-tier-user-image-md/shared/newvnetnsg.json index cd79e863e6ab..1003d60a3611 100644 --- a/sap-3-tier-user-image-md/shared/newvnetnsg.json +++ b/sap-3-tier-user-image-md/shared/newvnetnsg.json @@ -31,16 +31,22 @@ "metadata": { "description": "Name of the Network Security Group." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -61,4 +67,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-3-tier-user-image-md/shared/nic-config.json b/sap-3-tier-user-image-md/shared/nic-config.json index 526ea073896b..0a66cebe78ce 100644 --- a/sap-3-tier-user-image-md/shared/nic-config.json +++ b/sap-3-tier-user-image-md/shared/nic-config.json @@ -29,6 +29,13 @@ "metadata": { "description": "The id of the subnet you want to use." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -51,8 +58,7 @@ }, "selectedConfiguration": "[variables('nicConfigurations')[string(equals(length(parameters('subnetId')), 0))]]" }, - "resources": [ - ], + "resources": [], "outputs": { "selectedConfiguration": { "value": "[variables('selectedConfiguration')]", diff --git a/sap-3-tier-user-image-md/shared/os-disk-parts-md.json b/sap-3-tier-user-image-md/shared/os-disk-parts-md.json index d26899e2f38e..7c40cc9b7ef1 100644 --- a/sap-3-tier-user-image-md/shared/os-disk-parts-md.json +++ b/sap-3-tier-user-image-md/shared/os-disk-parts-md.json @@ -29,14 +29,21 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } @@ -60,11 +67,18 @@ "metadata": { "description": "Id of the managed disk." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "osDiskCaching": "ReadWrite", - "osDiskParts": { + "osDiskParts": { "image": { "imageReference": { "publisher": "[parameters('imagePublisher')]", diff --git a/sap-3-tier-user-image-md/shared/server-md.json b/sap-3-tier-user-image-md/shared/server-md.json index d74b9812955f..9eccbad557e6 100644 --- a/sap-3-tier-user-image-md/shared/server-md.json +++ b/sap-3-tier-user-image-md/shared/server-md.json @@ -72,7 +72,7 @@ "metadata": { "description": "Availability set." } - }, + }, "useAVSet": { "type": "bool", "defaultValue": false, @@ -97,12 +97,19 @@ "metadata": { "description": "URL to github templates." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "availableAVSetObj": { - "true": "[parameters('avSetObj')]", - "false": null + "true": "[parameters('avSetObj')]", + "false": null }, "internalAVSetObj": "[variables('availableAVSetObj')[toLower(string(parameters('useAVSet')))]]", "csExtension": { @@ -178,14 +185,14 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', variables('cseExtName'))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -203,4 +210,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-file-server-md/azuredeploy.json b/sap-file-server-md/azuredeploy.json index 0542e89e428e..f7c0135a8238 100644 --- a/sap-file-server-md/azuredeploy.json +++ b/sap-file-server-md/azuredeploy.json @@ -62,6 +62,13 @@ "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": { @@ -187,7 +194,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgNameCL')]", "apiVersion": "2018-04-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "condition": "[equals(length(parameters('subnetId')), 0)]", "properties": { "securityRules": "[variables('selectedSecurityRules')]" @@ -230,7 +237,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('avSetNameCL')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -347,7 +354,7 @@ "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameVnet'))]", "[concat('Microsoft.Resources/deployments/', variables('nestedDeploymentNameLBCL'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { diff --git a/sap-file-server-md/nestedtemplates/loadbalancer.json b/sap-file-server-md/nestedtemplates/loadbalancer.json index 19bc67ac8200..1a8c9553c5f4 100644 --- a/sap-file-server-md/nestedtemplates/loadbalancer.json +++ b/sap-file-server-md/nestedtemplates/loadbalancer.json @@ -1,183 +1,189 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "loadBalancerName": { - "type": "string", - "metadata": { - "description": "The name of the the load balancer" - } - }, - "sapSystemCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The number of SAP systems for which the load balancer should be configured" - } - }, - "osType": { - "type": "string", - "defaultValue": "Windows", - "metadata": { - "description": "The type of the Operating System" - } - }, - "subnetId": { - "type": "string", - "metadata": { - "description": "The id of the subnet you want to use." - } - }, - "_artifactsLocation": { - "type": "string", - "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." + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "metadata": { + "description": "The name of the the load balancer" + } + }, + "sapSystemCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The number of SAP systems for which the load balancer should be configured" + } + }, + "osType": { + "type": "string", + "defaultValue": "Windows", + "metadata": { + "description": "The type of the Operating System" + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "The id of the subnet you want to use." + } + }, + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sap-file-server-md/" + }, + "_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": { + "frontendIPConfigurations": { + "copy": [ + { + "name": "frontendIPConfigurations", + "count": "[parameters('sapSystemCount')]", + "input": { + "properties": { + "subnet": { + "id": "[parameters('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sap-file-server-md/" - }, - "_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." + "name": "[concat('lbFrontendFile', '-', copyIndex('frontendIPConfigurations'))]" + } + } + ] + }, + "backendAddressPools": { + "copy": [ + { + "name": "backendAddressPools", + "count": "[parameters('sapSystemCount')]", + "input": { + "name": "[concat('lbBackendFile', '-', copyIndex('backendAddressPools'))]" + } + } + ] + }, + "probes": { + "copy": [ + { + "name": "probes", + "count": "[parameters('sapSystemCount')]", + "input": { + "properties": { + "protocol": "Tcp", + "port": "[add(61000, copyIndex('probes'))]", + "intervalInSeconds": 5, + "numberOfProbes": 2 }, - "defaultValue": "" + "name": "[concat('lbProbeFile', '-', copyIndex('probes'))]" + } } + ] }, - "variables": { - "frontendIPConfigurations": { - "copy": [ - { - "name": "frontendIPConfigurations", - "count": "[parameters('sapSystemCount')]", - "input": { - "properties": { - "subnet": { - "id": "[parameters('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic" - }, - "name": "[concat('lbFrontendFile', '-', copyIndex('frontendIPConfigurations'))]" - } - } - ] - }, - "backendAddressPools": { - "copy": [ - { - "name": "backendAddressPools", - "count": "[parameters('sapSystemCount')]", - "input": { - "name": "[concat('lbBackendFile', '-', copyIndex('backendAddressPools'))]" - } - } - ] - }, - "probes": { - "copy": [ - { - "name": "probes", - "count": "[parameters('sapSystemCount')]", - "input": { - "properties": { - "protocol": "Tcp", - "port": "[add(61000, copyIndex('probes'))]", - "intervalInSeconds": 5, - "numberOfProbes": 2 - }, - "name": "[concat('lbProbeFile', '-', copyIndex('probes'))]" - } - } - ] - }, - "nicBackAddressPools": { - "copy": [ - { - "name": "nicBackAddressPools", - "count": "[parameters('sapSystemCount')]", - "input": { - "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools/', parameters('loadBalancerName'), concat('lbBackendFile', '-', copyIndex('nicBackAddressPools')))]" - } - } - ] - }, - "loadBalancingRulesLinux2049T": { - "copy": [ - { - "name": "loadBalancingRules", - "count": "[parameters('sapSystemCount')]", - "input": { - "properties": { - "frontendIPConfiguration": { - "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations/', parameters('loadBalancerName'), concat('lbFrontendFile', '-', copyIndex('loadBalancingRules')))]" - }, - "backendAddressPool": { - "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools/', parameters('loadBalancerName'), concat('lbBackendFile', '-', copyIndex('loadBalancingRules')))]" - }, - "probe": { - "id": "[resourceId('Microsoft.Network/loadBalancers/probes/', parameters('loadBalancerName'), concat('lbProbeFile', '-', copyIndex('loadBalancingRules')))]" - }, - "protocol": "Tcp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": 30 - }, - "name": "[concat('lbProbeFile2049T', '-', copyIndex('loadBalancingRules'))]" - } - } - ] - }, - "loadBalancingRulesLinux2049U": { - "copy": [ - { - "name": "loadBalancingRules", - "count": "[parameters('sapSystemCount')]", - "input": { - "properties": { - "frontendIPConfiguration": { - "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations/', parameters('loadBalancerName'), concat('lbFrontendFile', '-', copyIndex('loadBalancingRules')))]" - }, - "backendAddressPool": { - "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools/', parameters('loadBalancerName'), concat('lbBackendFile', '-', copyIndex('loadBalancingRules')))]" - }, - "probe": { - "id": "[resourceId('Microsoft.Network/loadBalancers/probes/', parameters('loadBalancerName'), concat('lbProbeFile', '-', copyIndex('loadBalancingRules')))]" - }, - "protocol": "Udp", - "frontendPort": 2049, - "backendPort": 2049, - "enableFloatingIP": true, - "idleTimeoutInMinutes": 30 - }, - "name": "[concat('lbProbeFile2049U', '-', copyIndex('loadBalancingRules'))]" - } - } - ] - }, - "loadBalancingRules": { - "Linux": "[concat(variables('loadBalancingRulesLinux2049T').loadBalancingRules, variables('loadBalancingRulesLinux2049U').loadBalancingRules)]", - "Windows": [] + "nicBackAddressPools": { + "copy": [ + { + "name": "nicBackAddressPools", + "count": "[parameters('sapSystemCount')]", + "input": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools/', parameters('loadBalancerName'), concat('lbBackendFile', '-', copyIndex('nicBackAddressPools')))]" + } } + ] }, - "resources": [ + "loadBalancingRulesLinux2049T": { + "copy": [ { - "type": "Microsoft.Network/loadBalancers", - "name": "[parameters('loadBalancerName')]", - "apiVersion": "2018-04-01", - "location": "[resourceGroup().location]", + "name": "loadBalancingRules", + "count": "[parameters('sapSystemCount')]", + "input": { "properties": { - "frontendIPConfigurations": "[variables('frontendIPConfigurations').frontendIPConfigurations]", - "backendAddressPools": "[variables('backendAddressPools').backendAddressPools]", - "loadBalancingRules": "[variables('loadBalancingRules')[parameters('osType')]]", - "probes": "[variables('probes').probes]" - } + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations/', parameters('loadBalancerName'), concat('lbFrontendFile', '-', copyIndex('loadBalancingRules')))]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools/', parameters('loadBalancerName'), concat('lbBackendFile', '-', copyIndex('loadBalancingRules')))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes/', parameters('loadBalancerName'), concat('lbProbeFile', '-', copyIndex('loadBalancingRules')))]" + }, + "protocol": "Tcp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": 30 + }, + "name": "[concat('lbProbeFile2049T', '-', copyIndex('loadBalancingRules'))]" + } } - ], - - "outputs": { - "nicBackAddressPools": { - "value": "[variables('nicBackAddressPools').nicBackAddressPools]", - "type": "array" + ] + }, + "loadBalancingRulesLinux2049U": { + "copy": [ + { + "name": "loadBalancingRules", + "count": "[parameters('sapSystemCount')]", + "input": { + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations/', parameters('loadBalancerName'), concat('lbFrontendFile', '-', copyIndex('loadBalancingRules')))]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools/', parameters('loadBalancerName'), concat('lbBackendFile', '-', copyIndex('loadBalancingRules')))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes/', parameters('loadBalancerName'), concat('lbProbeFile', '-', copyIndex('loadBalancingRules')))]" + }, + "protocol": "Udp", + "frontendPort": 2049, + "backendPort": 2049, + "enableFloatingIP": true, + "idleTimeoutInMinutes": 30 + }, + "name": "[concat('lbProbeFile2049U', '-', copyIndex('loadBalancingRules'))]" + } } + ] + }, + "loadBalancingRules": { + "Linux": "[concat(variables('loadBalancingRulesLinux2049T').loadBalancingRules, variables('loadBalancingRulesLinux2049U').loadBalancingRules)]", + "Windows": [] + } + }, + "resources": [ + { + "type": "Microsoft.Network/loadBalancers", + "name": "[parameters('loadBalancerName')]", + "apiVersion": "2018-04-01", + "location": "[parameters('location')]", + "properties": { + "frontendIPConfigurations": "[variables('frontendIPConfigurations').frontendIPConfigurations]", + "backendAddressPools": "[variables('backendAddressPools').backendAddressPools]", + "loadBalancingRules": "[variables('loadBalancingRules')[parameters('osType')]]", + "probes": "[variables('probes').probes]" + } + } + ], + "outputs": { + "nicBackAddressPools": { + "value": "[variables('nicBackAddressPools').nicBackAddressPools]", + "type": "array" } -} \ No newline at end of file + } +} diff --git a/sap-file-server-md/nestedtemplates/newpip.json b/sap-file-server-md/nestedtemplates/newpip.json index 52fdf2eccd12..07cd7b3f655f 100644 --- a/sap-file-server-md/nestedtemplates/newpip.json +++ b/sap-file-server-md/nestedtemplates/newpip.json @@ -13,19 +13,25 @@ "metadata": { "description": "Type of the public IP address, static or dynamic" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIpName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } } ] -} \ No newline at end of file +} diff --git a/sap-file-server-md/nestedtemplates/newvnetnsg.json b/sap-file-server-md/nestedtemplates/newvnetnsg.json index cd79e863e6ab..1003d60a3611 100644 --- a/sap-file-server-md/nestedtemplates/newvnetnsg.json +++ b/sap-file-server-md/nestedtemplates/newvnetnsg.json @@ -31,16 +31,22 @@ "metadata": { "description": "Name of the Network Security Group." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - }, + "variables": {}, "resources": [ { "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -61,4 +67,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sap-file-server-md/nestedtemplates/nic-config.json b/sap-file-server-md/nestedtemplates/nic-config.json index ef4f57207af7..fd5a0c945ad8 100644 --- a/sap-file-server-md/nestedtemplates/nic-config.json +++ b/sap-file-server-md/nestedtemplates/nic-config.json @@ -36,6 +36,13 @@ "metadata": { "description": "The id of the subnet you want to use." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -61,8 +68,7 @@ }, "selectedConfiguration": "[variables('nicConfigurations')[string(equals(length(parameters('subnetId')), 0))]]" }, - "resources": [ - ], + "resources": [], "outputs": { "selectedConfiguration": { "value": "[variables('selectedConfiguration')]", diff --git a/sap-file-server-md/nestedtemplates/os-disk-parts-md.json b/sap-file-server-md/nestedtemplates/os-disk-parts-md.json index d26899e2f38e..7c40cc9b7ef1 100644 --- a/sap-file-server-md/nestedtemplates/os-disk-parts-md.json +++ b/sap-file-server-md/nestedtemplates/os-disk-parts-md.json @@ -29,14 +29,21 @@ }, "osDiskType": { "type": "string", - "allowedValues": [ "image", "userImage", "osdisk" ], + "allowedValues": [ + "image", + "userImage", + "osdisk" + ], "metadata": { "description": "The type of OS disk." } }, "osType": { "type": "string", - "allowedValues": [ "Windows", "Linux" ], + "allowedValues": [ + "Windows", + "Linux" + ], "metadata": { "description": "The type of the operating system you want to deploy." } @@ -60,11 +67,18 @@ "metadata": { "description": "Id of the managed disk." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "osDiskCaching": "ReadWrite", - "osDiskParts": { + "osDiskParts": { "image": { "imageReference": { "publisher": "[parameters('imagePublisher')]", diff --git a/sap-file-server-md/nestedtemplates/server-md.json b/sap-file-server-md/nestedtemplates/server-md.json index 86e40d553c9a..4d8f68aaf360 100644 --- a/sap-file-server-md/nestedtemplates/server-md.json +++ b/sap-file-server-md/nestedtemplates/server-md.json @@ -72,7 +72,7 @@ "metadata": { "description": "Availability set." } - }, + }, "useAVSet": { "type": "bool", "defaultValue": false, @@ -97,12 +97,19 @@ "metadata": { "description": "URL to github templates." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "availableAVSetObj": { - "true": "[parameters('avSetObj')]", - "false": null + "true": "[parameters('avSetObj')]", + "false": null }, "internalAVSetObj": "[variables('availableAVSetObj')[toLower(string(parameters('useAVSet')))]]", "csExtension": { @@ -178,14 +185,14 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": "[variables('internalProperties')]" }, { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), '/', variables('cseExtName'))]", "apiVersion": "2017-12-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -203,4 +210,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sharepoint-adfs/azuredeploy.json b/sharepoint-adfs/azuredeploy.json index a096a09466fb..53cbf65477e8 100644 --- a/sharepoint-adfs/azuredeploy.json +++ b/sharepoint-adfs/azuredeploy.json @@ -5,7 +5,10 @@ "sharePointVersion": { "type": "string", "defaultValue": "2016", - "allowedValues": [ "2013", "2016" ], + "allowedValues": [ + "2013", + "2016" + ], "metadata": { "description": "Version of SharePoint farm to create." } @@ -109,7 +112,11 @@ "vmDCStorageAccountType": { "type": "string", "defaultValue": "Standard_LRS", - "allowedValues": [ "Standard_LRS", "Standard_GRS", "Premium_LRS" ], + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Premium_LRS" + ], "metadata": { "description": "Type of storage for the managed disks. Allowed values are \"Standard_LRS\", \"Standard_GRS\" and \"Premium_LRS\"" } @@ -124,7 +131,11 @@ "vmSQLStorageAccountType": { "type": "string", "defaultValue": "Premium_LRS", - "allowedValues": [ "Standard_LRS", "Standard_GRS", "Premium_LRS" ], + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Premium_LRS" + ], "metadata": { "description": "Type of storage for the managed disks. Allowed values are \"Standard_LRS\", \"Standard_GRS\" and \"Premium_LRS\"" } @@ -139,7 +150,11 @@ "vmSPStorageAccountType": { "type": "string", "defaultValue": "Premium_LRS", - "allowedValues": [ "Standard_LRS", "Standard_GRS", "Premium_LRS" ], + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Premium_LRS" + ], "metadata": { "description": "Type of storage for the managed disks. Allowed values are \"Standard_LRS\", \"Standard_GRS\" and \"Premium_LRS\"" } @@ -181,6 +196,13 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -288,7 +310,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSettings').nsgDCVNetName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "[variables('networkSettings').nsgDCVNetName]" }, @@ -315,7 +337,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSettings').nsgSQLVNetName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "[variables('networkSettings').nsgSQLVNetName]" }, @@ -356,7 +378,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSettings').nsgSPVNetName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "[variables('networkSettings').nsgSPVNetName]" }, @@ -382,7 +404,7 @@ { "name": "[variables('networkSettings').vNetPrivateName]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-10-01", "dependsOn": [ "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSettings').nsgDCVNetName)]", @@ -432,7 +454,7 @@ { "name": "[variables('vmDC').vmPublicIPName]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-10-01", "dependsOn": [], "tags": { @@ -448,7 +470,7 @@ { "name": "[variables('vmDC').vmNicName]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-10-01", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks', variables('networkSettings').vNetPrivateName)]", @@ -478,7 +500,7 @@ { "name": "[variables('generalSettings').vmDCName]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-12-01", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('vmDC').vmNicName)]" @@ -528,7 +550,7 @@ { "name": "ConfigureDCVM", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-12-01", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('generalSettings').vmDCName)]" @@ -576,7 +598,7 @@ { "name": "[variables('vmSQL').vmPublicIPName]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-10-01", "dependsOn": [], "tags": { @@ -592,7 +614,7 @@ { "name": "[variables('vmSQL').vmNicName]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-10-01", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks', variables('networkSettings').vNetPrivateName)]", @@ -621,7 +643,7 @@ { "name": "[variables('generalSettings').vmSQLName]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-12-01", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('vmSQL').vmNicName)]" @@ -667,13 +689,12 @@ ] } }, - "resources": [ - ] + "resources": [] }, { "name": "[variables('vmSP').vmPublicIPName]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-10-01", "dependsOn": [], "tags": { @@ -689,7 +710,7 @@ { "name": "[variables('vmSP').vmNicName]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-10-01", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks', variables('networkSettings').vNetPrivateName)]", @@ -718,7 +739,7 @@ { "name": "[variables('generalSettings').vmSPName]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-12-01", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('vmSP').vmNicName)]" @@ -762,8 +783,7 @@ "caching": "ReadWrite", "createOption": "Empty", "diskSizeGB": 64, - "managedDisk": { - } + "managedDisk": {} } ] }, @@ -775,13 +795,12 @@ ] } }, - "resources": [ - ] + "resources": [] }, { "name": "[concat(variables('generalSettings').vmSQLName,'/ConfigureSQLVM')]", "type": "Microsoft.Compute/virtualMachines/extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-12-01", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('generalSettings').vmDCName)]", @@ -833,7 +852,7 @@ { "name": "[concat(variables('generalSettings').vmSPName,'/ConfigureSPVM')]", "type": "Microsoft.Compute/virtualMachines/extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-12-01", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('generalSettings').vmDCName)]", @@ -908,7 +927,7 @@ "condition": "[equals(parameters('addFrontEndToFarm'), 'Yes')]", "name": "[variables('vmFE').vmPublicIPName]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-10-01", "dependsOn": [], "tags": { @@ -925,7 +944,7 @@ "condition": "[equals(parameters('addFrontEndToFarm'), 'Yes')]", "name": "[variables('vmFE').vmNicName]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-10-01", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks', variables('networkSettings').vNetPrivateName)]", @@ -955,7 +974,7 @@ "condition": "[equals(parameters('addFrontEndToFarm'), 'Yes')]", "name": "[variables('generalSettings').vmFEName]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-12-01", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces', variables('vmFE').vmNicName)]" @@ -999,8 +1018,7 @@ "caching": "ReadWrite", "createOption": "Empty", "diskSizeGB": 64, - "managedDisk": { - } + "managedDisk": {} } ] }, @@ -1012,14 +1030,13 @@ ] } }, - "resources": [ - ] + "resources": [] }, { "condition": "[equals(parameters('addFrontEndToFarm'), 'Yes')]", "name": "[concat(variables('generalSettings').vmFEName,'/ConfigureFEVM')]", "type": "Microsoft.Compute/virtualMachines/extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2017-12-01", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('generalSettings').vmDCName)]", @@ -1087,7 +1104,7 @@ "type": "Microsoft.DevTestLab/schedules", "name": "[variables('vmDC').shutdownResourceName]", "apiVersion": "2016-05-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('generalSettings').vmDCName)]" ], @@ -1110,7 +1127,7 @@ "type": "Microsoft.DevTestLab/schedules", "name": "[variables('vmSQL').shutdownResourceName]", "apiVersion": "2016-05-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('generalSettings').vmSQLName)]" ], @@ -1133,7 +1150,7 @@ "type": "Microsoft.DevTestLab/schedules", "name": "[variables('vmSP').shutdownResourceName]", "apiVersion": "2016-05-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('generalSettings').vmSPName)]" ], @@ -1156,7 +1173,7 @@ "type": "Microsoft.DevTestLab/schedules", "name": "[variables('vmFE').shutdownResourceName]", "apiVersion": "2016-05-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('generalSettings').vmFEName)]" ], @@ -1175,6 +1192,5 @@ } } ], - "outputs": { - } + "outputs": {} } diff --git a/sharepoint-server-farm-ha/azuredeploy.json b/sharepoint-server-farm-ha/azuredeploy.json index 02b0a0fd3b09..7f919278ef63 100644 --- a/sharepoint-server-farm-ha/azuredeploy.json +++ b/sharepoint-server-farm-ha/azuredeploy.json @@ -87,7 +87,7 @@ "artifactsLocationSasToken": "" }, "defaultValue": "" - }, + }, "domainName": { "type": "string", "metadata": { diff --git a/sharepoint-server-farm-ha/mainTemplate.json b/sharepoint-server-farm-ha/mainTemplate.json index fb4af9ba9106..230449edb949 100644 --- a/sharepoint-server-farm-ha/mainTemplate.json +++ b/sharepoint-server-farm-ha/mainTemplate.json @@ -1,1347 +1,1347 @@ { - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "location":{ - "type":"string", - "metadata":{ - "description":"The region to deploy the resources into" - }, - "defaultValue":"[resourceGroup().location]" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "The region to deploy the resources into" }, - "sharepointFarmName":{ - "type":"string", - "metadata":{ - "description":"The name of the Sharepoint farm" - }, - "defaultValue":"spfarm" + "defaultValue": "[resourceGroup().location]" + }, + "sharepointFarmName": { + "type": "string", + "metadata": { + "description": "The name of the Sharepoint farm" }, - "adminUsername":{ - "type":"string", - "metadata":{ - "description":"The name of the Administrator of the new VMs and Domain" - } - }, - "adminPassword":{ - "type":"securestring", - "metadata":{ - "description":"The password for the Administrator account of the new VMs and Domain" - } - }, - "adVMSize":{ - "type":"string", - "metadata":{ - "description":"The size of the AD VMs Created" - }, - "defaultValue":"Standard_DS1" - }, - "sqlVMSize":{ - "type":"string", - "metadata":{ - "description":"The size of the SQL VMs Created" - }, - "defaultValue":"Standard_DS3" - }, - "witnessVMSize":{ - "type":"string", - "metadata":{ - "description":"The size of the Witness VM Created" - }, - "defaultValue":"Standard_DS1" - }, - "spVMSize":{ - "type":"string", - "metadata":{ - "description":"The size of the SP VMs Created" - }, - "defaultValue":"Standard_DS2" - }, - "domainName":{ - "type":"string", - "metadata":{ - "description":"The FQDN of the AD Domain created " - }, - "defaultValue":"sphafarm.local" - }, - "sqlServerServiceAccountUserName":{ - "type":"string", - "metadata":{ - "description":"The SQL Server Service account name" - }, - "defaultValue":"sqlservice" - }, - "sqlServerServiceAccountPassword":{ - "type":"securestring", - "metadata":{ - "description":"The SQL Server Service account password" - } - }, - "sharePointSetupUserAccountUserName":{ - "type":"string", - "metadata":{ - "description":"The Sharepoint Setup account name" - }, - "defaultValue":"sp_setup" - }, - "sharePointSetupUserAccountPassword":{ - "type":"securestring", - "metadata":{ - "description":"The Sharepoint Setup account password" - } - }, - "sharePointFarmAccountUserName":{ - "type":"string", - "metadata":{ - "description":"The Sharepoint Farm account name" - }, - "defaultValue":"sp_farm" - }, - "sharePointFarmAccountPassword":{ - "type":"securestring", - "metadata":{ - "description":"The Sharepoint Farm account password" - } + "defaultValue": "spfarm" + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "The name of the Administrator of the new VMs and Domain" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "The password for the Administrator account of the new VMs and Domain" + } + }, + "adVMSize": { + "type": "string", + "metadata": { + "description": "The size of the AD VMs Created" }, - "sharePointFarmPassphrasePassword":{ - "type":"securestring", - "metadata":{ - "description":"The Sharepoint Farm Passphrase" - } + "defaultValue": "Standard_DS1" + }, + "sqlVMSize": { + "type": "string", + "metadata": { + "description": "The size of the SQL VMs Created" }, - "spSiteTemplateName":{ - "type":"string", - "metadata":{ - "description":"The Sharepoint Content Site Template Name" - }, - "defaultValue":"STS#0" + "defaultValue": "Standard_DS3" + }, + "witnessVMSize": { + "type": "string", + "metadata": { + "description": "The size of the Witness VM Created" }, - "storageAccountNamePrefix":{ - "type":"string", - "metadata":{ - "description":"The prefix of the new storage account created to store the VMs disks, different storage accounts will be created for AD,SQL and Sharepoint VMs" - } + "defaultValue": "Standard_DS1" + }, + "spVMSize": { + "type": "string", + "metadata": { + "description": "The size of the SP VMs Created" }, - "storageAccountType":{ - "type":"string", - "metadata":{ - "description":"The type of the Storage Account created" - }, - "defaultValue":"Premium_LRS" + "defaultValue": "Standard_DS2" + }, + "domainName": { + "type": "string", + "metadata": { + "description": "The FQDN of the AD Domain created " }, - "virtualNetworkAddressRange":{ - "type":"string", - "metadata":{ - "description":"The address range of the new VNET in CIDR format" - }, - "defaultValue":"10.0.0.0/16" + "defaultValue": "sphafarm.local" + }, + "sqlServerServiceAccountUserName": { + "type": "string", + "metadata": { + "description": "The SQL Server Service account name" }, - "staticSubnet":{ - "type":"string", - "metadata":{ - "description":"The address range of the subnet static IPs are allocated from in the new VNET" - }, - "defaultValue":"10.0.0.0/24" + "defaultValue": "sqlservice" + }, + "sqlServerServiceAccountPassword": { + "type": "securestring", + "metadata": { + "description": "The SQL Server Service account password" + } + }, + "sharePointSetupUserAccountUserName": { + "type": "string", + "metadata": { + "description": "The Sharepoint Setup account name" }, - "sqlSubnet":{ - "type":"string", - "metadata":{ - "description":"The address range of the SQL subnet created in the new VNET" - }, - "defaultValue":"10.0.1.0/24" + "defaultValue": "sp_setup" + }, + "sharePointSetupUserAccountPassword": { + "type": "securestring", + "metadata": { + "description": "The Sharepoint Setup account password" + } + }, + "sharePointFarmAccountUserName": { + "type": "string", + "metadata": { + "description": "The Sharepoint Farm account name" }, - "spWebSubnet":{ - "type":"string", - "metadata":{ - "description":"The address range of the SP Web subnet created in the new VNET" - }, - "defaultValue":"10.0.2.0/24" + "defaultValue": "sp_farm" + }, + "sharePointFarmAccountPassword": { + "type": "securestring", + "metadata": { + "description": "The Sharepoint Farm account password" + } + }, + "sharePointFarmPassphrasePassword": { + "type": "securestring", + "metadata": { + "description": "The Sharepoint Farm Passphrase" + } + }, + "spSiteTemplateName": { + "type": "string", + "metadata": { + "description": "The Sharepoint Content Site Template Name" }, - "spAppSubnet":{ - "type":"string", - "metadata":{ - "description":"The address range of the SP App subnet created in the new VNET" - }, - "defaultValue":"10.0.3.0/24" + "defaultValue": "STS#0" + }, + "storageAccountNamePrefix": { + "type": "string", + "metadata": { + "description": "The prefix of the new storage account created to store the VMs disks, different storage accounts will be created for AD,SQL and Sharepoint VMs" + } + }, + "storageAccountType": { + "type": "string", + "metadata": { + "description": "The type of the Storage Account created" }, - "adPDCNICIPAddress":{ - "type":"string", - "metadata":{ - "description":"The IP address of the new AD VM" - }, - "defaultValue":"10.0.0.4" + "defaultValue": "Premium_LRS" + }, + "virtualNetworkAddressRange": { + "type": "string", + "metadata": { + "description": "The address range of the new VNET in CIDR format" }, - "adBDCNICIPAddress":{ - "type":"string", - "metadata":{ - "description":"The IP address of the new AD VM" - }, - "defaultValue":"10.0.0.5" + "defaultValue": "10.0.0.0/16" + }, + "staticSubnet": { + "type": "string", + "metadata": { + "description": "The address range of the subnet static IPs are allocated from in the new VNET" }, - "sqlLBIPAddress":{ - "type":"string", - "metadata":{ - "description":"The IP address of the new SQL ILB" - }, - "defaultValue":"10.0.0.6" + "defaultValue": "10.0.0.0/24" + }, + "sqlSubnet": { + "type": "string", + "metadata": { + "description": "The address range of the SQL subnet created in the new VNET" }, - "spWebIPRGName":{ - "type":"string", - "defaultValue":"", - "metadata":{ - "description":"Resource Group containing existing SP Web IP address" - } + "defaultValue": "10.0.1.0/24" + }, + "spWebSubnet": { + "type": "string", + "metadata": { + "description": "The address range of the SP Web subnet created in the new VNET" }, - "spWebIPNewOrExisting":{ - "type":"string", - "defaultValue":"new", - "allowedValues":[ - "new", - "existing" - ], - "metadata":{ - "description":"Indicates whether the Sharepoint farm's IP is new or existing" - } + "defaultValue": "10.0.2.0/24" + }, + "spAppSubnet": { + "type": "string", + "metadata": { + "description": "The address range of the SP App subnet created in the new VNET" }, - "spWebIPAddressName":{ - "type":"string", - "metadata":{ - "description":"The new or existing - depending on value of spWebIPNewOrExisting parameter - IP address name for SP Web " - } + "defaultValue": "10.0.3.0/24" + }, + "adPDCNICIPAddress": { + "type": "string", + "metadata": { + "description": "The IP address of the new AD VM" }, - "dnsPrefix":{ - "type":"string", - "metadata":{ - "description":"The DNS Prefix for the Public IP Address for the Sharepoint Web Application" - } + "defaultValue": "10.0.0.4" + }, + "adBDCNICIPAddress": { + "type": "string", + "metadata": { + "description": "The IP address of the new AD VM" }, - "virtualNetworkName" : { - "type" : "string", - "defaultValue" : "spfarmhaVNET", - "metadata":{ - "description":"Name of virtual network to be created" - } + "defaultValue": "10.0.0.5" + }, + "sqlLBIPAddress": { + "type": "string", + "metadata": { + "description": "The IP address of the new SQL ILB" }, - "baseUrl":{ - "type":"string", - "metadata":{ - "description":"Base URL for Marketplace", - "artifactsBaseUrl":"" - }, - "defaultValue":"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sharepoint-server-farm-ha" + "defaultValue": "10.0.0.6" + }, + "spWebIPRGName": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Resource Group containing existing SP Web IP address" } - }, - "variables":{ - "spCADNSPrefix" : "[concat(parameters('dnsPrefix'),'admin')]", - "spCAIPAddressName" : "[concat(parameters('spWebIPAddressName'),'admin')]", - "configDatabaseName":"SP_Config", - "administrationContentDatabaseName":"SP_AdminContent", - "contentDatabaseName":"spfarm_Content", - "lbSettings":{ - "rdpLBFE":"rdpLBFE", - "sqlLBFE":"sqlLBFE", - "spWebLBFE":"spWebLBFE", - "spCALBFE":"spCALBFE", - "adLBBE":"adLBBE", - "sqlLBBE":"sqlLBBE", - "spWebLBBE":"spWebLBBE", - "spCALBBE":"spCALBBE", - "spWebLB":"spWeb", - "spCALB":"spCALB", - "sqlLBName":"sqlLoadBalancer", - "rdpLBName":"rdpLoadBalancer", - "spWebLBName":"spWebLoadBalancer", - "spCALBName":"spCALoadBalancer" - }, - "subnetNames":{ - "staticSubnetName":"staticSubnet", - "sqlSubnetName":"sqlSubnet", - "spWebSubnetName":"spWebSubnet", - "spAppSubnetName":"spAppSubnet" - }, - "RDPNAT":"RDP", - "spCANAT":"spCANAT", - "SQLAOProbe":"SQLAlwaysOnEndPointProbe", - "spWebProbe":"spWebProbe", - "spWebProbePort":8088, - "rdpIPAddressName":"rdpIP", - "vmSettings":{ - "availabilitySets":{ - "sqlAvailabilitySetName":"sqlAvailabilitySet", - "adAvailabilitySetName":"adAvailabilitySet", - "spWebAvailabilitySetName":"spWebAvailabilitySet", - "spAppAvailabilitySetName":"spAppAvailabilitySet" - }, - "noOfSqlVMs":2, - "noOfspRoleVMs":2, - "vmContainerName":"vhds", - "adPDCVMName":"ad-pdc", - "adBDCVMName":"ad-bdc", - "sqlVMName":"sql-", - "sqlwVMName":"sql-w", - "spwebVMName":"sps-web-", - "spappVMName":"sps-app-", - "windowsImagePublisher":"MicrosoftWindowsServer", - "windowsImageOffer":"WindowsServer", - "windowsImageSKU":"2012-R2-Datacenter", - "sqlImagePublisher":"MicrosoftSQLServer", - "sqlImageOffer":"SQL2014SP1-WS2012R2", - "sqlImageSKU":"Enterprise", - "spImagePublisher":"MicrosoftSharePoint", - "spImageOffer":"MicrosoftSharePointServer", - "spImageSKU":"2013", - "rdpPort":3389, - "spCentralAdminPort":80, - "windowsDiskSize":128, - "sqlDiskSize":1000, - "spDiskSize":128 - }, - "prefix":"[tolower(trim(subString(concat(parameters('dnsPrefix'),' '),0,10)))]", - "sqlAOEPName":"[concat(variables('prefix'),'-hadr')]", - "sqlAOAGName":"[concat(variables('prefix'),'-ag')]", - "sqlAOListenerName":"[concat(variables('prefix'),'ag-listener')]", - "sharePath":"[concat(variables('prefix'),'-fsw')]", - "clusterName":"[concat(variables('prefix'),'-fc')]", - "adPDCNicName":"[concat(variables('vmSettings').adPDCVMName,'-nic')]", - "adBDCNicName":"[concat(variables('vmSettings').adBDCVMName,'-nic')]", - "sqlwNicName":"[concat(variables('vmSettings').sqlwVMName,'-nic')]", - "VnetID":"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", - "staticSubnetRef":"[concat(variables('VnetID'),'/subnets/',variables('subnetNames').staticSubnetName)]", - "sqlSubnetRef":"[concat(variables('VnetID'),'/subnets/',variables('subnetNames').sqlSubnetName)]", - "spWebSubnetRef":"[concat(variables('VnetID'),'/subnets/',variables('subnetNames').spWebSubnetName)]", - "spAppSubnetRef":"[concat(variables('VnetID'),'/subnets/',variables('subnetNames').spAppSubnetName)]", - "spWebResourceIdexisting":"[resourceId(parameters('spWebIPRGName'),concat('Microsoft.Network','/','publicIPAddresses'),parameters('spWebIPAddressName'))]", - "spWebResourceIdnew":"[resourceId(concat('Microsoft.Network','/','publicIPAddresses'),parameters('spWebIPAddressName'))]", - "sharepointCAfqdn":"[concat(variables('spCADNSPrefix'),'.',toLower(trim(replace(parameters('location'),' ' ,''))),'.cloudapp.azure.com')]", - "sharepointWebfqdn":"[concat(parameters('dnsPrefix'),'.',toLower(trim(replace(parameters('location'),' ' ,''))),'.cloudapp.azure.com')]", - "ids":{ - "adNicId":"[resourceId('Microsoft.Network/networkInterfaces',variables('adPDCNicName'))]", - "rdplbID":"[resourceId('Microsoft.Network/loadBalancers',variables('lbSettings').rdpLBName)]", - "spWeblbID":"[resourceId('Microsoft.Network/loadBalancers',variables('lbSettings').spWebLBName)]", - "sqllbID":"[resourceId('Microsoft.Network/loadBalancers',variables('lbSettings').sqlLBName)]", - "spCAlbID":"[resourceId('Microsoft.Network/loadBalancers',variables('lbSettings').spCALBName)]", - "spCAResourceId":"[resourceId('Microsoft.Network/publicIPAddresses',variables('spCAIPAddressName'))]", - "adAvailabilitySetName": "[resourceId('Microsoft.Compute/availabilitySets',variables('vmSettings').availabilitySets.adAvailabilitySetName)]", - "sqlAvailabilitySetName":"[resourceId('Microsoft.Compute/availabilitySets',variables('vmSettings').availabilitySets.sqlAvailabilitySetName)]", - "spWebAvailabilitySetName": "[resourceId('Microsoft.Compute/availabilitySets',variables('vmSettings').availabilitySets.spWebAvailabilitySetName)]", - "spAppAvailabilitySetName": "[resourceId('Microsoft.Compute/availabilitySets',variables('vmSettings').availabilitySets.spAppAvailabilitySetName)]" - }, - "derivedIds":{ - "adIPConfigID":"[concat(variables('ids').adNicId,'/ipConfigurations/ipconfig1')]", - "rdplbFEConfigID":"[concat(variables('ids').rdplbID,'/frontendIPConfigurations/',variables('lbSettings').rdpLBFE)]", - "spWebLBFEConfigID":"[concat(variables('ids').spWeblbID,'/frontendIPConfigurations/',variables('lbSettings').spWebLBFE)]", - "adRDPNATRuleID":"[concat(variables('ids').rdplbID,'/inboundNatRules/',variables('RDPNAT'))]", - "adBEAddressPoolID":"[concat(variables('ids').rdplbID,'/backendAddressPools/',variables('lbSettings').adLBBE)]", - "spWebProbeID":"[concat(variables('ids').spWeblbID,'/probes/',variables('spWebProbe'))]", - "spWebBEAddressPoolID":"[concat(variables('ids').spWeblbID,'/backendAddressPools/',variables('lbSettings').spWebLBBE)]", - "sqlBEAddressPoolID":"[concat(variables('ids').sqllbID,'/backendAddressPools/',variables('lbSettings').sqlLBBE)]", - "sqllbFEConfigID":"[concat(variables('ids').sqllbID,'/frontendIPConfigurations/',variables('lbSettings').sqlLBFE)]", - "sqllbProbeID":"[concat(variables('ids').sqllbID,'/probes/',variables('SQLAOProbe'))]", - "spCABEAddressPoolID":"[concat(variables('ids').spCAlbID,'/backendAddressPools/',variables('lbSettings').spCALBBE)]", - "spCAlbFEConfigID":"[concat(variables('ids').spCAlbID,'/frontendIPConfigurations/',variables('lbSettings').spCALBFE)]", - "spCANATRuleID":"[concat(variables('ids').spCAlbID,'/inboundNatRules/',variables('spCANAT'))]" - }, - "subnets":[ - { - "name":"[variables('subnetNames').staticSubnetName]", - "properties":{ - "addressPrefix":"[parameters('staticSubnet')]" - } - }, - { - "name":"[variables('subnetNames').sqlSubnetName]", - "properties":{ - "addressPrefix":"[parameters('sqlSubnet')]" - } - }, - { - "name":"[variables('subnetNames').spWebSubnetName]", - "properties":{ - "addressPrefix":"[parameters('spWebSubnet')]" - } - }, - { - "name":"[variables('subnetNames').spAppSubnetName]", - "properties":{ - "addressPrefix":"[parameters('spAppSubnet')]" - } - } + }, + "spWebIPNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" ], - "configuration":{ - "vnetwithDNSTemplateURL":"[concat(parameters('baseUrl'),'/vnet-with-dns-server.json')]", - "nicTemplateURL":"[concat(parameters('baseUrl'),'/nic.json')]", - "adPDCModulesURL":"[concat(variables('assetLocation'),'/CreateADPDC.ps1.zip')]", - "adPDCConfigurationFunction":"CreateADPDC.ps1\\CreateADPDC", - "adBDCPreparationModulesURL":"[concat(variables('assetLocation'),'/PrepareADBDC.ps1.zip')]", - "adBDCPreparationFunction":"PrepareADBDC.ps1\\PrepareADBDC", - "adBDCConfigurationModulesURL":"[concat(variables('assetLocation'),'/ConfigureADBDC.ps1.zip')]", - "adBDCConfigurationFunction":"ConfigureADBDC.ps1\\ConfigureADBDC", - "fswConfigurationModulesURL":"[concat(variables('assetLocation'),'/ConfigureFileShareWitness.ps1.zip')]", - "fswConfigurationFunction":"ConfigureFileShareWitness.ps1\\ConfigureFileShareWitness", - "fswPreparationModulesURL":"[concat(variables('assetLocation'),'/PrepareFileShareWitness.ps1.zip')]", - "fswPreparationFunction":"PrepareFileShareWitness.ps1\\PrepareFileShareWitness", - "sqlAOPrepareModulesURL":"[concat(variables('assetLocation'),'/PrepareAlwaysOnSqlServer.ps1.zip')]", - "sqlAOPrepareFunction":"PrepareAlwaysOnSqlServer.ps1\\PrepareAlwaysOnSqlServer", - "sqlAOConfigurationModulesURL":"[concat(variables('assetLocation'),'/ConfigureAlwaysOnSqlServer.ps1.zip')]", - "sqlAOConfigurationFunction":"ConfigureAlwaysOnSqlServer.ps1\\ConfigureAlwaysOnSqlServer", - "prepareClusterModulesURL":"[concat(variables('assetLocation'),'/PrepareFailoverCluster.ps1.zip')]", - "prepareClusterConfigurationFunction":"PrepareFailoverCluster.ps1\\PrepareFailoverCluster", - "configureClusterModulesURL":"[concat(variables('assetLocation'),'/ConfigureFailoverCluster.ps1.zip')]", - "configureClusterConfigurationFunction":"ConfigureFailoverCluster.ps1\\ConfigureFailoverCluster", - "spConfigurationModulesURL":"[concat(variables('assetLocation'),'/ConfigureSharePointServerHA.ps1.zip')]", - "spConfigurationFunction":"ConfigureSharePointServerHA.ps1\\ConfigureSharePointServerHA", - "spPreparationModulesURL":"[concat(variables('assetLocation'),'/PrepareSharePointServerHA.ps1.zip')]", - "spPreparationFunction":"PrepareSharePointServerHA.ps1\\PrepareSharePointServerHA", - "spWebIPAdressSetupURL":"[concat(parameters('baseUrl'),'/publicip-',parameters('spWebIPNewOrExisting'),'.json')]", - "spCAIPAdressSetupURL":"[concat(parameters('baseUrl'),'/publicip-','new.json')]", - "rdpIPAdressSetupURL":"[concat(parameters('baseUrl'),'/publicip-rdp.json')]", - "availabilitySetSetupURL":"[concat(parameters('baseUrl'),'/availabilitySets.json')]", - "provisioningPrimaryDCURL":"[concat(parameters('baseUrl'),'/provisioningPrimaryDomainController.json')]", - "provisioningBackupDCURL":"[concat(parameters('baseUrl'),'/provisioningBackupDomainController.json')]", - "configuringBackupDCURL":"[concat(parameters('baseUrl'),'/configuringBackupDomainController.json')]", - "configuringSQLAlwaysOnClusterUrl":"[concat(parameters('baseUrl'),'/configuringSQLAlwaysOnCluster.json')]", - "provisioningSharepointVMsURL":"[concat(parameters('baseUrl'),'/provisioningSharepointVMs.json')]", - "configuringSharepointUrl":"[concat(parameters('baseUrl'),'/configuringSharePoint.json')]", - "creatingStorageAccounts":"[concat(parameters('baseUrl'),'/creatingStorageAccounts.json')]", - "provisioningSQLVMsURL":"[concat(parameters('baseUrl'),'/provisioningSQLVMs.json')]", - "vnetSetupURL":"[concat(parameters('baseUrl'),'/vnet-new.json')]", - "setupLBsUrl":"[concat(parameters('baseUrl'),'/setupLBs.json')]", - "creatingNicsUrl":"[concat(parameters('baseUrl'),'/creatingNICS.json')]" - }, - "assetLocation":"https://sdaviesms.blob.core.windows.net/marketplaceprod/dscv2" - }, - "resources":[ - { - "name":"CreatingStorageAccounts", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').creatingStorageAccounts]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "location":{ - "value":"[parameters('location')]" - }, - "storageAccountNamePrefix":{ - "value":"[parameters('storageAccountNamePrefix')]" - }, - "storageAccountType":{ - "value":"[parameters('storageAccountType')]" - } - } - } - }, - { - "name":"SettingUpRdp", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').rdpIPAdressSetupURL]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "location":{ - "value":"[parameters('location')]" - }, - "rdpIPAddressName":{ - "value":"[variables('rdpIPAddressName')]" - }, - "rdpLBName":{ - "value":"[variables('lbSettings').rdpLBName]" - }, - "rdpLBFE":{ - "value":"[variables('lbSettings').rdpLBFE]" - }, - "adLBBE":{ - "value":"[variables('lbSettings').adLBBE]" - }, - "RDPNAT":{ - "value":"[variables('RDPNAT')]" - }, - "rdplbFEConfigID":{ - "value":"[variables('derivedIds').rdplbFEConfigID]" - } - } - } - }, - { - "name":"SettingUpSharepointWebPublicIP", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').spWebIPAdressSetupURL]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "location":{ - "value":"[parameters('location')]" - }, - "publicIPAddressName":{ - "value":"[parameters('spWebIPAddressName')]" - }, - "publicIPAddressType":{ - "value":"dynamic" - }, - "dnsPrefix":{ - "value":"[parameters('dnsPrefix')]" - }, - "publicIpRGName":{ - "value":"[parameters('spWebIPRGName')]" - } - } - } - }, - { - "name":"SettingUpSharepointCentralAdminPublicIP", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').spCAIPAdressSetupURL]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "location":{ - "value":"[parameters('location')]" - }, - "publicIPAddressName":{ - "value":"[variables('spCAIPAddressName')]" - }, - "publicIPAddressType":{ - "value":"dynamic" - }, - "dnsPrefix":{ - "value":"[variables('spCADNSPrefix')]" - }, - "publicIpRGName":{ - "value":"[resourceGroup().name]" - } - } - } - }, - { - "name":"CreatingAvailabilitySets", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').availabilitySetSetupURL]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "location":{ - "value":"[parameters('location')]" - }, - "adAvailabilitySetName":{ - "value":"[variables('vmSettings').availabilitySets.adAvailabilitySetName]" - }, - "sqlAvailabilitySetName":{ - "value":"[variables('vmSettings').availabilitySets.sqlAvailabilitySetName]" - }, - "spWebAvailabilitySetName":{ - "value":"[variables('vmSettings').availabilitySets.spWebAvailabilitySetName]" - }, - "spAppAvailabilitySetName":{ - "value":"[variables('vmSettings').availabilitySets.spAppAvailabilitySetName]" - } - } - } - }, - { - "name":"CreatingVirtualNetwork", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').vnetSetupURL]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "location":{ - "value":"[parameters('location')]" - }, - "virtualNetworkName":{ - "value":"[parameters('virtualNetworkName')]" - }, - "virtualNetworkAddressRange":{ - "value":"[parameters('virtualNetworkAddressRange')]" - }, - "subnets":{ - "value":"[variables('subnets')]" - } - } - } - }, - { - "name":"SettingUpLoadBalancers", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "dependsOn":[ - "Microsoft.Resources/deployments/SettingUpSharepointCentralAdminPublicIP", - "Microsoft.Resources/deployments/SettingUpSharepointWebPublicIP", - "Microsoft.Resources/deployments/SettingUpRdp", - "Microsoft.Resources/deployments/CreatingVirtualNetwork" - ], - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').setupLBsUrl]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "location":{ - "value":"[parameters('location')]" - }, - "spCALBName":{ - "value":"[variables('lbSettings').spCALBName]" - }, - "spCALBFE":{ - "value":"[variables('lbSettings').spCALBFE]" - }, - "spCAResourceId":{ - "value":"[variables('ids').spCAResourceId]" - }, - "spCALBBE":{ - "value":"[variables('lbSettings').spCALBBE]" - }, - "spCANAT":{ - "value":"[variables('spCANAT')]" - }, - "spCAlbFEConfigID":{ - "value":"[variables('derivedIds').spCAlbFEConfigID]" - }, - "spWebLBName":{ - "value":"[variables('lbSettings').spWebLBName]" - }, - "spWebLBFE":{ - "value":"[variables('lbSettings').spWebLBFE]" - }, - "spWebResourceId":{ - "value":"[variables(concat('spWebResourceId',parameters('spWebIPNewOrExisting')))]" - }, - "spWebLBBE":{ - "value":"[variables('lbSettings').spWebLBBE]" - }, - "spWebLB":{ - "value":"[variables('lbSettings').spWebLB]" - }, - "spWebLBFEConfigID":{ - "value":"[variables('derivedIds').spWebLBFEConfigID]" - }, - "spWebBEAddressPoolID":{ - "value":"[variables('derivedIds').spWebBEAddressPoolID]" - }, - "spWebProbeID":{ - "value":"[variables('derivedIds').spWebProbeID]" - }, - "spWebProbe":{ - "value":"[variables('spWebProbe')]" - }, - "sqlLBName":{ - "value":"[variables('lbSettings').sqlLBName]" - }, - "sqlLBFE":{ - "value":"[variables('lbSettings').sqlLBFE]" - }, - "sqlLBIPAddress":{ - "value":"[parameters('sqlLBIPAddress')]" - }, - "staticSubnetRef":{ - "value":"[variables('staticSubnetRef')]" - }, - "sqlLBBE":{ - "value":"[variables('lbSettings').sqlLBBE]" - }, - "sqllbFEConfigID":{ - "value":"[variables('derivedIds').sqllbFEConfigID]" - }, - "sqllbProbeID":{ - "value":"[variables('derivedIds').sqllbProbeID]" - }, - "SQLAOProbe":{ - "value":"[variables('SQLAOProbe')]" - } - } - } - }, - { - "name":"CreatingNetworkInterfaces", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "dependsOn":[ - "Microsoft.Resources/deployments/CreatingVirtualNetwork", - "Microsoft.Resources/deployments/SettingUpRdp", - "Microsoft.Resources/deployments/SettingUpLoadBalancers" - ], - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').creatingNicsUrl]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "location":{ - "value":"[parameters('location')]" - }, - "adPDCNicName":{ - "value":"[variables('adPDCNicName')]" - }, - "adPDCNICIPAddress":{ - "value":"[parameters('adPDCNICIPAddress')]" - }, - "staticSubnetRef":{ - "value":"[variables('staticSubnetRef')]" - }, - "adBEAddressPoolID":{ - "value":"[variables('derivedIds').adBEAddressPoolID]" - }, - "adRDPNATRuleID":{ - "value":"[variables('derivedIds').adRDPNATRuleID]" - }, - "adBDCNicName":{ - "value":"[variables('adBDCNicName')]" - }, - "adBDCNICIPAddress":{ - "value":"[parameters('adBDCNICIPAddress')]" - }, - "sqlVMName":{ - "value":"[variables('vmSettings').sqlVMName]" - }, - "sqlSubnetRef":{ - "value":"[variables('sqlSubnetRef')]" - }, - "sqlBEAddressPoolID":{ - "value":"[variables('derivedIds').sqlBEAddressPoolID]" - }, - "spwebVMName":{ - "value":"[variables('vmSettings').spwebVMName]" - }, - "spWebSubnetRef":{ - "value":"[variables('spWebSubnetRef')]" - }, - "spWebBEAddressPoolID":{ - "value":"[variables('derivedIds').spWebBEAddressPoolID]" - }, - "spappVMName":{ - "value":"[variables('vmSettings').spappVMName]" - }, - "spAppSubnetRef":{ - "value":"[variables('spAppSubnetRef')]" - }, - "spCABEAddressPoolID":{ - "value":"[variables('derivedIds').spCABEAddressPoolID]" - }, - "spCANATRuleID":{ - "value":"[variables('derivedIds').spCANATRuleID]" - }, - "sqlwNicName":{ - "value":"[variables('sqlwNicName')]" - } - } - } - }, - { - "name":"ProvisioningPrimaryADDomainController", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "dependsOn":[ - "Microsoft.Resources/deployments/CreatingStorageAccounts", - "Microsoft.Resources/deployments/CreatingNetworkInterfaces", - "Microsoft.Resources/deployments/CreatingAvailabilitySets", - "Microsoft.Resources/deployments/SettingUpRdp" - ], - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').provisioningPrimaryDCURL]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "adPDCVMName":{ - "value":"[variables('vmSettings').adPDCVMName]" - }, - "location":{ - "value":"[parameters('location')]" - }, - "storageAccountNamePrefix":{ - "value":"[parameters('storageAccountNamePrefix')]" - }, - "availabilitySet":{ - "value":"[variables('ids').adAvailabilitySetName]" - }, - "adVMSize":{ - "value":"[parameters('adVMSize')]" - }, - "adminUsername":{ - "value":"[parameters('adminUsername')]" - }, - "adminPassword":{ - "value":"[parameters('adminPassword')]" - }, - "windowsImagePublisher":{ - "value":"[variables('vmSettings').windowsImagePublisher]" - }, - "windowsImageOffer":{ - "value":"[variables('vmSettings').windowsImageOffer]" - }, - "windowsImageSKU":{ - "value":"[variables('vmSettings').windowsImageSKU]" - }, - "vmContainerName":{ - "value":"[variables('vmSettings').vmContainerName]" - }, - "adPDCNicName":{ - "value":"[variables('adPDCNicName')]" - }, - "domainName":{ - "value":"[parameters('domainName')]" - }, - "adPDCConfigurationFunction":{ - "value":"[variables('configuration').adPDCConfigurationFunction]" - }, - "adPDCModulesURL":{ - "value":"[variables('configuration').adPDCModulesURL]" - } - } - } - }, - { - "name":"UpdatingDNStoPrimaryADVM", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "dependsOn":[ - "Microsoft.Resources/deployments/ProvisioningPrimaryADDomainController" - ], - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').vnetwithDNSTemplateURL]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "location":{ - "value":"[parameters('location')]" - }, - "virtualNetworkName":{ - "value":"[parameters('virtualNetworkName')]" - }, - "virtualNetworkAddressRange":{ - "value":"[parameters('virtualNetworkAddressRange')]" - }, - "subnets":{ - "value":"[variables('subnets')]" - }, - "DNSServerAddress":{ - "value":[ - "[parameters('adPDCNICIPAddress')]" - ] - } - } - } - }, - { - "name":"ProvisioningBackupADDomainController", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "dependsOn":[ - "Microsoft.Resources/deployments/CreatingStorageAccounts", - "Microsoft.Resources/deployments/CreatingNetworkInterfaces", - "Microsoft.Resources/deployments/CreatingAvailabilitySets" - ], - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').provisioningBackupDCURL]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "adBDCVMName":{ - "value":"[variables('vmSettings').adBDCVMName]" - }, - "location":{ - "value":"[parameters('location')]" - }, - "storageAccountNamePrefix":{ - "value":"[parameters('storageAccountNamePrefix')]" - }, - "availabilitySet":{ - "value":"[variables('ids').adAvailabilitySetName]" - }, - "adVMSize":{ - "value":"[parameters('adVMSize')]" - }, - "adminUsername":{ - "value":"[parameters('adminUsername')]" - }, - "adminPassword":{ - "value":"[parameters('adminPassword')]" - }, - "windowsImagePublisher":{ - "value":"[variables('vmSettings').windowsImagePublisher]" - }, - "windowsImageOffer":{ - "value":"[variables('vmSettings').windowsImageOffer]" - }, - "windowsImageSKU":{ - "value":"[variables('vmSettings').windowsImageSKU]" - }, - "vmContainerName":{ - "value":"[variables('vmSettings').vmContainerName]" - }, - "adBDCNicName":{ - "value":"[variables('adBDCNicName')]" - }, - "DNSServer":{ - "value":"[parameters('adPDCNICIPAddress')]" - }, - "adBDCPreparationFunction":{ - "value":"[variables('configuration').adBDCPreparationFunction]" - }, - "adBDCPreparationModulesURL":{ - "value":"[variables('configuration').adBDCPreparationModulesURL]" - } - } - } - }, - { - "name":"ConfiguringBackupADDomainController", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "dependsOn":[ - "Microsoft.Resources/deployments/ProvisioningBackupADDomainController", - "Microsoft.Resources/deployments/UpdatingDNStoPrimaryADVM" - ], - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').configuringBackupDCURL]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "adBDCVMName":{ - "value":"[variables('vmSettings').adBDCVMName]" - }, - "location":{ - "value":"[parameters('location')]" - }, - "adminUsername":{ - "value":"[parameters('adminUsername')]" - }, - "adminPassword":{ - "value":"[parameters('adminPassword')]" - }, - "domainName":{ - "value":"[parameters('domainName')]" - }, - "adBDCConfigurationFunction":{ - "value":"[variables('configuration').adBDCConfigurationFunction]" - }, - "adBDCConfigurationModulesURL":{ - "value":"[variables('configuration').adBDCConfigurationModulesURL]" - } - } - } + "metadata": { + "description": "Indicates whether the Sharepoint farm's IP is new or existing" + } + }, + "spWebIPAddressName": { + "type": "string", + "metadata": { + "description": "The new or existing - depending on value of spWebIPNewOrExisting parameter - IP address name for SP Web " + } + }, + "dnsPrefix": { + "type": "string", + "metadata": { + "description": "The DNS Prefix for the Public IP Address for the Sharepoint Web Application" + } + }, + "virtualNetworkName": { + "type": "string", + "defaultValue": "spfarmhaVNET", + "metadata": { + "description": "Name of virtual network to be created" + } + }, + "baseUrl": { + "type": "string", + "metadata": { + "description": "Base URL for Marketplace", + "artifactsBaseUrl": "" }, - { - "name":"UpdatingDNSwithBackupADVM", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "dependsOn":[ - "Microsoft.Resources/deployments/ConfiguringBackupADDomainController" - ], - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').vnetwithDNSTemplateURL]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "location":{ - "value":"[parameters('location')]" - }, - "virtualNetworkName":{ - "value":"[parameters('virtualNetworkName')]" - }, - "virtualNetworkAddressRange":{ - "value":"[parameters('virtualNetworkAddressRange')]" - }, - "subnets":{ - "value":"[variables('subnets')]" - }, - "DNSServerAddress":{ - "value":[ - "[parameters('adPDCNICIPAddress')]", - "[parameters('adBDCNICIPAddress')]" - ] - } - } - } + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/sharepoint-server-farm-ha" + } + }, + "variables": { + "spCADNSPrefix": "[concat(parameters('dnsPrefix'),'admin')]", + "spCAIPAddressName": "[concat(parameters('spWebIPAddressName'),'admin')]", + "configDatabaseName": "SP_Config", + "administrationContentDatabaseName": "SP_AdminContent", + "contentDatabaseName": "spfarm_Content", + "lbSettings": { + "rdpLBFE": "rdpLBFE", + "sqlLBFE": "sqlLBFE", + "spWebLBFE": "spWebLBFE", + "spCALBFE": "spCALBFE", + "adLBBE": "adLBBE", + "sqlLBBE": "sqlLBBE", + "spWebLBBE": "spWebLBBE", + "spCALBBE": "spCALBBE", + "spWebLB": "spWeb", + "spCALB": "spCALB", + "sqlLBName": "sqlLoadBalancer", + "rdpLBName": "rdpLoadBalancer", + "spWebLBName": "spWebLoadBalancer", + "spCALBName": "spCALoadBalancer" + }, + "subnetNames": { + "staticSubnetName": "staticSubnet", + "sqlSubnetName": "sqlSubnet", + "spWebSubnetName": "spWebSubnet", + "spAppSubnetName": "spAppSubnet" + }, + "RDPNAT": "RDP", + "spCANAT": "spCANAT", + "SQLAOProbe": "SQLAlwaysOnEndPointProbe", + "spWebProbe": "spWebProbe", + "spWebProbePort": 8088, + "rdpIPAddressName": "rdpIP", + "vmSettings": { + "availabilitySets": { + "sqlAvailabilitySetName": "sqlAvailabilitySet", + "adAvailabilitySetName": "adAvailabilitySet", + "spWebAvailabilitySetName": "spWebAvailabilitySet", + "spAppAvailabilitySetName": "spAppAvailabilitySet" }, + "noOfSqlVMs": 2, + "noOfspRoleVMs": 2, + "vmContainerName": "vhds", + "adPDCVMName": "ad-pdc", + "adBDCVMName": "ad-bdc", + "sqlVMName": "sql-", + "sqlwVMName": "sql-w", + "spwebVMName": "sps-web-", + "spappVMName": "sps-app-", + "windowsImagePublisher": "MicrosoftWindowsServer", + "windowsImageOffer": "WindowsServer", + "windowsImageSKU": "2012-R2-Datacenter", + "sqlImagePublisher": "MicrosoftSQLServer", + "sqlImageOffer": "SQL2014SP1-WS2012R2", + "sqlImageSKU": "Enterprise", + "spImagePublisher": "MicrosoftSharePoint", + "spImageOffer": "MicrosoftSharePointServer", + "spImageSKU": "2013", + "rdpPort": 3389, + "spCentralAdminPort": 80, + "windowsDiskSize": 128, + "sqlDiskSize": 1000, + "spDiskSize": 128 + }, + "prefix": "[tolower(trim(subString(concat(parameters('dnsPrefix'),' '),0,10)))]", + "sqlAOEPName": "[concat(variables('prefix'),'-hadr')]", + "sqlAOAGName": "[concat(variables('prefix'),'-ag')]", + "sqlAOListenerName": "[concat(variables('prefix'),'ag-listener')]", + "sharePath": "[concat(variables('prefix'),'-fsw')]", + "clusterName": "[concat(variables('prefix'),'-fc')]", + "adPDCNicName": "[concat(variables('vmSettings').adPDCVMName,'-nic')]", + "adBDCNicName": "[concat(variables('vmSettings').adBDCVMName,'-nic')]", + "sqlwNicName": "[concat(variables('vmSettings').sqlwVMName,'-nic')]", + "VnetID": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "staticSubnetRef": "[concat(variables('VnetID'),'/subnets/',variables('subnetNames').staticSubnetName)]", + "sqlSubnetRef": "[concat(variables('VnetID'),'/subnets/',variables('subnetNames').sqlSubnetName)]", + "spWebSubnetRef": "[concat(variables('VnetID'),'/subnets/',variables('subnetNames').spWebSubnetName)]", + "spAppSubnetRef": "[concat(variables('VnetID'),'/subnets/',variables('subnetNames').spAppSubnetName)]", + "spWebResourceIdexisting": "[resourceId(parameters('spWebIPRGName'),concat('Microsoft.Network','/','publicIPAddresses'),parameters('spWebIPAddressName'))]", + "spWebResourceIdnew": "[resourceId(concat('Microsoft.Network','/','publicIPAddresses'),parameters('spWebIPAddressName'))]", + "sharepointCAfqdn": "[concat(variables('spCADNSPrefix'),'.',toLower(trim(replace(parameters('location'),' ' ,''))),'.cloudapp.azure.com')]", + "sharepointWebfqdn": "[concat(parameters('dnsPrefix'),'.',toLower(trim(replace(parameters('location'),' ' ,''))),'.cloudapp.azure.com')]", + "ids": { + "adNicId": "[resourceId('Microsoft.Network/networkInterfaces',variables('adPDCNicName'))]", + "rdplbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbSettings').rdpLBName)]", + "spWeblbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbSettings').spWebLBName)]", + "sqllbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbSettings').sqlLBName)]", + "spCAlbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbSettings').spCALBName)]", + "spCAResourceId": "[resourceId('Microsoft.Network/publicIPAddresses',variables('spCAIPAddressName'))]", + "adAvailabilitySetName": "[resourceId('Microsoft.Compute/availabilitySets',variables('vmSettings').availabilitySets.adAvailabilitySetName)]", + "sqlAvailabilitySetName": "[resourceId('Microsoft.Compute/availabilitySets',variables('vmSettings').availabilitySets.sqlAvailabilitySetName)]", + "spWebAvailabilitySetName": "[resourceId('Microsoft.Compute/availabilitySets',variables('vmSettings').availabilitySets.spWebAvailabilitySetName)]", + "spAppAvailabilitySetName": "[resourceId('Microsoft.Compute/availabilitySets',variables('vmSettings').availabilitySets.spAppAvailabilitySetName)]" + }, + "derivedIds": { + "adIPConfigID": "[concat(variables('ids').adNicId,'/ipConfigurations/ipconfig1')]", + "rdplbFEConfigID": "[concat(variables('ids').rdplbID,'/frontendIPConfigurations/',variables('lbSettings').rdpLBFE)]", + "spWebLBFEConfigID": "[concat(variables('ids').spWeblbID,'/frontendIPConfigurations/',variables('lbSettings').spWebLBFE)]", + "adRDPNATRuleID": "[concat(variables('ids').rdplbID,'/inboundNatRules/',variables('RDPNAT'))]", + "adBEAddressPoolID": "[concat(variables('ids').rdplbID,'/backendAddressPools/',variables('lbSettings').adLBBE)]", + "spWebProbeID": "[concat(variables('ids').spWeblbID,'/probes/',variables('spWebProbe'))]", + "spWebBEAddressPoolID": "[concat(variables('ids').spWeblbID,'/backendAddressPools/',variables('lbSettings').spWebLBBE)]", + "sqlBEAddressPoolID": "[concat(variables('ids').sqllbID,'/backendAddressPools/',variables('lbSettings').sqlLBBE)]", + "sqllbFEConfigID": "[concat(variables('ids').sqllbID,'/frontendIPConfigurations/',variables('lbSettings').sqlLBFE)]", + "sqllbProbeID": "[concat(variables('ids').sqllbID,'/probes/',variables('SQLAOProbe'))]", + "spCABEAddressPoolID": "[concat(variables('ids').spCAlbID,'/backendAddressPools/',variables('lbSettings').spCALBBE)]", + "spCAlbFEConfigID": "[concat(variables('ids').spCAlbID,'/frontendIPConfigurations/',variables('lbSettings').spCALBFE)]", + "spCANATRuleID": "[concat(variables('ids').spCAlbID,'/inboundNatRules/',variables('spCANAT'))]" + }, + "subnets": [ { - "name":"ProvisioningSQLVirtualMachines", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "dependsOn":[ - "Microsoft.Resources/deployments/CreatingStorageAccounts", - "Microsoft.Resources/deployments/CreatingNetworkInterfaces", - "Microsoft.Resources/deployments/CreatingAvailabilitySets" - ], - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').provisioningSQLVMsURL]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "sqlVMName":{ - "value":"[variables('vmSettings').sqlVMName]" - }, - "location":{ - "value":"[parameters('location')]" - }, - "storageAccountNamePrefix":{ - "value":"[parameters('storageAccountNamePrefix')]" - }, - "availabilitySet":{ - "value":"[variables('ids').sqlAvailabilitySetName]" - }, - "sqlVMSize":{ - "value":"[parameters('sqlVMSize')]" - }, - "adminUsername":{ - "value":"[parameters('adminUsername')]" - }, - "adminPassword":{ - "value":"[parameters('adminPassword')]" - }, - "windowsImagePublisher":{ - "value":"[variables('vmSettings').windowsImagePublisher]" - }, - "windowsImageOffer":{ - "value":"[variables('vmSettings').windowsImageOffer]" - }, - "windowsImageSKU":{ - "value":"[variables('vmSettings').windowsImageSKU]" - }, - "vmContainerName":{ - "value":"[variables('vmSettings').vmContainerName]" - }, - "sqlImagePublisher":{ - "value":"[variables('vmSettings').sqlImagePublisher]" - }, - "sqlImageOffer":{ - "value":"[variables('vmSettings').sqlImageOffer]" - }, - "sqlImageSKU":{ - "value":"[variables('vmSettings').sqlImageSKU]" - }, - "domainName":{ - "value":"[parameters('domainName')]" - }, - "sqlAOPrepareModulesURL":{ - "value":"[variables('configuration').sqlAOPrepareModulesURL]" - }, - "sqlAOPrepareFunction":{ - "value":"[variables('configuration').sqlAOPrepareFunction]" - }, - "prepareClusterModulesURL":{ - "value":"[variables('configuration').prepareClusterModulesURL]" - }, - "prepareClusterConfigurationFunction":{ - "value":"[variables('configuration').prepareClusterConfigurationFunction]" - }, - "sharePath":{ - "value":"[variables('sharePath')]" - }, - "witnessVMSize":{ - "value":"[parameters('witnessVMSize')]" - }, - "sqlwVMName":{ - "value":"[variables('vmSettings').sqlwVMName]" - }, - "sqlwNicName":{ - "value":"[variables('sqlwNicName')]" - }, - "fswPreparationModulesURL":{ - "value":"[variables('configuration').fswPreparationModulesURL]" - }, - "fswPreparationFunction":{ - "value":"[variables('configuration').fswPreparationFunction]" - }, - "DNSServer":{ - "value":"[parameters('adPDCNICIPAddress')]" - } - } - } + "name": "[variables('subnetNames').staticSubnetName]", + "properties": { + "addressPrefix": "[parameters('staticSubnet')]" + } }, { - "name":"ConfiguringSQLAlwaysOnCluster", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "dependsOn":[ - "Microsoft.Resources/deployments/UpdatingDNSwithBackupADVM", - "Microsoft.Resources/deployments/ProvisioningSQLVirtualMachines" - ], - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').configuringSQLAlwaysOnClusterUrl]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "sqlVMName":{ - "value":"[variables('vmSettings').sqlVMName]" - }, - "location":{ - "value":"[parameters('location')]" - }, - "adminUsername":{ - "value":"[parameters('adminUsername')]" - }, - "adminPassword":{ - "value":"[parameters('adminPassword')]" - }, - "domainName":{ - "value":"[parameters('domainName')]" - }, - "sqlAOConfigurationModulesURL":{ - "value":"[variables('configuration').sqlAOConfigurationModulesURL]" - }, - "sqlAOConfigurationFunction":{ - "value":"[variables('configuration').sqlAOConfigurationFunction]" - }, - "sqlAOEPName":{ - "value":"[variables('sqlAOEPName')]" - }, - "sqlServerServiceAccountUserName":{ - "value":"[parameters('sqlServerServiceAccountUserName')]" - }, - "sharePointSetupUserAccountUserName":{ - "value":"[parameters('sharePointSetupUserAccountUserName')]" - }, - "sqlServerServiceAccountPassword":{ - "value":"[parameters('sqlServerServiceAccountPassword')]" - }, - "sharePointSetupUserAccountPassword":{ - "value":"[parameters('sharePointSetupUserAccountPassword')]" - }, - "configureClusterModulesURL":{ - "value":"[variables('configuration').configureClusterModulesURL]" - }, - "configureClusterConfigurationFunction":{ - "value":"[variables('configuration').configureClusterConfigurationFunction]" - }, - "clusterName":{ - "value":"[variables('clusterName')]" - }, - "sharePath":{ - "value":"[variables('sharePath')]" - }, - "sqlAOAGName":{ - "value":"[variables('sqlAOAGName')]" - }, - "sqlAOListenerName":{ - "value":"[variables('sqlAOListenerName')]" - }, - "sqlLBName":{ - "value":"[variables('lbSettings').sqlLBName]" - }, - "sqlLBIPAddress":{ - "value":"[parameters('sqlLBIPAddress')]" - }, - "adPDCVMName":{ - "value":"[variables('vmSettings').adPDCVMName]" - }, - "sqlwVMName":{ - "value":"[variables('vmSettings').sqlwVMName]" - }, - "fswConfigurationModulesURL":{ - "value":"[variables('configuration').fswConfigurationModulesURL]" - }, - "fswConfigurationFunction":{ - "value":"[variables('configuration').fswConfigurationFunction]" - } - } - } + "name": "[variables('subnetNames').sqlSubnetName]", + "properties": { + "addressPrefix": "[parameters('sqlSubnet')]" + } }, { - "name":"CreatingSharepointVirtualMachines", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "dependsOn":[ - "Microsoft.Resources/deployments/CreatingStorageAccounts", - "Microsoft.Resources/deployments/CreatingNetworkInterfaces", - "Microsoft.Resources/deployments/CreatingAvailabilitySets" - ], - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').provisioningSharepointVMsURL]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "spappVMName":{ - "value":"[variables('vmSettings').spappVMName]" - }, - "spwebVMName":{ - "value":"[variables('vmSettings').spwebVMName]" - }, - "location":{ - "value":"[parameters('location')]" - }, - "spVMSize":{ - "value":"[parameters('spVMSize')]" - }, - "spWebAvailabilitySet":{ - "value":"[variables('ids').spWebAvailabilitySetName]" - }, - "spAppAvailabilitySet":{ - "value":"[variables('ids').spAppAvailabilitySetName]" - }, - "adminUsername":{ - "value":"[parameters('adminUsername')]" - }, - "adminPassword":{ - "value":"[parameters('adminPassword')]" - }, - "spImagePublisher":{ - "value":"[variables('vmSettings').spImagePublisher]" - }, - "spImageOffer":{ - "value":"[variables('vmSettings').spImageOffer]" - }, - "spImageSKU":{ - "value":"[variables('vmSettings').spImageSKU]" - }, - "vmContainerName":{ - "value":"[variables('vmSettings').vmContainerName]" - }, - "storageAccountNamePrefix":{ - "value":"[parameters('storageAccountNamePrefix')]" - }, - "spPreparationModulesURL":{ - "value":"[variables('configuration').spPreparationModulesURL]" - }, - "spPreparationFunction":{ - "value":"[variables('configuration').spPreparationFunction]" - }, - "domainName":{ - "value":"[parameters('domainName')]" - }, - "DNSServer":{ - "value":"[parameters('adPDCNICIPAddress')]" - } - } - } + "name": "[variables('subnetNames').spWebSubnetName]", + "properties": { + "addressPrefix": "[parameters('spWebSubnet')]" + } }, { - "name":"ConfiguringSharepoint", - "type":"Microsoft.Resources/deployments", - "apiVersion":"2015-01-01", - "dependsOn":[ - "Microsoft.Resources/deployments/ConfiguringSQLAlwaysOnCluster", - "Microsoft.Resources/deployments/CreatingSharepointVirtualMachines" - ], - "properties":{ - "mode":"Incremental", - "templateLink":{ - "uri":"[variables('configuration').configuringSharepointUrl]", - "contentVersion":"1.0.0.0" - }, - "parameters":{ - "spappVMName":{ - "value":"[variables('vmSettings').spappVMName]" - }, - "sqlVMName":{ - "value":"[variables('vmSettings').sqlVMName]" - }, - "location":{ - "value":"[parameters('location')]" - }, - "spConfigurationModulesURL":{ - "value":"[variables('configuration').spConfigurationModulesURL]" - }, - "spConfigurationFunction":{ - "value":"[variables('configuration').spConfigurationFunction]" - }, - "domainName":{ - "value":"[parameters('domainName')]" - }, - "adminUsername":{ - "value":"[parameters('adminUsername')]" - }, - "adminPassword":{ - "value":"[parameters('adminPassword')]" - }, - "sharePointSetupUserAccountUserName":{ - "value":"[parameters('sharePointSetupUserAccountUserName')]" - }, - "sharePointFarmAccountUserName":{ - "value":"[parameters('sharePointFarmAccountUserName')]" - }, - "sqlServerServiceAccountUserName":{ - "value":"[parameters('sqlServerServiceAccountUserName')]" - }, - "sqlAOAGName":{ - "value":"[variables('sqlAOAGName')]" - }, - "administrationContentDatabaseName":{ - "value":"[variables('administrationContentDatabaseName')]" - }, - "configDatabaseName":{ - "value":"[variables('configDatabaseName')]" - }, - "contentDatabaseName":{ - "value":"[variables('contentDatabaseName')]" - }, - "sharepointCAfqdn":{ - "value":"[variables('sharepointCAfqdn')]" - }, - "sharePointSetupUserAccountPassword":{ - "value":"[parameters('sharePointSetupUserAccountPassword')]" - }, - "sharePointFarmAccountPassword":{ - "value":"[parameters('sharePointFarmAccountPassword')]" - }, - "sharePointFarmPassphrasePassword":{ - "value":"[parameters('sharePointFarmPassphrasePassword')]" - }, - "sqlServerServiceAccountPassword":{ - "value":"[parameters('sqlServerServiceAccountPassword')]" - }, - "spwebVMName":{ - "value":"[variables('vmSettings').spwebVMName]" - }, - "sharepointFarmName":{ - "value":"[parameters('sharepointFarmName')]" - }, - "sharepointWebfqdn":{ - "value":"[variables('sharepointWebfqdn')]" - }, - "spSiteTemplateName":{ - "value":"[parameters('spSiteTemplateName')]" - } - } - } + "name": "[variables('subnetNames').spAppSubnetName]", + "properties": { + "addressPrefix": "[parameters('spAppSubnet')]" + } + } + ], + "configuration": { + "vnetwithDNSTemplateURL": "[concat(parameters('baseUrl'),'/vnet-with-dns-server.json')]", + "nicTemplateURL": "[concat(parameters('baseUrl'),'/nic.json')]", + "adPDCModulesURL": "[concat(variables('assetLocation'),'/CreateADPDC.ps1.zip')]", + "adPDCConfigurationFunction": "CreateADPDC.ps1\\CreateADPDC", + "adBDCPreparationModulesURL": "[concat(variables('assetLocation'),'/PrepareADBDC.ps1.zip')]", + "adBDCPreparationFunction": "PrepareADBDC.ps1\\PrepareADBDC", + "adBDCConfigurationModulesURL": "[concat(variables('assetLocation'),'/ConfigureADBDC.ps1.zip')]", + "adBDCConfigurationFunction": "ConfigureADBDC.ps1\\ConfigureADBDC", + "fswConfigurationModulesURL": "[concat(variables('assetLocation'),'/ConfigureFileShareWitness.ps1.zip')]", + "fswConfigurationFunction": "ConfigureFileShareWitness.ps1\\ConfigureFileShareWitness", + "fswPreparationModulesURL": "[concat(variables('assetLocation'),'/PrepareFileShareWitness.ps1.zip')]", + "fswPreparationFunction": "PrepareFileShareWitness.ps1\\PrepareFileShareWitness", + "sqlAOPrepareModulesURL": "[concat(variables('assetLocation'),'/PrepareAlwaysOnSqlServer.ps1.zip')]", + "sqlAOPrepareFunction": "PrepareAlwaysOnSqlServer.ps1\\PrepareAlwaysOnSqlServer", + "sqlAOConfigurationModulesURL": "[concat(variables('assetLocation'),'/ConfigureAlwaysOnSqlServer.ps1.zip')]", + "sqlAOConfigurationFunction": "ConfigureAlwaysOnSqlServer.ps1\\ConfigureAlwaysOnSqlServer", + "prepareClusterModulesURL": "[concat(variables('assetLocation'),'/PrepareFailoverCluster.ps1.zip')]", + "prepareClusterConfigurationFunction": "PrepareFailoverCluster.ps1\\PrepareFailoverCluster", + "configureClusterModulesURL": "[concat(variables('assetLocation'),'/ConfigureFailoverCluster.ps1.zip')]", + "configureClusterConfigurationFunction": "ConfigureFailoverCluster.ps1\\ConfigureFailoverCluster", + "spConfigurationModulesURL": "[concat(variables('assetLocation'),'/ConfigureSharePointServerHA.ps1.zip')]", + "spConfigurationFunction": "ConfigureSharePointServerHA.ps1\\ConfigureSharePointServerHA", + "spPreparationModulesURL": "[concat(variables('assetLocation'),'/PrepareSharePointServerHA.ps1.zip')]", + "spPreparationFunction": "PrepareSharePointServerHA.ps1\\PrepareSharePointServerHA", + "spWebIPAdressSetupURL": "[concat(parameters('baseUrl'),'/publicip-',parameters('spWebIPNewOrExisting'),'.json')]", + "spCAIPAdressSetupURL": "[concat(parameters('baseUrl'),'/publicip-','new.json')]", + "rdpIPAdressSetupURL": "[concat(parameters('baseUrl'),'/publicip-rdp.json')]", + "availabilitySetSetupURL": "[concat(parameters('baseUrl'),'/availabilitySets.json')]", + "provisioningPrimaryDCURL": "[concat(parameters('baseUrl'),'/provisioningPrimaryDomainController.json')]", + "provisioningBackupDCURL": "[concat(parameters('baseUrl'),'/provisioningBackupDomainController.json')]", + "configuringBackupDCURL": "[concat(parameters('baseUrl'),'/configuringBackupDomainController.json')]", + "configuringSQLAlwaysOnClusterUrl": "[concat(parameters('baseUrl'),'/configuringSQLAlwaysOnCluster.json')]", + "provisioningSharepointVMsURL": "[concat(parameters('baseUrl'),'/provisioningSharepointVMs.json')]", + "configuringSharepointUrl": "[concat(parameters('baseUrl'),'/configuringSharePoint.json')]", + "creatingStorageAccounts": "[concat(parameters('baseUrl'),'/creatingStorageAccounts.json')]", + "provisioningSQLVMsURL": "[concat(parameters('baseUrl'),'/provisioningSQLVMs.json')]", + "vnetSetupURL": "[concat(parameters('baseUrl'),'/vnet-new.json')]", + "setupLBsUrl": "[concat(parameters('baseUrl'),'/setupLBs.json')]", + "creatingNicsUrl": "[concat(parameters('baseUrl'),'/creatingNICS.json')]" + }, + "assetLocation": "https://sdaviesms.blob.core.windows.net/marketplaceprod/dscv2" + }, + "resources": [ + { + "name": "CreatingStorageAccounts", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').creatingStorageAccounts]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "storageAccountNamePrefix": { + "value": "[parameters('storageAccountNamePrefix')]" + }, + "storageAccountType": { + "value": "[parameters('storageAccountType')]" + } + } + } + }, + { + "name": "SettingUpRdp", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').rdpIPAdressSetupURL]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "rdpIPAddressName": { + "value": "[variables('rdpIPAddressName')]" + }, + "rdpLBName": { + "value": "[variables('lbSettings').rdpLBName]" + }, + "rdpLBFE": { + "value": "[variables('lbSettings').rdpLBFE]" + }, + "adLBBE": { + "value": "[variables('lbSettings').adLBBE]" + }, + "RDPNAT": { + "value": "[variables('RDPNAT')]" + }, + "rdplbFEConfigID": { + "value": "[variables('derivedIds').rdplbFEConfigID]" + } + } + } + }, + { + "name": "SettingUpSharepointWebPublicIP", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').spWebIPAdressSetupURL]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "publicIPAddressName": { + "value": "[parameters('spWebIPAddressName')]" + }, + "publicIPAddressType": { + "value": "dynamic" + }, + "dnsPrefix": { + "value": "[parameters('dnsPrefix')]" + }, + "publicIpRGName": { + "value": "[parameters('spWebIPRGName')]" + } + } + } + }, + { + "name": "SettingUpSharepointCentralAdminPublicIP", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').spCAIPAdressSetupURL]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "publicIPAddressName": { + "value": "[variables('spCAIPAddressName')]" + }, + "publicIPAddressType": { + "value": "dynamic" + }, + "dnsPrefix": { + "value": "[variables('spCADNSPrefix')]" + }, + "publicIpRGName": { + "value": "[resourceGroup().name]" + } + } + } + }, + { + "name": "CreatingAvailabilitySets", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').availabilitySetSetupURL]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "adAvailabilitySetName": { + "value": "[variables('vmSettings').availabilitySets.adAvailabilitySetName]" + }, + "sqlAvailabilitySetName": { + "value": "[variables('vmSettings').availabilitySets.sqlAvailabilitySetName]" + }, + "spWebAvailabilitySetName": { + "value": "[variables('vmSettings').availabilitySets.spWebAvailabilitySetName]" + }, + "spAppAvailabilitySetName": { + "value": "[variables('vmSettings').availabilitySets.spAppAvailabilitySetName]" + } + } + } + }, + { + "name": "CreatingVirtualNetwork", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').vnetSetupURL]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressRange": { + "value": "[parameters('virtualNetworkAddressRange')]" + }, + "subnets": { + "value": "[variables('subnets')]" + } + } + } + }, + { + "name": "SettingUpLoadBalancers", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "Microsoft.Resources/deployments/SettingUpSharepointCentralAdminPublicIP", + "Microsoft.Resources/deployments/SettingUpSharepointWebPublicIP", + "Microsoft.Resources/deployments/SettingUpRdp", + "Microsoft.Resources/deployments/CreatingVirtualNetwork" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').setupLBsUrl]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "spCALBName": { + "value": "[variables('lbSettings').spCALBName]" + }, + "spCALBFE": { + "value": "[variables('lbSettings').spCALBFE]" + }, + "spCAResourceId": { + "value": "[variables('ids').spCAResourceId]" + }, + "spCALBBE": { + "value": "[variables('lbSettings').spCALBBE]" + }, + "spCANAT": { + "value": "[variables('spCANAT')]" + }, + "spCAlbFEConfigID": { + "value": "[variables('derivedIds').spCAlbFEConfigID]" + }, + "spWebLBName": { + "value": "[variables('lbSettings').spWebLBName]" + }, + "spWebLBFE": { + "value": "[variables('lbSettings').spWebLBFE]" + }, + "spWebResourceId": { + "value": "[variables(concat('spWebResourceId',parameters('spWebIPNewOrExisting')))]" + }, + "spWebLBBE": { + "value": "[variables('lbSettings').spWebLBBE]" + }, + "spWebLB": { + "value": "[variables('lbSettings').spWebLB]" + }, + "spWebLBFEConfigID": { + "value": "[variables('derivedIds').spWebLBFEConfigID]" + }, + "spWebBEAddressPoolID": { + "value": "[variables('derivedIds').spWebBEAddressPoolID]" + }, + "spWebProbeID": { + "value": "[variables('derivedIds').spWebProbeID]" + }, + "spWebProbe": { + "value": "[variables('spWebProbe')]" + }, + "sqlLBName": { + "value": "[variables('lbSettings').sqlLBName]" + }, + "sqlLBFE": { + "value": "[variables('lbSettings').sqlLBFE]" + }, + "sqlLBIPAddress": { + "value": "[parameters('sqlLBIPAddress')]" + }, + "staticSubnetRef": { + "value": "[variables('staticSubnetRef')]" + }, + "sqlLBBE": { + "value": "[variables('lbSettings').sqlLBBE]" + }, + "sqllbFEConfigID": { + "value": "[variables('derivedIds').sqllbFEConfigID]" + }, + "sqllbProbeID": { + "value": "[variables('derivedIds').sqllbProbeID]" + }, + "SQLAOProbe": { + "value": "[variables('SQLAOProbe')]" + } + } + } + }, + { + "name": "CreatingNetworkInterfaces", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "Microsoft.Resources/deployments/CreatingVirtualNetwork", + "Microsoft.Resources/deployments/SettingUpRdp", + "Microsoft.Resources/deployments/SettingUpLoadBalancers" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').creatingNicsUrl]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "adPDCNicName": { + "value": "[variables('adPDCNicName')]" + }, + "adPDCNICIPAddress": { + "value": "[parameters('adPDCNICIPAddress')]" + }, + "staticSubnetRef": { + "value": "[variables('staticSubnetRef')]" + }, + "adBEAddressPoolID": { + "value": "[variables('derivedIds').adBEAddressPoolID]" + }, + "adRDPNATRuleID": { + "value": "[variables('derivedIds').adRDPNATRuleID]" + }, + "adBDCNicName": { + "value": "[variables('adBDCNicName')]" + }, + "adBDCNICIPAddress": { + "value": "[parameters('adBDCNICIPAddress')]" + }, + "sqlVMName": { + "value": "[variables('vmSettings').sqlVMName]" + }, + "sqlSubnetRef": { + "value": "[variables('sqlSubnetRef')]" + }, + "sqlBEAddressPoolID": { + "value": "[variables('derivedIds').sqlBEAddressPoolID]" + }, + "spwebVMName": { + "value": "[variables('vmSettings').spwebVMName]" + }, + "spWebSubnetRef": { + "value": "[variables('spWebSubnetRef')]" + }, + "spWebBEAddressPoolID": { + "value": "[variables('derivedIds').spWebBEAddressPoolID]" + }, + "spappVMName": { + "value": "[variables('vmSettings').spappVMName]" + }, + "spAppSubnetRef": { + "value": "[variables('spAppSubnetRef')]" + }, + "spCABEAddressPoolID": { + "value": "[variables('derivedIds').spCABEAddressPoolID]" + }, + "spCANATRuleID": { + "value": "[variables('derivedIds').spCANATRuleID]" + }, + "sqlwNicName": { + "value": "[variables('sqlwNicName')]" + } + } + } + }, + { + "name": "ProvisioningPrimaryADDomainController", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "Microsoft.Resources/deployments/CreatingStorageAccounts", + "Microsoft.Resources/deployments/CreatingNetworkInterfaces", + "Microsoft.Resources/deployments/CreatingAvailabilitySets", + "Microsoft.Resources/deployments/SettingUpRdp" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').provisioningPrimaryDCURL]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "adPDCVMName": { + "value": "[variables('vmSettings').adPDCVMName]" + }, + "location": { + "value": "[parameters('location')]" + }, + "storageAccountNamePrefix": { + "value": "[parameters('storageAccountNamePrefix')]" + }, + "availabilitySet": { + "value": "[variables('ids').adAvailabilitySetName]" + }, + "adVMSize": { + "value": "[parameters('adVMSize')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "windowsImagePublisher": { + "value": "[variables('vmSettings').windowsImagePublisher]" + }, + "windowsImageOffer": { + "value": "[variables('vmSettings').windowsImageOffer]" + }, + "windowsImageSKU": { + "value": "[variables('vmSettings').windowsImageSKU]" + }, + "vmContainerName": { + "value": "[variables('vmSettings').vmContainerName]" + }, + "adPDCNicName": { + "value": "[variables('adPDCNicName')]" + }, + "domainName": { + "value": "[parameters('domainName')]" + }, + "adPDCConfigurationFunction": { + "value": "[variables('configuration').adPDCConfigurationFunction]" + }, + "adPDCModulesURL": { + "value": "[variables('configuration').adPDCModulesURL]" + } + } + } + }, + { + "name": "UpdatingDNStoPrimaryADVM", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "Microsoft.Resources/deployments/ProvisioningPrimaryADDomainController" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').vnetwithDNSTemplateURL]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressRange": { + "value": "[parameters('virtualNetworkAddressRange')]" + }, + "subnets": { + "value": "[variables('subnets')]" + }, + "DNSServerAddress": { + "value": [ + "[parameters('adPDCNICIPAddress')]" + ] + } + } + } + }, + { + "name": "ProvisioningBackupADDomainController", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "Microsoft.Resources/deployments/CreatingStorageAccounts", + "Microsoft.Resources/deployments/CreatingNetworkInterfaces", + "Microsoft.Resources/deployments/CreatingAvailabilitySets" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').provisioningBackupDCURL]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "adBDCVMName": { + "value": "[variables('vmSettings').adBDCVMName]" + }, + "location": { + "value": "[parameters('location')]" + }, + "storageAccountNamePrefix": { + "value": "[parameters('storageAccountNamePrefix')]" + }, + "availabilitySet": { + "value": "[variables('ids').adAvailabilitySetName]" + }, + "adVMSize": { + "value": "[parameters('adVMSize')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "windowsImagePublisher": { + "value": "[variables('vmSettings').windowsImagePublisher]" + }, + "windowsImageOffer": { + "value": "[variables('vmSettings').windowsImageOffer]" + }, + "windowsImageSKU": { + "value": "[variables('vmSettings').windowsImageSKU]" + }, + "vmContainerName": { + "value": "[variables('vmSettings').vmContainerName]" + }, + "adBDCNicName": { + "value": "[variables('adBDCNicName')]" + }, + "DNSServer": { + "value": "[parameters('adPDCNICIPAddress')]" + }, + "adBDCPreparationFunction": { + "value": "[variables('configuration').adBDCPreparationFunction]" + }, + "adBDCPreparationModulesURL": { + "value": "[variables('configuration').adBDCPreparationModulesURL]" + } + } + } + }, + { + "name": "ConfiguringBackupADDomainController", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "Microsoft.Resources/deployments/ProvisioningBackupADDomainController", + "Microsoft.Resources/deployments/UpdatingDNStoPrimaryADVM" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').configuringBackupDCURL]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "adBDCVMName": { + "value": "[variables('vmSettings').adBDCVMName]" + }, + "location": { + "value": "[parameters('location')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "domainName": { + "value": "[parameters('domainName')]" + }, + "adBDCConfigurationFunction": { + "value": "[variables('configuration').adBDCConfigurationFunction]" + }, + "adBDCConfigurationModulesURL": { + "value": "[variables('configuration').adBDCConfigurationModulesURL]" + } + } + } + }, + { + "name": "UpdatingDNSwithBackupADVM", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "Microsoft.Resources/deployments/ConfiguringBackupADDomainController" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').vnetwithDNSTemplateURL]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressRange": { + "value": "[parameters('virtualNetworkAddressRange')]" + }, + "subnets": { + "value": "[variables('subnets')]" + }, + "DNSServerAddress": { + "value": [ + "[parameters('adPDCNICIPAddress')]", + "[parameters('adBDCNICIPAddress')]" + ] + } + } + } + }, + { + "name": "ProvisioningSQLVirtualMachines", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "Microsoft.Resources/deployments/CreatingStorageAccounts", + "Microsoft.Resources/deployments/CreatingNetworkInterfaces", + "Microsoft.Resources/deployments/CreatingAvailabilitySets" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').provisioningSQLVMsURL]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "sqlVMName": { + "value": "[variables('vmSettings').sqlVMName]" + }, + "location": { + "value": "[parameters('location')]" + }, + "storageAccountNamePrefix": { + "value": "[parameters('storageAccountNamePrefix')]" + }, + "availabilitySet": { + "value": "[variables('ids').sqlAvailabilitySetName]" + }, + "sqlVMSize": { + "value": "[parameters('sqlVMSize')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "windowsImagePublisher": { + "value": "[variables('vmSettings').windowsImagePublisher]" + }, + "windowsImageOffer": { + "value": "[variables('vmSettings').windowsImageOffer]" + }, + "windowsImageSKU": { + "value": "[variables('vmSettings').windowsImageSKU]" + }, + "vmContainerName": { + "value": "[variables('vmSettings').vmContainerName]" + }, + "sqlImagePublisher": { + "value": "[variables('vmSettings').sqlImagePublisher]" + }, + "sqlImageOffer": { + "value": "[variables('vmSettings').sqlImageOffer]" + }, + "sqlImageSKU": { + "value": "[variables('vmSettings').sqlImageSKU]" + }, + "domainName": { + "value": "[parameters('domainName')]" + }, + "sqlAOPrepareModulesURL": { + "value": "[variables('configuration').sqlAOPrepareModulesURL]" + }, + "sqlAOPrepareFunction": { + "value": "[variables('configuration').sqlAOPrepareFunction]" + }, + "prepareClusterModulesURL": { + "value": "[variables('configuration').prepareClusterModulesURL]" + }, + "prepareClusterConfigurationFunction": { + "value": "[variables('configuration').prepareClusterConfigurationFunction]" + }, + "sharePath": { + "value": "[variables('sharePath')]" + }, + "witnessVMSize": { + "value": "[parameters('witnessVMSize')]" + }, + "sqlwVMName": { + "value": "[variables('vmSettings').sqlwVMName]" + }, + "sqlwNicName": { + "value": "[variables('sqlwNicName')]" + }, + "fswPreparationModulesURL": { + "value": "[variables('configuration').fswPreparationModulesURL]" + }, + "fswPreparationFunction": { + "value": "[variables('configuration').fswPreparationFunction]" + }, + "DNSServer": { + "value": "[parameters('adPDCNICIPAddress')]" + } + } + } + }, + { + "name": "ConfiguringSQLAlwaysOnCluster", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "Microsoft.Resources/deployments/UpdatingDNSwithBackupADVM", + "Microsoft.Resources/deployments/ProvisioningSQLVirtualMachines" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').configuringSQLAlwaysOnClusterUrl]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "sqlVMName": { + "value": "[variables('vmSettings').sqlVMName]" + }, + "location": { + "value": "[parameters('location')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "domainName": { + "value": "[parameters('domainName')]" + }, + "sqlAOConfigurationModulesURL": { + "value": "[variables('configuration').sqlAOConfigurationModulesURL]" + }, + "sqlAOConfigurationFunction": { + "value": "[variables('configuration').sqlAOConfigurationFunction]" + }, + "sqlAOEPName": { + "value": "[variables('sqlAOEPName')]" + }, + "sqlServerServiceAccountUserName": { + "value": "[parameters('sqlServerServiceAccountUserName')]" + }, + "sharePointSetupUserAccountUserName": { + "value": "[parameters('sharePointSetupUserAccountUserName')]" + }, + "sqlServerServiceAccountPassword": { + "value": "[parameters('sqlServerServiceAccountPassword')]" + }, + "sharePointSetupUserAccountPassword": { + "value": "[parameters('sharePointSetupUserAccountPassword')]" + }, + "configureClusterModulesURL": { + "value": "[variables('configuration').configureClusterModulesURL]" + }, + "configureClusterConfigurationFunction": { + "value": "[variables('configuration').configureClusterConfigurationFunction]" + }, + "clusterName": { + "value": "[variables('clusterName')]" + }, + "sharePath": { + "value": "[variables('sharePath')]" + }, + "sqlAOAGName": { + "value": "[variables('sqlAOAGName')]" + }, + "sqlAOListenerName": { + "value": "[variables('sqlAOListenerName')]" + }, + "sqlLBName": { + "value": "[variables('lbSettings').sqlLBName]" + }, + "sqlLBIPAddress": { + "value": "[parameters('sqlLBIPAddress')]" + }, + "adPDCVMName": { + "value": "[variables('vmSettings').adPDCVMName]" + }, + "sqlwVMName": { + "value": "[variables('vmSettings').sqlwVMName]" + }, + "fswConfigurationModulesURL": { + "value": "[variables('configuration').fswConfigurationModulesURL]" + }, + "fswConfigurationFunction": { + "value": "[variables('configuration').fswConfigurationFunction]" + } + } + } + }, + { + "name": "CreatingSharepointVirtualMachines", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "Microsoft.Resources/deployments/CreatingStorageAccounts", + "Microsoft.Resources/deployments/CreatingNetworkInterfaces", + "Microsoft.Resources/deployments/CreatingAvailabilitySets" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').provisioningSharepointVMsURL]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "spappVMName": { + "value": "[variables('vmSettings').spappVMName]" + }, + "spwebVMName": { + "value": "[variables('vmSettings').spwebVMName]" + }, + "location": { + "value": "[parameters('location')]" + }, + "spVMSize": { + "value": "[parameters('spVMSize')]" + }, + "spWebAvailabilitySet": { + "value": "[variables('ids').spWebAvailabilitySetName]" + }, + "spAppAvailabilitySet": { + "value": "[variables('ids').spAppAvailabilitySetName]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "spImagePublisher": { + "value": "[variables('vmSettings').spImagePublisher]" + }, + "spImageOffer": { + "value": "[variables('vmSettings').spImageOffer]" + }, + "spImageSKU": { + "value": "[variables('vmSettings').spImageSKU]" + }, + "vmContainerName": { + "value": "[variables('vmSettings').vmContainerName]" + }, + "storageAccountNamePrefix": { + "value": "[parameters('storageAccountNamePrefix')]" + }, + "spPreparationModulesURL": { + "value": "[variables('configuration').spPreparationModulesURL]" + }, + "spPreparationFunction": { + "value": "[variables('configuration').spPreparationFunction]" + }, + "domainName": { + "value": "[parameters('domainName')]" + }, + "DNSServer": { + "value": "[parameters('adPDCNICIPAddress')]" + } + } + } + }, + { + "name": "ConfiguringSharepoint", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "Microsoft.Resources/deployments/ConfiguringSQLAlwaysOnCluster", + "Microsoft.Resources/deployments/CreatingSharepointVirtualMachines" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('configuration').configuringSharepointUrl]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "spappVMName": { + "value": "[variables('vmSettings').spappVMName]" + }, + "sqlVMName": { + "value": "[variables('vmSettings').sqlVMName]" + }, + "location": { + "value": "[parameters('location')]" + }, + "spConfigurationModulesURL": { + "value": "[variables('configuration').spConfigurationModulesURL]" + }, + "spConfigurationFunction": { + "value": "[variables('configuration').spConfigurationFunction]" + }, + "domainName": { + "value": "[parameters('domainName')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "sharePointSetupUserAccountUserName": { + "value": "[parameters('sharePointSetupUserAccountUserName')]" + }, + "sharePointFarmAccountUserName": { + "value": "[parameters('sharePointFarmAccountUserName')]" + }, + "sqlServerServiceAccountUserName": { + "value": "[parameters('sqlServerServiceAccountUserName')]" + }, + "sqlAOAGName": { + "value": "[variables('sqlAOAGName')]" + }, + "administrationContentDatabaseName": { + "value": "[variables('administrationContentDatabaseName')]" + }, + "configDatabaseName": { + "value": "[variables('configDatabaseName')]" + }, + "contentDatabaseName": { + "value": "[variables('contentDatabaseName')]" + }, + "sharepointCAfqdn": { + "value": "[variables('sharepointCAfqdn')]" + }, + "sharePointSetupUserAccountPassword": { + "value": "[parameters('sharePointSetupUserAccountPassword')]" + }, + "sharePointFarmAccountPassword": { + "value": "[parameters('sharePointFarmAccountPassword')]" + }, + "sharePointFarmPassphrasePassword": { + "value": "[parameters('sharePointFarmPassphrasePassword')]" + }, + "sqlServerServiceAccountPassword": { + "value": "[parameters('sqlServerServiceAccountPassword')]" + }, + "spwebVMName": { + "value": "[variables('vmSettings').spwebVMName]" + }, + "sharepointFarmName": { + "value": "[parameters('sharepointFarmName')]" + }, + "sharepointWebfqdn": { + "value": "[variables('sharepointWebfqdn')]" + }, + "spSiteTemplateName": { + "value": "[parameters('spSiteTemplateName')]" + } + } } - ], - "outputs": { - "fqdn": { - "value": "[variables('sharepointWebfqdn')]", - "type": "string" - }, - "cafqdn":{ - "value":"[variables('sharepointCAfqdn')]", - "type": "string" - } - } + } + ], + "outputs": { + "fqdn": { + "value": "[variables('sharepointWebfqdn')]", + "type": "string" + }, + "cafqdn": { + "value": "[variables('sharepointCAfqdn')]", + "type": "string" + } + } } diff --git a/sharepoint-server-farm-ha/nestedtemplates/availabilitySets.json b/sharepoint-server-farm-ha/nestedtemplates/availabilitySets.json index bffbd3675fe0..ac91f51a7d71 100644 --- a/sharepoint-server-farm-ha/nestedtemplates/availabilitySets.json +++ b/sharepoint-server-farm-ha/nestedtemplates/availabilitySets.json @@ -24,8 +24,7 @@ "name": "[parameters('adAvailabilitySetName')]", "apiVersion": "2015-06-15", "location": "[parameters('location')]", - "properties": { - } + "properties": {} }, { "type": "Microsoft.Compute/availabilitySets", @@ -42,16 +41,14 @@ "name": "[parameters('spWebAvailabilitySetName')]", "apiVersion": "2015-06-15", "location": "[parameters('location')]", - "properties": { - } + "properties": {} }, { "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('spAppAvailabilitySetName')]", "apiVersion": "2015-06-15", "location": "[parameters('location')]", - "properties": { - } + "properties": {} } ], "outputs": { @@ -72,4 +69,4 @@ "value": "[resourceId('Microsoft.Compute/availabilitySets',parameters('spAppAvailabilitySetName'))]" } } -} \ No newline at end of file +} diff --git a/sharepoint-server-farm-ha/nestedtemplates/creatingStorageAccounts.json b/sharepoint-server-farm-ha/nestedtemplates/creatingStorageAccounts.json index 74343d70a95c..dce319d21fe4 100644 --- a/sharepoint-server-farm-ha/nestedtemplates/creatingStorageAccounts.json +++ b/sharepoint-server-farm-ha/nestedtemplates/creatingStorageAccounts.json @@ -6,7 +6,8 @@ "type": "string" }, "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "storageAccountType": { "type": "string" @@ -37,8 +38,8 @@ "name": "Standard_LRS" }, "kind": "Storage", - "properties": { } + "properties": {} } ], "outputs": {} -} \ No newline at end of file +} diff --git a/sharepoint-server-farm-ha/nestedtemplates/publicip-new.json b/sharepoint-server-farm-ha/nestedtemplates/publicip-new.json index 096d7123ee8f..41d460abc53c 100644 --- a/sharepoint-server-farm-ha/nestedtemplates/publicip-new.json +++ b/sharepoint-server-farm-ha/nestedtemplates/publicip-new.json @@ -46,4 +46,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/sharepoint-server-farm-ha/nestedtemplates/publicip-rdp.json b/sharepoint-server-farm-ha/nestedtemplates/publicip-rdp.json index db941c98bafe..0801ac53eb50 100644 --- a/sharepoint-server-farm-ha/nestedtemplates/publicip-rdp.json +++ b/sharepoint-server-farm-ha/nestedtemplates/publicip-rdp.json @@ -85,4 +85,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/sharepoint-server-farm-ha/nestedtemplates/setupLBs.json b/sharepoint-server-farm-ha/nestedtemplates/setupLBs.json index 069117fea703..3b2ebb9cbc6a 100644 --- a/sharepoint-server-farm-ha/nestedtemplates/setupLBs.json +++ b/sharepoint-server-farm-ha/nestedtemplates/setupLBs.json @@ -222,4 +222,4 @@ } } ] -} \ No newline at end of file +} diff --git a/shibboleth-cluster-ubuntu/azuredeploy.json b/shibboleth-cluster-ubuntu/azuredeploy.json index 874433d571ac..e7f0a597ae9a 100644 --- a/shibboleth-cluster-ubuntu/azuredeploy.json +++ b/shibboleth-cluster-ubuntu/azuredeploy.json @@ -109,6 +109,13 @@ "metadata": { "description": "The size of the database backend VM." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -127,7 +134,6 @@ "publicIPAddressName": "[concat(parameters('uniqueNamePrefix'),'IP')]", "publicDBIPAddressName": "[concat(parameters('uniqueNamePrefix'),'DBIP')]", "publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]", - "publicDBIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicDBIPAddressName'))]", "publicIPAddressType": "Dynamic", "vmStorageAccountContainerName": "vhds", "vmName": "[concat(parameters('uniqueNamePrefix'),'VM')]", @@ -143,18 +149,17 @@ "lbPoolID": "[concat(variables('lbID'),'/backendAddressPools/LoadBalancerBackend')]", "installScriptName": "install_shibboleth_idp.sh", "installScriptUri": "[concat('https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/shibboleth-cluster-ubuntu/', variables('installScriptName'))]", - "installCommand": "[concat('sh ', variables('installScriptName'), ' ', parameters('uniqueNamePrefix'), ' ', resourceGroup().location, ' ', concat(parameters('uniqueNamePrefix'),'db'), ' ', parameters('mySqlIdpUser'), ' ', parameters('mySqlPasswordForIdpUser'))]", + "installCommand": "[concat('sh ', variables('installScriptName'), ' ', parameters('uniqueNamePrefix'), ' ', parameters('location'), ' ', concat(parameters('uniqueNamePrefix'),'db'), ' ', parameters('mySqlIdpUser'), ' ', parameters('mySqlPasswordForIdpUser'))]", "installBackendScriptName": "install_backend.sh", "installBackendScriptUri": "[concat('https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/shibboleth-cluster-ubuntu/', variables('installBackendScriptName'))]", - "installBackendCommand": "[concat('sh ', variables('installBackendScriptName'), ' ', parameters('mySqlPasswordForRootUser'), ' ', parameters('mySqlIdpUser'), ' ', parameters('mySqlPasswordForIdpUser'))]", - "apiVersion": "2015-06-15" + "installBackendCommand": "[concat('sh ', variables('installBackendScriptName'), ' ', parameters('mySqlPasswordForRootUser'), ' ', parameters('mySqlIdpUser'), ' ', parameters('mySqlPasswordForIdpUser'))]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -163,14 +168,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -185,7 +190,7 @@ "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('virtualNetworkName'), '-sg')]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -215,7 +220,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]", "[concat('Microsoft.Network/loadBalancers/',variables('lbName'))]" @@ -252,7 +257,7 @@ "apiVersion": "2015-06-15", "name": "[variables('lbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'))]" ], @@ -373,7 +378,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/',concat(variables('nicName'),copyIndex()))]", @@ -424,14 +429,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[concat(variables('availabilitySetName'),'db')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicDBIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -443,7 +448,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'),'db')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('publicDBIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]", @@ -473,7 +478,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(variables('virtualNetworkName'), '-sg')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -511,7 +516,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'),'db')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/',variables('nicName'),'db')]", @@ -558,7 +563,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'db','/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'),'db'))]" ], @@ -581,7 +586,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),copyIndex(),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'),copyIndex()))]" ], @@ -605,4 +610,4 @@ } } ] -} \ No newline at end of file +} diff --git a/shibboleth-cluster-windows/azuredeploy.json b/shibboleth-cluster-windows/azuredeploy.json index a4e3c0ee7b80..a90027cd793d 100644 --- a/shibboleth-cluster-windows/azuredeploy.json +++ b/shibboleth-cluster-windows/azuredeploy.json @@ -121,6 +121,13 @@ "metadata": { "description": "The size of the database backend VM." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -139,7 +146,6 @@ "publicIPAddressName": "[concat(parameters('uniqueNamePrefix'),'IP')]", "publicDBIPAddressName": "[concat(parameters('uniqueNamePrefix'),'DBIP')]", "publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]", - "publicDBIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicDBIPAddressName'))]", "publicIPAddressType": "Dynamic", "vmStorageAccountContainerName": "vhds", "vmName": "[concat(parameters('uniqueNamePrefix'),'VM')]", @@ -155,18 +161,17 @@ "lbPoolID": "[concat(variables('lbID'),'/backendAddressPools/LoadBalancerBackend')]", "installScriptName": "install_shibboleth_idp.ps1", "installScriptUri": "[concat('https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/shibboleth-cluster-windows/', variables('installScriptName'))]", - "installCommand": "[concat('powershell.exe',' ','-File',' ',variables('installScriptName'),' ',parameters('uniqueNamePrefix'),' ',resourceGroup().location,' ',concat(parameters('uniqueNamePrefix'),'db'),' ',parameters('mySqlIdpUser'),' \"',parameters('mySqlPasswordForIdpUser'),'\"')]", + "installCommand": "[concat('powershell.exe',' ','-File',' ',variables('installScriptName'),' ',parameters('uniqueNamePrefix'),' ',parameters('location'),' ',concat(parameters('uniqueNamePrefix'),'db'),' ',parameters('mySqlIdpUser'),' \"',parameters('mySqlPasswordForIdpUser'),'\"')]", "installBackendScriptName": "install_backend.ps1", "installBackendScriptUri": "[concat('https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/shibboleth-cluster-windows/', variables('installBackendScriptName'))]", - "installBackendCommand": "[concat('powershell.exe',' ','-File',' ',variables('installBackendScriptName'),' \"',parameters('mySqlPasswordForRootUser'),'\" ',parameters('mySqlIdpUser'),' \"',parameters('mySqlPasswordForIdpUser'),'\"')]", - "apiVersion": "2015-06-15" + "installBackendCommand": "[concat('powershell.exe',' ','-File',' ',variables('installBackendScriptName'),' \"',parameters('mySqlPasswordForRootUser'),'\" ',parameters('mySqlIdpUser'),' \"',parameters('mySqlPasswordForIdpUser'),'\"')]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -175,14 +180,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -197,7 +202,7 @@ "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('virtualNetworkName'), '-sg')]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -227,7 +232,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]", "[concat('Microsoft.Network/loadBalancers/',variables('lbName'))]" @@ -264,7 +269,7 @@ "apiVersion": "2015-06-15", "name": "[variables('lbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'))]" ], @@ -385,7 +390,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'),copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/',concat(variables('nicName'),copyIndex()))]", @@ -436,14 +441,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[concat(variables('availabilitySetName'),'db')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicDBIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -455,7 +460,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'),'db')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/',variables('publicDBIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]", @@ -485,7 +490,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(variables('virtualNetworkName'), '-sg')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -551,7 +556,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'),'db')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/',variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/',variables('nicName'),'db')]", @@ -598,7 +603,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'db','/CustomScriptExtension')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'),'db'))]" ], @@ -621,7 +626,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),copyIndex(),'/CustomScriptExtension')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',concat(variables('vmName'),copyIndex()))]" ], @@ -645,4 +650,4 @@ } } ] -} \ No newline at end of file +} diff --git a/shibboleth-singlevm-ubuntu/azuredeploy.json b/shibboleth-singlevm-ubuntu/azuredeploy.json index 1de17e4f1487..43e4c391bf14 100644 --- a/shibboleth-singlevm-ubuntu/azuredeploy.json +++ b/shibboleth-singlevm-ubuntu/azuredeploy.json @@ -48,6 +48,13 @@ "metadata": { "description": "The size of the VM." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -70,8 +77,7 @@ "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", "installScriptName": "install_shibboleth_idp.sh", "installScriptUri": "[concat('https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/shibboleth-singlevm-ubuntu/', variables('installScriptName'))]", - "installCommand": "[concat('sh ', variables('installScriptName'), ' ', parameters('uniqueNamePrefix'), ' ', resourceGroup().location)]", - "apiVersion": "2017-06-01" + "installCommand": "[concat('sh ', variables('installScriptName'), ' ', parameters('uniqueNamePrefix'), ' ', parameters('location'))]" }, "resources": [ { @@ -81,14 +87,14 @@ "name": "[variables('storageAccountType')]" }, "name": "[variables('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2017-10-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -100,7 +106,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -121,7 +127,7 @@ "apiVersion": "2017-10-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -147,7 +153,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -190,7 +196,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/shibboleth-singlevm-windows/azuredeploy.json b/shibboleth-singlevm-windows/azuredeploy.json index 6ee8d651f2ad..464c8fe4addb 100644 --- a/shibboleth-singlevm-windows/azuredeploy.json +++ b/shibboleth-singlevm-windows/azuredeploy.json @@ -60,6 +60,13 @@ "metadata": { "description": "The size of the VM." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -81,15 +88,14 @@ "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", "installScriptName": "install_shibboleth_idp.ps1", "installScriptUri": "[concat('https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/shibboleth-singlevm-windows/', variables('installScriptName'))]", - "installCommand": "[concat('powershell.exe -File ', variables('installScriptName'),' ',parameters('uniqueNamePrefix'), ' ',resourceGroup().location)]", - "apiVersion": "2015-06-15" + "installCommand": "[concat('powershell.exe -File ', variables('installScriptName'),' ',parameters('uniqueNamePrefix'), ' ',parameters('location'))]" }, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -98,7 +104,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -110,7 +116,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -131,7 +137,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -157,7 +163,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -200,7 +206,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/CustomScriptExtension')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -220,4 +226,4 @@ } } ] -} \ No newline at end of file +} diff --git a/slurm-on-sles12-hpc/azuredeploy.json b/slurm-on-sles12-hpc/azuredeploy.json index 2114fdaaa0bc..9551ad40ab77 100644 --- a/slurm-on-sles12-hpc/azuredeploy.json +++ b/slurm-on-sles12-hpc/azuredeploy.json @@ -118,6 +118,13 @@ "metadata": { "description": "The size in GB of each data disk that is attached to the VM. A RAID-0 volume is created with all data disks that is dataDiskSize * dataDiskCount in size." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -131,7 +138,6 @@ "publicIPAddressName": "publicips", "masterVMName": "master", "workerVMName": "worker", - "armApiVersion": "2015-06-15", "nicName": "nic", "networkSettings": { "virtualNetworkName": "virtualnetwork", @@ -162,7 +168,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('newStorageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -171,7 +177,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -192,7 +198,7 @@ "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2015-06-15", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -204,7 +210,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('networkSettings').virtualNetworkName)]" @@ -231,7 +237,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('masterVMName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -436,7 +442,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('masterVMName'), '/Installation')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('masterVMName'))]" ], @@ -457,7 +463,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('workerVMName'), copyindex(), '/Installation')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('masterVMName'),'/extensions/Installation')]", "[concat('Microsoft.Compute/virtualMachines/', variables('workerVMName'), copyindex())]" @@ -483,7 +489,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), 'worker', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('networkSettings').virtualNetworkName)]" ], @@ -510,7 +516,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('workerVMName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), 'worker', copyindex())]" @@ -554,4 +560,4 @@ } } ] -} \ No newline at end of file +} diff --git a/slurm/azuredeploy.json b/slurm/azuredeploy.json index d7445be8093c..9e0e1a3d2952 100644 --- a/slurm/azuredeploy.json +++ b/slurm/azuredeploy.json @@ -41,6 +41,13 @@ "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": { @@ -80,7 +87,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2016-05-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "kind": "Storage", "sku": { "name": "Standard_LRS" @@ -90,7 +97,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -111,7 +118,7 @@ "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2016-09-01", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -123,7 +130,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicNameMaster')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('publicIPAddressName')]", "[variables('networkSettings').virtualNetworkName]" @@ -150,7 +157,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmNameMaster')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('storageAccountName')]", "[variables('nicNameMaster')]" @@ -193,7 +200,7 @@ "apiVersion": "2016-03-30", "type": "extensions", "name": "Installation", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('vmNameMaster')]" ], @@ -218,7 +225,7 @@ "apiVersion": "2016-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicNameWorker'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('networkSettings').virtualNetworkName]" ], @@ -245,7 +252,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmNameWorker'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('storageAccountName')]", "nicLoop" diff --git a/solace-message-router/azuredeploy.json b/solace-message-router/azuredeploy.json index 85af0a86abcb..0cbefcff7bb6 100644 --- a/solace-message-router/azuredeploy.json +++ b/solace-message-router/azuredeploy.json @@ -56,20 +56,27 @@ ] }, "solaceVMR_URI": { - "type": "string", - "metadata": { - "description": "The URI location of the Solace VMR Docker container tarball" - } + "type": "string", + "metadata": { + "description": "The URI location of the Solace VMR Docker container tarball" + } }, "deploymentModel": { "type": "string", "metadata": { - "description": "Deploy three node ha cluster or single node" + "description": "Deploy three node ha cluster or single node" }, "allowedValues": [ "HighAvailability", "SingleNode" ] + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -86,7 +93,6 @@ "publicIPAddressName": "myPublicIPD", "publicIPAddressType": "Dynamic", "vmStorageAccountVHDsName": "vhds", - "vmStorageAccountContainersName": "containers", "vmName": "SolaceVMR", "addressPrefix": "10.0.0.0/16", "subnetPrefix": "10.0.0.0/24", @@ -99,7 +105,9 @@ "deploymentModelHighAvailability": { "numberOfNodes": 3 }, - "deploymentModelSingleNode": { "numberOfNodes": 1 }, + "deploymentModelSingleNode": { + "numberOfNodes": 1 + }, "numberOfInstances": "[variables(concat('deploymentModel', parameters('deploymentModel'))).numberOfNodes]" }, "resources": [ @@ -127,7 +135,7 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "interfaceLoop", "count": "[variables('numberOfInstances')]" @@ -143,26 +151,28 @@ "apiVersion": "2016-03-30", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { - "addressSpace": { - "addressPrefixes": [ "[variables('addressPrefix')]" ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" ] - } + }, + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "[variables('subnetPrefix')]" + } + } + ] + } }, { "apiVersion": "2016-03-30", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[variables('numberOfInstances')]" @@ -197,24 +207,24 @@ "name": "[variables('storageAccountType')]" }, "kind": "Storage", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { - "platformFaultDomainCount": "[variables('platformFaultDomainCount')]", - "platformUpdateDomainCount": "[variables('platformUpdateDomainCount')]" + "platformFaultDomainCount": "[variables('platformFaultDomainCount')]", + "platformUpdateDomainCount": "[variables('platformUpdateDomainCount')]" } }, { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineLoop", "count": "[variables('numberOfInstances')]" @@ -262,7 +272,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyindex(), '/DockerExtension')]", "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "DockerLoop", "count": "[variables('numberOfInstances')]" @@ -275,14 +285,14 @@ "type": "DockerExtension", "typeHandlerVersion": "1.0", "autoUpgradeMinorVersion": true, - "settings": { } + "settings": {} } }, { "apiVersion": "2016-03-30", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyindex(), '/configureVMRContainer')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "SolaceLoop", "count": "[variables('numberOfInstances')]" @@ -301,8 +311,8 @@ "[concat(variables('scriptUrl'), 'scripts/', variables('solaceInstallScriptName'))]", "[concat(variables('scriptUrl'), 'scripts/semp_query.sh')]" ], - "commandToExecute": "[concat('bash ', variables('solaceInstallScriptName'), ' -c ', copyindex(), ' -i ', variables('nodeAddressPrefix'), ' -n ', variables('numberOfInstances'), ' -p ', parameters('adminPassword'))]" - } + "commandToExecute": "[concat('bash ', variables('solaceInstallScriptName'), ' -c ', copyindex(), ' -i ', variables('nodeAddressPrefix'), ' -n ', variables('numberOfInstances'), ' -p ', parameters('adminPassword'))]" + } } } ] diff --git a/solace-message-router/shared-resources.json b/solace-message-router/shared-resources.json index 2468185e3035..5bf5a8abea3c 100644 --- a/solace-message-router/shared-resources.json +++ b/solace-message-router/shared-resources.json @@ -1,177 +1,183 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "securityGroupName": { - "type": "string", - "defaultValue": "vmr-security", - "metadata": { - "description": "Security group defined to support VMR default message vpn ports" - } - }, - "subnetPrefix": { - "type": "string", - "defaultValue": "10.0.0.0/24", - "metadata": { - "description": "Subnet for VMRS" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "securityGroupName": { + "type": "string", + "defaultValue": "vmr-security", + "metadata": { + "description": "Security group defined to support VMR default message vpn ports" + } }, - "variables": { + "subnetPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/24", + "metadata": { + "description": "Subnet for VMRS" + } }, - "resources": [ - { - "name": "[parameters('securityGroupName')]", - "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [ + { + "name": "[parameters('securityGroupName')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "outbound", "properties": { - "securityRules": [ - { - "name": "outbound", - "properties": { - "priority": 100, - "sourceAddressPrefix": "[parameters('subnetPrefix')]", - "protocol": "*", - "destinationPortRange": "*", - "access": "Allow", - "direction": "Outbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "ad8741", - "properties": { - "priority": 150, - "protocol": "Tcp", - "sourceAddressPrefix": "[parameters('subnetPrefix')]", - "sourcePortRange": "*", - "access": "Allow", - "direction": "Inbound", - "destinationPortRange": "8741", - "destinationAddressPrefix": "[parameters('subnetPrefix')]" - } - }, - { - "name": "ad8300", - "properties": { - "priority": 151, - "protocol": "*", - "sourceAddressPrefix": "[parameters('subnetPrefix')]", - "sourcePortRange": "*", - "access": "Allow", - "direction": "Inbound", - "destinationPortRange": "8300-8302", - "destinationAddressPrefix": "[parameters('subnetPrefix')]" - } - }, - { - "name": "ssh", - "properties": { - "priority": 200, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "22", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "web", - "properties": { - "priority": 201, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "80", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "mqtt", - "properties": { - "priority": 202, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "1883", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "mqtt_ws", - "properties": { - "priority": 203, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "8000", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "semp", - "properties": { - "priority": 204, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "8080", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "rest", - "properties": { - "priority": 205, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "9000", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "smf_compressed", - "properties": { - "priority": 206, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "55003", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "smf", - "properties": { - "priority": 207, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "55555", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - } - ] - } + "priority": 100, + "sourceAddressPrefix": "[parameters('subnetPrefix')]", + "protocol": "*", + "destinationPortRange": "*", + "access": "Allow", + "direction": "Outbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "ad8741", + "properties": { + "priority": 150, + "protocol": "Tcp", + "sourceAddressPrefix": "[parameters('subnetPrefix')]", + "sourcePortRange": "*", + "access": "Allow", + "direction": "Inbound", + "destinationPortRange": "8741", + "destinationAddressPrefix": "[parameters('subnetPrefix')]" + } + }, + { + "name": "ad8300", + "properties": { + "priority": 151, + "protocol": "*", + "sourceAddressPrefix": "[parameters('subnetPrefix')]", + "sourcePortRange": "*", + "access": "Allow", + "direction": "Inbound", + "destinationPortRange": "8300-8302", + "destinationAddressPrefix": "[parameters('subnetPrefix')]" + } + }, + { + "name": "ssh", + "properties": { + "priority": 200, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "22", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "web", + "properties": { + "priority": 201, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "80", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "mqtt", + "properties": { + "priority": 202, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "1883", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "mqtt_ws", + "properties": { + "priority": 203, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "8000", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "semp", + "properties": { + "priority": 204, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "8080", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "rest", + "properties": { + "priority": 205, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "9000", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "smf_compressed", + "properties": { + "priority": 206, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "55003", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "smf", + "properties": { + "priority": 207, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "55555", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } } - ] -} \ No newline at end of file + ] + } + } + ] +} diff --git a/sonarqube-azuresql/azuredeploy.json b/sonarqube-azuresql/azuredeploy.json index d52c3735147a..164621aec3fb 100644 --- a/sonarqube-azuresql/azuredeploy.json +++ b/sonarqube-azuresql/azuredeploy.json @@ -130,6 +130,13 @@ "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": { @@ -137,7 +144,6 @@ "SQvnetPrefix": "10.0.0.0/16", "SQvnetExternalSubnetName": "Subnet-External", "SQvnetExternalSubnetPrefix": "10.0.0.0/24", - "SQvnetInternalSubnetName": "Subnet-Internal", "SQvnetInternalSubnetPrefix": "10.0.1.0/24", "SQvmAppImagePublisher": "Microsoft", "SQvmAppImageOffer": "JDK", @@ -189,7 +195,7 @@ { "name": "[variables('SQstorageName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -202,7 +208,7 @@ { "name": "SQvnet", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', 'SQnsgApp')]" @@ -232,7 +238,7 @@ { "name": "[variables('SQvmAppNicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', 'SQvnet')]", @@ -261,7 +267,7 @@ { "name": "[parameters('sqVM_AppName')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('SQstorageName'))]", @@ -307,7 +313,7 @@ { "name": "configureAppVM_DSC", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('sqVM_AppName'))]" @@ -334,7 +340,7 @@ { "name": "secureSonarQube", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('sqVM_AppName'))]", @@ -366,7 +372,7 @@ { "name": "[variables('SQpublicIPName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -382,7 +388,7 @@ { "name": "SQnsgApp", "type": "Microsoft.Network/networkSecurityGroups", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -474,4 +480,4 @@ "value": "[concat('https://',reference(variables('SQpublicIPName')).dnsSettings.fqdn)]" } } -} \ No newline at end of file +} diff --git a/sonarqube-azuresql/nested/azureDBDeploy.json b/sonarqube-azuresql/nested/azureDBDeploy.json index 75453875ec01..41bf0648744d 100644 --- a/sonarqube-azuresql/nested/azureDBDeploy.json +++ b/sonarqube-azuresql/nested/azureDBDeploy.json @@ -26,6 +26,13 @@ "Standard", "Premium" ] + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -36,7 +43,7 @@ "name": "[parameters('sonarSqlName')]", "type": "Microsoft.Sql/servers", "kind": "v12.0", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01-preview", "dependsOn": [], "tags": { @@ -49,9 +56,9 @@ }, "resources": [ { - "name": "[uniqueString(parameters('sonarSqlName'), 'AllowAllWindowsAzureIps' )]", + "name": "[uniqueString(parameters('sonarSqlName'), 'AllowAllWindowsAzureIps' )]", "type": "firewallrules", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01-preview", "dependsOn": [ "[concat('Microsoft.Sql/servers/', parameters('sonarSqlName'))]" @@ -65,7 +72,7 @@ "name": "[parameters('sonarDbName')]", "type": "databases", "kind": "v12.0,user", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2014-04-01-preview", "dependsOn": [ "[parameters('sonarSqlName')]" @@ -88,4 +95,4 @@ "value": "[concat('jdbc:sqlserver://', reference(concat('Microsoft.Sql/servers/', parameters('sonarSqlName'))).fullyQualifiedDomainName, ':1433;database=', parameters('sonarDbName'), ';user=', parameters('adminLogin'), '@', parameters('sonarSqlName'), ';password={your_password_here}')]" } } -} \ No newline at end of file +} diff --git a/spark-2.0-on-suse/azuredeploy.json b/spark-2.0-on-suse/azuredeploy.json index a9841cdbc66f..d22e1e2910f9 100644 --- a/spark-2.0-on-suse/azuredeploy.json +++ b/spark-2.0-on-suse/azuredeploy.json @@ -9,18 +9,18 @@ } }, "adminPassword": { - "type": "securestring", + "type": "securestring", "metadata": { "description": "The Linux VM password" } }, - "numberOfSlaves" : { + "numberOfSlaves": { "type": "int", "metadata": { - "description": "Number Of Slaves" + "description": "Number Of Slaves" }, "defaultValue": 1, - "minValue": 1, + "minValue": 1, "maxValue": 50 }, "_artifactsLocation": { @@ -36,10 +36,17 @@ "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": { - "resourceGroupLocation": "[resourceGroup().location]", + "resourceGroupLocation": "[parameters('location')]", "vmStorageAccountContainerName": "vhd", "storageAccountName": "[concat(uniquestring(resourceGroup().id),'storageac')]", "sparkMasterMachineName": "sparkmaster", @@ -49,12 +56,12 @@ "sparkMasterPublicIpName": "sparkMasterPublicIp", "sparkNetWorkSecurityGroupName": "nsgroup", "sparkVirtualNetworkName": "sparkVirtualNetwork", - "virtualNetworkAddressPrefix" : "10.0.0.0/16", - "defaultSubnetAddressPrefix" : "10.0.0.0/24", + "virtualNetworkAddressPrefix": "10.0.0.0/16", + "defaultSubnetAddressPrefix": "10.0.0.0/24", "sparkMasterNetworkInterfaceName": "ni_master", "sparkSlaveNetworkInterfaceName": "ni_slave", "sparkMasterInternalIP": "10.0.0.4", - "ScriptFolder" : "scripts", + "ScriptFolder": "scripts", "sparkInstallScriptName": "install_spark_environment.sh" }, "resources": [ @@ -80,53 +87,53 @@ }, "storageProfile": { "imageReference": { - "publisher": "SUSE", - "offer": "SLES", - "sku": "12-SP1", - "version": "latest" - }, - "osDisk": { - "name": "[variables('sparkMasterMachineName')]", - "createOption": "FromImage", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/','osdisks', '1' ,'.vhd')]" + "publisher": "SUSE", + "offer": "SLES", + "sku": "12-SP1", + "version": "latest" }, - "caching": "ReadWrite" + "osDisk": { + "name": "[variables('sparkMasterMachineName')]", + "createOption": "FromImage", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/','osdisks', '1' ,'.vhd')]" + }, + "caching": "ReadWrite" + } + }, + "osProfile": { + "computerName": "[variables('sparkMasterMachineName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } } }, - "osProfile": { - "computerName": "[variables('sparkMasterMachineName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "linuxConfiguration": { - "disablePasswordAuthentication": false + "resources": [ + { + "type": "extensions", + "name": "[concat('configuresparkonmaster')]", + "apiVersion": "2015-06-15", + "location": "[variables('resourceGroupLocation')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('sparkMasterMachineName') )]", + "[concat('Microsoft.Network/networkInterfaces/', variables('sparkMasterNetworkInterfaceName') )]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'), '/', variables('ScriptFolder'), '/', variables('sparkInstallScriptName'), parameters('_artifactsLocationSasToken'))]" + ], + "commandToExecute": "[concat('sudo sh install_spark_environment.sh ', '-m 1', ' -i ', reference(variables('sparkMasterNetworkInterfaceName')).ipConfigurations[0].properties.privateIPAddress, ' -k ', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value, ' -a ', variables('storageAccountName'), parameters('_artifactsLocationSasToken'))]" + } + } } - } - }, - "resources": [ - { - "type": "extensions", - "name": "[concat('configuresparkonmaster')]", - "apiVersion": "2015-06-15", - "location": "[variables('resourceGroupLocation')]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('sparkMasterMachineName') )]", - "[concat('Microsoft.Network/networkInterfaces/', variables('sparkMasterNetworkInterfaceName') )]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'), '/', variables('ScriptFolder'), '/', variables('sparkInstallScriptName'), parameters('_artifactsLocationSasToken'))]" - ], - "commandToExecute": "[concat('sudo sh install_spark_environment.sh ', '-m 1', ' -i ', reference(variables('sparkMasterNetworkInterfaceName')).ipConfigurations[0].properties.privateIPAddress, ' -k ', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value, ' -a ', variables('storageAccountName'), parameters('_artifactsLocationSasToken'))]" - } - } - } - ] + ] }, { "type": "Microsoft.Compute/virtualMachines", @@ -143,29 +150,29 @@ ], "properties": { "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('sparkSlaveNetworkInterfaceName'), copyindex() ))]" - } - ] - }, - "hardwareProfile": { - "vmSize": "[variables('sparkSlavesSize')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "SUSE", - "offer": "SLES", - "sku": "12-SP1", - "version": "latest" + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('sparkSlaveNetworkInterfaceName'), copyindex() ))]" + } + ] + }, + "hardwareProfile": { + "vmSize": "[variables('sparkSlavesSize')]" }, - "osDisk": { - "name": "[concat(variables('sparkSlaveMachineName'), copyindex() )]", - "createOption": "FromImage", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/','osdisks_', 'slave', copyindex() ,'.vhd')]" + "storageProfile": { + "imageReference": { + "publisher": "SUSE", + "offer": "SLES", + "sku": "12-SP1", + "version": "latest" }, - "caching": "ReadWrite" + "osDisk": { + "name": "[concat(variables('sparkSlaveMachineName'), copyindex() )]", + "createOption": "FromImage", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/','osdisks_', 'slave', copyindex() ,'.vhd')]" + }, + "caching": "ReadWrite" } }, "osProfile": { @@ -197,11 +204,11 @@ "fileUris": [ "[concat(parameters('_artifactsLocation'), '/', variables('ScriptFolder'), '/', variables('sparkInstallScriptName'), parameters('_artifactsLocationSasToken'))]" ], - "commandToExecute": "[concat('sudo sh install_spark_environment.sh ', '-m 0', ' -i ', reference(variables('sparkMasterNetworkInterfaceName')).ipConfigurations[0].properties.privateIPAddress, ' -k ', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value, ' -a ', variables('storageAccountName') , parameters('_artifactsLocationSasToken'))]" + "commandToExecute": "[concat('sudo sh install_spark_environment.sh ', '-m 0', ' -i ', reference(variables('sparkMasterNetworkInterfaceName')).ipConfigurations[0].properties.privateIPAddress, ' -k ', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value, ' -a ', variables('storageAccountName') , parameters('_artifactsLocationSasToken'))]" + } + } } - } - } - ] + ] }, { "type": "Microsoft.Network/networkInterfaces", @@ -229,8 +236,7 @@ } } ], - "dnsSettings": { - }, + "dnsSettings": {}, "enableIPForwarding": false, "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('sparkNetWorkSecurityGroupName'))]" @@ -263,8 +269,7 @@ } } ], - "dnsSettings": { - }, + "dnsSettings": {}, "enableIPForwarding": false, "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('sparkNetWorkSecurityGroupName'))]" @@ -407,7 +412,8 @@ "type": "Microsoft.Storage/storageAccounts", "sku": { "name": "Standard_LRS", - "tier": "Standard" }, + "tier": "Standard" + }, "kind": "Storage", "name": "[variables('storageAccountName')]", "apiVersion": "2016-01-01", @@ -418,8 +424,8 @@ ], "outputs": { "masterPrivateIP": { - "type" : "string", + "type": "string", "value": "[reference(variables('sparkMasterNetworkInterfaceName')).ipConfigurations[0].properties.privateIPAddress]" } } -} \ No newline at end of file +} diff --git a/spark-and-cassandra-on-centos/azuredeploy.json b/spark-and-cassandra-on-centos/azuredeploy.json index 310ecf29f95d..d9bf80a0fed2 100644 --- a/spark-and-cassandra-on-centos/azuredeploy.json +++ b/spark-and-cassandra-on-centos/azuredeploy.json @@ -130,6 +130,13 @@ "description": "Specific an admin password that should be used to login to the VM." }, "type": "securestring" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -191,7 +198,7 @@ { "name": "[variables('storageMasterName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -208,7 +215,7 @@ }, "name": "[concat(variables('storageSlaveNamePrefix'), copyIndex())]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -221,7 +228,7 @@ { "name": "[variables('storageCassandraName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -234,7 +241,7 @@ { "name": "vnet-spark", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -271,7 +278,7 @@ { "name": "[variables('publicIPMasterName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -288,7 +295,7 @@ "count": "[parameters('vmNumberOfSlaves')]" }, "dependsOn": [], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[concat(variables('publicIPSlaveNamePrefix'), copyIndex())]", "properties": { "publicIPAllocationMethod": "Static" @@ -301,7 +308,7 @@ { "name": "[variables('publicIPCassandraName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -315,7 +322,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgSparkMasterName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -367,7 +374,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgSparkSlaveName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -391,7 +398,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgCassandraName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -414,7 +421,7 @@ { "name": "[variables('nicMasterName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', 'vnet-spark')]", @@ -452,7 +459,7 @@ }, "name": "[concat(variables('nicSlaveNamePrefix'), copyIndex())]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', 'vnet-spark')]", @@ -486,7 +493,7 @@ { "name": "[variables('nicCassandraName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', 'vnet-spark')]", @@ -520,7 +527,7 @@ { "name": "[variables('availabilitySlaveName')]", "type": "Microsoft.Compute/availabilitySets", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -534,7 +541,7 @@ { "name": "[variables('vmMasterName')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageMasterName'))]", @@ -580,7 +587,7 @@ { "name": "scriptMasterSparkProvisioner", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "[variables('apiVersion')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmMasterName'))]" @@ -610,7 +617,7 @@ }, "name": "[concat(variables('vmSlaveNamePrefix'), copyIndex())]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat(variables('storageSlaveNamePrefix'), copyIndex())]", @@ -659,7 +666,7 @@ { "name": "scriptSlaveProvisionerScript", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "[variables('apiVersion')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(variables('vmSlaveNamePrefix'), copyIndex()))]" @@ -685,7 +692,7 @@ { "name": "[variables('vmCassandraName')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageCassandraName'))]", @@ -731,7 +738,7 @@ { "name": "scriptCassandraProvisioner", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "[variables('apiVersion')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmCassandraName'))]" @@ -761,4 +768,4 @@ "value": "[concat('spark://',variables('nicMasterNodeIP'),':7077')]" } } -} \ No newline at end of file +} diff --git a/spark-on-ubuntu/azuredeploy.json b/spark-on-ubuntu/azuredeploy.json index 976212b945e8..03941ca0d403 100644 --- a/spark-on-ubuntu/azuredeploy.json +++ b/spark-on-ubuntu/azuredeploy.json @@ -116,6 +116,13 @@ "metadata": { "description": "T-shirt size of the Spark cluster" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -216,7 +223,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nic', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[variables('numberOfMasterInstances')]" @@ -243,7 +250,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nicsl', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicslLoop", "count": "[variables('numberOfSlavesInstances')]" @@ -270,7 +277,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat('mastervm', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineLoopMaster", "count": "[variables('numberOfMasterInstances')]" @@ -323,7 +330,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat('slavevm', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineLoop", "count": "[variables('numberOfSlavesInstances')]" @@ -377,7 +384,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('mastervm', copyindex(), '/installsparkmaster')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineExtensionsLoopMaster", "count": "[variables('numberOfMasterInstances')]" @@ -403,7 +410,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat('slavevm', copyindex(), '/installsparkslave')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "virtualMachineExtensionsLoopSlave", "count": "[variables('numberOfSlavesInstances')]" diff --git a/spark-on-ubuntu/jumpbox-resources-disabled.json b/spark-on-ubuntu/jumpbox-resources-disabled.json index 8b94b6e9f045..fef10a0e7d63 100644 --- a/spark-on-ubuntu/jumpbox-resources-disabled.json +++ b/spark-on-ubuntu/jumpbox-resources-disabled.json @@ -61,6 +61,13 @@ "metadata": { "Description": "The global VM name prefix" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, diff --git a/spark-on-ubuntu/jumpbox-resources-enabled.json b/spark-on-ubuntu/jumpbox-resources-enabled.json index 58739c80b2ec..738afb6de3bf 100644 --- a/spark-on-ubuntu/jumpbox-resources-enabled.json +++ b/spark-on-ubuntu/jumpbox-resources-enabled.json @@ -61,12 +61,17 @@ "metadata": { "Description": "The global VM name prefix" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "vmStorageAccountContainerName": "vhd", - "vmSourceImageName": "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_2_LTS-amd64-server-20150309-en-us-30GB", - "sourceImageName": "[concat('/',subscription().subscriptionId,'/services/images/',variables('vmSourceImageName'))]", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',parameters('subnetName'))]", "vmSize": "Standard_A0" @@ -76,7 +81,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "publicIP", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -85,7 +90,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "nicJumpbox", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', 'publicIP')]" ], @@ -110,7 +115,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "jumpbox", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', 'nicJumpbox')]" ], diff --git a/spark-on-ubuntu/shared-resources.json b/spark-on-ubuntu/shared-resources.json index c8b2bc67354f..6cf5681cafc1 100644 --- a/spark-on-ubuntu/shared-resources.json +++ b/spark-on-ubuntu/shared-resources.json @@ -36,6 +36,13 @@ "metadata": { "Description": "Address space for the virtual network subnet" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -47,7 +54,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -56,7 +63,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/availabilitySets", "name": "sparkCluserAS", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": "[variables('platformFaultDomainCount')]", "platformUpdateDomainCount": "[variables('platformUpdateDomainCount')]" @@ -66,7 +73,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ diff --git a/spark-ubuntu-multidisks/azuredeploy.json b/spark-ubuntu-multidisks/azuredeploy.json index b4172e4d4e06..683e1be7962e 100644 --- a/spark-ubuntu-multidisks/azuredeploy.json +++ b/spark-ubuntu-multidisks/azuredeploy.json @@ -63,6 +63,13 @@ "metadata": { "description": "Virtual network name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { diff --git a/spark-ubuntu-multidisks/datastore-16disk-resources.json b/spark-ubuntu-multidisks/datastore-16disk-resources.json index 4b22c22a0a55..2b06683401d3 100644 --- a/spark-ubuntu-multidisks/datastore-16disk-resources.json +++ b/spark-ubuntu-multidisks/datastore-16disk-resources.json @@ -28,12 +28,18 @@ }, "nodeType": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "namespace": "[parameters('commonSettings').namespace]", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(parameters('storageSettings').name, variables('namespace'))]", "vmName": "[concat(variables('namespace'), 'vm')]", "nicName": "[concat(variables('namespace'), 'nic')]", "adminUsername": "[parameters('commonSettings').adminUsername]", @@ -45,7 +51,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicCopyLoop", "count": "[variables('vmCount')]" @@ -68,7 +74,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyindex())]" ], @@ -274,7 +280,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyindex(), '/install_spark')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), copyindex())]" ], diff --git a/spark-ubuntu-multidisks/datastore-2disk-resources.json b/spark-ubuntu-multidisks/datastore-2disk-resources.json index 9883f1fbbcf9..64a34e5aac61 100644 --- a/spark-ubuntu-multidisks/datastore-2disk-resources.json +++ b/spark-ubuntu-multidisks/datastore-2disk-resources.json @@ -28,12 +28,18 @@ }, "nodeType": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "namespace": "[parameters('commonSettings').namespace]", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(parameters('storageSettings').name, variables('namespace'))]", "vmName": "[concat(variables('namespace'), 'vm')]", "nicName": "[concat(variables('namespace'), 'nic')]", "adminUsername": "[parameters('commonSettings').adminUsername]", @@ -45,7 +51,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicCopyLoop", "count": "[variables('vmCount')]" @@ -68,7 +74,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyindex())]" ], @@ -134,7 +140,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyindex(), '/install_spark')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), copyindex())]" ], diff --git a/spark-ubuntu-multidisks/datastore-8disk-resources.json b/spark-ubuntu-multidisks/datastore-8disk-resources.json index e2eb01476297..6c2fa33c471c 100644 --- a/spark-ubuntu-multidisks/datastore-8disk-resources.json +++ b/spark-ubuntu-multidisks/datastore-8disk-resources.json @@ -28,12 +28,18 @@ }, "nodeType": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "namespace": "[parameters('commonSettings').namespace]", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "storageAccountName": "[concat(parameters('storageSettings').name, variables('namespace'))]", "vmName": "[concat(variables('namespace'), 'vm')]", "nicName": "[concat(variables('namespace'), 'nic')]", "adminUsername": "[parameters('commonSettings').adminUsername]", @@ -45,7 +51,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicCopyLoop", "count": "[variables('vmCount')]" @@ -68,7 +74,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('vmName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyindex())]" ], @@ -193,8 +199,8 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), copyindex(), '/install_spark')]", - "apiVersion ":"2015-05-01-preview", - "location": "[resourceGroup().location]", + "apiVersion ": "2015-05-01-preview", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), copyindex())]" ], diff --git a/spark-ubuntu-multidisks/empty-resources.json b/spark-ubuntu-multidisks/empty-resources.json index a14948015a5b..4fb1278b07e1 100644 --- a/spark-ubuntu-multidisks/empty-resources.json +++ b/spark-ubuntu-multidisks/empty-resources.json @@ -19,6 +19,13 @@ }, "dnsName": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, diff --git a/spark-ubuntu-multidisks/jumpbox-resources.json b/spark-ubuntu-multidisks/jumpbox-resources.json index e1b2a6d13f20..2171508a3f62 100644 --- a/spark-ubuntu-multidisks/jumpbox-resources.json +++ b/spark-ubuntu-multidisks/jumpbox-resources.json @@ -19,10 +19,16 @@ }, "dnsName": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "vmStorageAccountContainerName": "vhd", "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", "storageAccountName": "[parameters('storageSettings').name]", "nicName": "[concat(parameters('commonSettings').namespace, 'nic')]", @@ -35,7 +41,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -47,7 +53,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIpName'))]" ], @@ -72,7 +78,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], diff --git a/spark-ubuntu-multidisks/shared-resources.json b/spark-ubuntu-multidisks/shared-resources.json index ceb0a51e9466..aa21708f8a9c 100644 --- a/spark-ubuntu-multidisks/shared-resources.json +++ b/spark-ubuntu-multidisks/shared-resources.json @@ -10,6 +10,13 @@ }, "networkSettings": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": {}, @@ -18,7 +25,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[concat(parameters('storageSettings').name, copyindex())]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "dbStoragePoolLoop", "count": "[parameters('storageSettings').count]" @@ -31,7 +38,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').vnetName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -58,7 +65,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('availabilitySetSettings').name]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": "[parameters('availabilitySetSettings').fdCount]", "platformUpdateDomainCount": "[parameters('availabilitySetSettings').udCount]" diff --git a/splunk-on-ubuntu/azuredeploy-gov.json b/splunk-on-ubuntu/azuredeploy-gov.json index f2480a7ef9fc..00369ca25488 100644 --- a/splunk-on-ubuntu/azuredeploy-gov.json +++ b/splunk-on-ubuntu/azuredeploy-gov.json @@ -4,11 +4,7 @@ "parameters": { "location": { "type": "string", - "defaultValue": "usgovvirginia", - "allowedValues": [ - "usgovvirginia", - "usgoviowa" - ], + "defaultValue": "[resourceGroup().location]", "metadata": { "description": "Location where resources will be provisioned" } @@ -519,4 +515,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/splunk-on-ubuntu/azuredeploy.json b/splunk-on-ubuntu/azuredeploy.json index 2186710e7e5b..a8a6c9e4f364 100644 --- a/splunk-on-ubuntu/azuredeploy.json +++ b/splunk-on-ubuntu/azuredeploy.json @@ -6,7 +6,8 @@ "type": "string", "metadata": { "description": "Location where resources will be provisioned" - } + }, + "defaultValue": "[resourceGroup().location]" }, "storageAccountType": { "type": "string", @@ -691,4 +692,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/splunk-on-ubuntu/nested/clustermaster-resources.json b/splunk-on-ubuntu/nested/clustermaster-resources.json index 897135b82aba..deb8740e393d 100644 --- a/splunk-on-ubuntu/nested/clustermaster-resources.json +++ b/splunk-on-ubuntu/nested/clustermaster-resources.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "storageSettings": { "type": "object" @@ -40,8 +41,6 @@ } }, "variables": { - "templateAPIVersion": "2015-01-01", - "resourceAPIVersion": "2015-06-15", "splunkServerRole": "splunk_cluster_master", "securityGroupName": "[concat(parameters('namespace'), '-nsg')]", "splunkTemplateUrl": "[concat(parameters('templateBaseUrl'), 'splunk-2disk-resources.json')]" @@ -174,4 +173,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/splunk-on-ubuntu/nested/clusterpeers-resources.json b/splunk-on-ubuntu/nested/clusterpeers-resources.json index cd700dcb8060..57d9a682dd09 100644 --- a/splunk-on-ubuntu/nested/clusterpeers-resources.json +++ b/splunk-on-ubuntu/nested/clusterpeers-resources.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "storageSettings": { "type": "object" @@ -40,8 +41,6 @@ } }, "variables": { - "templateAPIVersion": "2015-01-01", - "resourceAPIVersion": "2015-06-15", "splunkServerRole": "splunk_cluster_peer", "securityGroupName": "[concat(parameters('namespace'), '-nsg')]", "splunkTemplateUrl": "[concat(parameters('templateBaseUrl'), 'splunk-8disk-resources-loop.json')]" @@ -216,4 +215,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/splunk-on-ubuntu/nested/clustersearchhead-resources.json b/splunk-on-ubuntu/nested/clustersearchhead-resources.json index cffab6d0c769..d76a774e6de3 100644 --- a/splunk-on-ubuntu/nested/clustersearchhead-resources.json +++ b/splunk-on-ubuntu/nested/clustersearchhead-resources.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "storageSettings": { "type": "object" @@ -40,8 +41,6 @@ } }, "variables": { - "templateAPIVersion": "2015-01-01", - "resourceAPIVersion": "2015-06-15", "splunkServerRole": "splunk_cluster_search_head", "securityGroupName": "[concat(parameters('namespace'), '-nsg')]", "splunkTemplateUrl": "[concat(parameters('templateBaseUrl'), 'splunk-2disk-resources.json')]" @@ -174,4 +173,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/splunk-on-ubuntu/nested/empty-resources.json b/splunk-on-ubuntu/nested/empty-resources.json index 043620414aeb..32c8f5753552 100644 --- a/splunk-on-ubuntu/nested/empty-resources.json +++ b/splunk-on-ubuntu/nested/empty-resources.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "storageSettings": { "type": "object" diff --git a/splunk-on-ubuntu/nested/shared-resources.json b/splunk-on-ubuntu/nested/shared-resources.json index 7a2b1cfd5835..f49c11a98818 100644 --- a/splunk-on-ubuntu/nested/shared-resources.json +++ b/splunk-on-ubuntu/nested/shared-resources.json @@ -6,7 +6,8 @@ "type": "string", "metadata": { "description": "Location where resources will be provisioned" - } + }, + "defaultValue": "[resourceGroup().location]" }, "availabilitySetSettings": { "type": "object", @@ -30,10 +31,7 @@ "type": "string" } }, - "variables": { - "templateAPIVersion": "2015-01-01", - "resourceAPIVersion": "2015-06-15" - }, + "variables": {}, "resources": [ { "apiVersion": "2015-06-15", @@ -88,4 +86,4 @@ } } ] -} \ No newline at end of file +} diff --git a/splunk-on-ubuntu/nested/splunk-2disk-resources-loop.json b/splunk-on-ubuntu/nested/splunk-2disk-resources-loop.json index 175818708f3c..89e294769f59 100644 --- a/splunk-on-ubuntu/nested/splunk-2disk-resources-loop.json +++ b/splunk-on-ubuntu/nested/splunk-2disk-resources-loop.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "storageSettings": { "type": "object" @@ -45,8 +46,6 @@ } }, "variables": { - "templateAPIVersion": "2015-01-01", - "resourceAPIVersion": "2015-06-15", "singleQuote": "'", "vmCount": "[parameters('machineSettings').vmCount]", "vmName": "[concat(parameters('namespace'), '-vm')]", @@ -197,4 +196,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/splunk-on-ubuntu/nested/splunk-2disk-resources.json b/splunk-on-ubuntu/nested/splunk-2disk-resources.json index 23d5c3ad4bd8..da7d670730a1 100644 --- a/splunk-on-ubuntu/nested/splunk-2disk-resources.json +++ b/splunk-on-ubuntu/nested/splunk-2disk-resources.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "storageSettings": { "type": "object" @@ -45,8 +46,6 @@ } }, "variables": { - "templateAPIVersion": "2015-01-01", - "resourceAPIVersion": "2015-06-15", "singleQuote": "'", "vmName": "[concat(parameters('namespace'), '-vm')]", "nicName": "[concat(parameters('namespace'), '-nic')]", @@ -193,4 +192,4 @@ "value": "[reference(variables('storageReferenceName'), variables('storageApiVersion')).primaryEndpoints.blob]" } } -} \ No newline at end of file +} diff --git a/splunk-on-ubuntu/nested/splunk-8disk-resources-loop.json b/splunk-on-ubuntu/nested/splunk-8disk-resources-loop.json index 922fda76ebce..e852844bb2c0 100644 --- a/splunk-on-ubuntu/nested/splunk-8disk-resources-loop.json +++ b/splunk-on-ubuntu/nested/splunk-8disk-resources-loop.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "storageSettings": { "type": "object" @@ -45,8 +46,6 @@ } }, "variables": { - "templateAPIVersion": "2015-01-01", - "resourceAPIVersion": "2015-06-15", "singleQuote": "'", "vmCount": "[parameters('machineSettings').vmCount]", "vmName": "[concat(parameters('namespace'), '-vm')]", @@ -256,4 +255,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/splunk-on-ubuntu/nested/splunk-8disk-resources.json b/splunk-on-ubuntu/nested/splunk-8disk-resources.json index 1ead6de9c973..d8923eb28b22 100644 --- a/splunk-on-ubuntu/nested/splunk-8disk-resources.json +++ b/splunk-on-ubuntu/nested/splunk-8disk-resources.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "storageSettings": { "type": "object" @@ -45,8 +46,6 @@ } }, "variables": { - "templateAPIVersion": "2015-01-01", - "resourceAPIVersion": "2015-06-15", "singleQuote": "'", "vmName": "[concat(parameters('namespace'), '-vm')]", "nicName": "[concat(parameters('namespace'), '-nic')]", @@ -253,4 +252,4 @@ "value": "[reference(variables('storageReferenceName'), variables('storageApiVersion')).primaryEndpoints.blob]" } } -} \ No newline at end of file +} diff --git a/splunk-on-ubuntu/nested/standalone-instance-resources.json b/splunk-on-ubuntu/nested/standalone-instance-resources.json index 5d446c4d2618..30eec4be0d89 100644 --- a/splunk-on-ubuntu/nested/standalone-instance-resources.json +++ b/splunk-on-ubuntu/nested/standalone-instance-resources.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "storageSettings": { "type": "object" @@ -37,8 +38,6 @@ } }, "variables": { - "templateAPIVersion": "2015-01-01", - "resourceAPIVersion": "2015-06-15", "splunkServerRole": "splunk_server", "securityGroupName": "[concat(parameters('namespace'), '-nsg')]", "splunkTemplateUrl": "[concat(parameters('templateBaseUrl'), 'splunk-8disk-resources.json')]" @@ -196,4 +195,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/splunk-on-ubuntu/nested/vnet-existing.json b/splunk-on-ubuntu/nested/vnet-existing.json index f221ef8830fc..671d232fe0ed 100644 --- a/splunk-on-ubuntu/nested/vnet-existing.json +++ b/splunk-on-ubuntu/nested/vnet-existing.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "networkSettings": { "type": "object", @@ -15,14 +16,14 @@ "type": "string" } }, - "variables" : { + "variables": { "virtualNetworkName": "[parameters('networkSettings').virtualNetworkName]", "virtualNetworkExistingRGName": "[parameters('networkSettings').virtualNetworkExistingRGName]", "virtualNetworkId": "[resourceId(variables('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnet1Name": "[parameters('networkSettings').subnet.sh.name]", "subnet2Name": "[parameters('networkSettings').subnet.idx.name]", - "subnet1Ref" : "[concat(variables('virtualNetworkId'),'/subnets/',variables('subnet1Name'))]", - "subnet2Ref" : "[concat(variables('virtualNetworkId'),'/subnets/',variables('subnet2Name'))]" + "subnet1Ref": "[concat(variables('virtualNetworkId'),'/subnets/',variables('subnet1Name'))]", + "subnet2Ref": "[concat(variables('virtualNetworkId'),'/subnets/',variables('subnet2Name'))]" }, "resources": [], "outputs": { diff --git a/splunk-on-ubuntu/nested/vnet-new.json b/splunk-on-ubuntu/nested/vnet-new.json index 7a99480020a2..bb9214d419a0 100644 --- a/splunk-on-ubuntu/nested/vnet-new.json +++ b/splunk-on-ubuntu/nested/vnet-new.json @@ -3,7 +3,8 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string" + "type": "string", + "defaultValue": "[resourceGroup().location]" }, "networkSettings": { "type": "object", @@ -16,8 +17,6 @@ } }, "variables": { - "templateAPIVersion": "2015-01-01", - "resourceAPIVersion": "2015-06-15", "virtualNetworkName": "[parameters('networkSettings').virtualNetworkName]", "virtualNetworkAddressPrefix": "[parameters('networkSettings').virtualNetworkAddressPrefix]", "virtualNetworkId": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", @@ -70,4 +69,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/sql-alwayson-md-mult-subnets-zones/azuredeploy.json b/sql-alwayson-md-mult-subnets-zones/azuredeploy.json index d3655743f79a..170c4ef8c0de 100644 --- a/sql-alwayson-md-mult-subnets-zones/azuredeploy.json +++ b/sql-alwayson-md-mult-subnets-zones/azuredeploy.json @@ -3,16 +3,16 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string", - "allowedValues": [ - "CentralUS", - "FranceCentral", - "WestEurope" - ], - "defaultValue": "CentralUS", - "metadata": { - "description": "Location for the VM, only certain regions support Availability Zones" - } + "type": "string", + "allowedValues": [ + "CentralUS", + "FranceCentral", + "WestEurope" + ], + "defaultValue": "CentralUS", + "metadata": { + "description": "Location for the VM, only certain regions support Availability Zones" + } }, "namePrefix": { "type": "string", @@ -102,7 +102,11 @@ }, "existingSubnetNames": { "type": "array", - "defaultValue": ["sqlSubnet1","sqlSubnet2","sqlSubnet3"], + "defaultValue": [ + "sqlSubnet1", + "sqlSubnet2", + "sqlSubnet3" + ], "metadata": { "description": "Name of the existing subnets in the existing VNET to which the SQL Server VMs should be deployed" } diff --git a/sql-alwayson-md-mult-subnets-zones/nestedtemplates/deploy-sql-cluster.json b/sql-alwayson-md-mult-subnets-zones/nestedtemplates/deploy-sql-cluster.json index 9eace1e892b9..49dd1a77ecdb 100644 --- a/sql-alwayson-md-mult-subnets-zones/nestedtemplates/deploy-sql-cluster.json +++ b/sql-alwayson-md-mult-subnets-zones/nestedtemplates/deploy-sql-cluster.json @@ -1,450 +1,454 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "location": { - "type": "string", - "metadata": { - "description": "Location for the VM, only certain regions support zones during preview." - } - }, - "namePrefix": { - "type": "string", - "minLength": 3, - "maxLength": 8, - "metadata": { - "description": "Naming prefix for each new resource created. 3-char min, 8-char max, lowercase alphanumeric" - } - }, - "domainName": { - "type": "string", - "metadata": { - "description": "DNS domain name for existing Active Directory domain" - } - }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "Name of the Administrator of the existing Active Directory Domain" - } - }, - "adminPassword": { - "type": "securestring", - "minLength": 12, - "metadata": { - "description": "Password for the Administrator account of the existing Active Directory Domain" - } - }, - "sqlServiceAccount": { - "type": "string", - "metadata": { - "description": "Name of the user account to be used for the SQL Server service account" - } - }, - "sqlServicePassword": { - "type": "securestring", - "minLength": 12, - "metadata": { - "description": "Password to be used for the SQL Server service account" - } - }, - "nicVnetUri": { - "type": "string", - "metadata": { - "description": "Resource ID for existing vnet/subnet to which VM NICs should be attached" - } - }, - "existingSubnetNames": { - "type": "array", - "metadata": { - "description": "Name of the existing subnets in the existing VNET to which the SQL Server VMs should be deployed" - } - }, - "vmSize": { - "type": "string", - "metadata": { - "description": "Size of the SQL Server VMs to be created" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Location for the VM, only certain regions support zones during preview." + } + }, + "namePrefix": { + "type": "string", + "minLength": 3, + "maxLength": 8, + "metadata": { + "description": "Naming prefix for each new resource created. 3-char min, 8-char max, lowercase alphanumeric" + } + }, + "domainName": { + "type": "string", + "metadata": { + "description": "DNS domain name for existing Active Directory domain" + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "Name of the Administrator of the existing Active Directory Domain" + } + }, + "adminPassword": { + "type": "securestring", + "minLength": 12, + "metadata": { + "description": "Password for the Administrator account of the existing Active Directory Domain" + } + }, + "sqlServiceAccount": { + "type": "string", + "metadata": { + "description": "Name of the user account to be used for the SQL Server service account" + } + }, + "sqlServicePassword": { + "type": "securestring", + "minLength": 12, + "metadata": { + "description": "Password to be used for the SQL Server service account" + } + }, + "nicVnetUri": { + "type": "string", + "metadata": { + "description": "Resource ID for existing vnet/subnet to which VM NICs should be attached" + } + }, + "existingSubnetNames": { + "type": "array", + "metadata": { + "description": "Name of the existing subnets in the existing VNET to which the SQL Server VMs should be deployed" + } + }, + "vmSize": { + "type": "string", + "metadata": { + "description": "Size of the SQL Server VMs to be created" + } + }, + "vmCount": { + "type": "int", + "minValue": 2, + "maxValue": 9, + "metadata": { + "description": "Number of SQL Server VMs to be created in AlwaysOn Availability Group cluster (Min=2, Max=9)" + }, + "defaultValue": 2 + }, + "vmDiskSize": { + "type": "int", + "minValue": 128, + "maxValue": 1023, + "metadata": { + "description": "Size of each data disk in GB on each SQL Server VM (Min=128, Max=1023)" + } + }, + "vmDiskCount": { + "type": "int", + "minValue": 2, + "maxValue": 32, + "metadata": { + "description": "Number of data disks on each SQL Server VM (Min=2, Max=32). Ensure that the VM size you've selected will support this number of data disks." + } + }, + "workloadType": { + "type": "string", + "defaultValue": "GENERAL" + }, + "imagePublisher": { + "type": "string", + "defaultValue": "MicrosoftSQLServer" + }, + "imageOffer": { + "type": "string", + "defaultValue": "SQL2016SP1-WS2016" + }, + "imageSKU": { + "type": "string", + "defaultValue": "Enterprise" + }, + "imageVersion": { + "type": "string", + "defaultValue": "latest" + }, + "_artifactsLocation": { + "type": "string" + }, + "_artifactsLocationSasToken": { + "type": "securestring" + } + }, + "variables": { + "apiVersionStorage": "2016-01-01", + "witnessStorageName": "[concat(parameters('namePrefix'),uniqueString(resourceGroup().id),'cw')]", + "witnessStorageType": "Standard_LRS", + "vmNamePrefix": "[concat(parameters('namePrefix'),'-sql-')]", + "clusterName": "[concat(variables('vmNamePrefix'),'c')]", + "vmLoopTemplateURL": "[concat(parameters('_artifactsLocation'),'/nestedtemplates/newVM.json',parameters('_artifactsLocationSasToken'))]", + "ipLoopTemplateURL": "[concat(parameters('_artifactsLocation'),'/nestedtemplates/getIpAddress.json',parameters('_artifactsLocationSasToken'))]", + "sqlPrepModulesURL": "[concat(parameters('_artifactsLocation'),'/dsc/prep-sqlao.ps1.zip',parameters('_artifactsLocationSasToken'))]", + "sqlPrepFunction": "PrepSQLAO.ps1\\PrepSQLAO", + "sqlConfigModulesURL": "[concat(parameters('_artifactsLocation'),'/dsc/config-sqlao.ps1.zip',parameters('_artifactsLocationSasToken'))]", + "sqlConfigFunction": "ConfigSQLAO.ps1\\ConfigSQLAO", + "agName": "[concat(variables('vmNamePrefix'),'ag')]", + "agListenerName": "[concat(variables('vmNamePrefix'),'agl')]", + "agEpName": "[concat(variables('vmNamePrefix'),'ha')]", + "zones": [ + "1", + "2", + "3" + ] + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('witnessStorageName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "sku": { + "name": "[variables('witnessStorageType')]" + }, + "kind": "Storage" + }, + { + "name": "[concat(variables('vmNamePrefix'), copyindex(), '-nic')]", + "type": "Microsoft.Network/networkInterfaces", + "location": "[parameters('location')]", + "apiVersion": "2017-08-01", + "copy": { + "name": "nicLoop", + "count": "[parameters('vmCount')]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[concat(parameters('nicVnetUri'),'/subnets/',parameters('existingSubnetNames')[mod(copyIndex(),length(variables('zones')))])]" + }, + "primary": true } - }, - "vmCount": { - "type": "int", - "minValue": 2, - "maxValue": 9, - "metadata": { - "description": "Number of SQL Server VMs to be created in AlwaysOn Availability Group cluster (Min=2, Max=9)" - }, - "defaultValue": 2 - }, - "vmDiskSize": { - "type": "int", - "minValue": 128, - "maxValue": 1023, - "metadata": { - "description": "Size of each data disk in GB on each SQL Server VM (Min=128, Max=1023)" + }, + { + "name": "ipconfig2", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[concat(parameters('nicVnetUri'),'/subnets/',parameters('existingSubnetNames')[mod(copyIndex(),length(variables('zones')))])]" + } } - }, - "vmDiskCount": { - "type": "int", - "minValue": 2, - "maxValue": 32, - "metadata": { - "description": "Number of data disks on each SQL Server VM (Min=2, Max=32). Ensure that the VM size you've selected will support this number of data disks." + }, + { + "name": "ipconfig3", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[concat(parameters('nicVnetUri'),'/subnets/',parameters('existingSubnetNames')[mod(copyIndex(),length(variables('zones')))])]" + } } + } + ] + } + }, + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "name": "[concat(variables('vmNamePrefix'),'0-clusterIp')]", + "dependsOn": [ + "nicLoop" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('ipLoopTemplateURL')]" }, - "workloadType": { - "type": "string", - "defaultValue": "GENERAL" - }, - "imagePublisher": { - "type": "string", - "defaultValue": "MicrosoftSQLServer" - }, - "imageOffer": { - "type": "string", - "defaultValue": "SQL2016SP1-WS2016" - }, - "imageSKU": { - "type": "string", - "defaultValue": "Enterprise" - }, - "imageVersion": { - "type": "string", - "defaultValue": "latest" - }, - "_artifactsLocation": { - "type": "string" - }, - "_artifactsLocationSasToken": { - "type": "securestring" + "parameters": { + "ipConfig": { + "value": "[reference(concat(variables('vmNamePrefix'), '0-nic')).ipConfigurations[1].properties.privateIPAddress]" + } } + } }, - "variables": { - "apiVersionStorage": "2016-01-01", - "witnessStorageName": "[concat(parameters('namePrefix'),uniqueString(resourceGroup().id),'cw')]", - "witnessStorageType": "Standard_LRS", - "vmNamePrefix": "[concat(parameters('namePrefix'),'-sql-')]", - "clusterName": "[concat(variables('vmNamePrefix'),'c')]", - "vmLoopTemplateURL": "[concat(parameters('_artifactsLocation'),'/nestedtemplates/newVM.json',parameters('_artifactsLocationSasToken'))]", - "ipLoopTemplateURL": "[concat(parameters('_artifactsLocation'),'/nestedtemplates/getIpAddress.json',parameters('_artifactsLocationSasToken'))]", - "sqlPrepModulesURL": "[concat(parameters('_artifactsLocation'),'/dsc/prep-sqlao.ps1.zip',parameters('_artifactsLocationSasToken'))]", - "sqlPrepFunction": "PrepSQLAO.ps1\\PrepSQLAO", - "sqlConfigModulesURL": "[concat(parameters('_artifactsLocation'),'/dsc/config-sqlao.ps1.zip',parameters('_artifactsLocationSasToken'))]", - "sqlConfigFunction": "ConfigSQLAO.ps1\\ConfigSQLAO", - "agName": "[concat(variables('vmNamePrefix'),'ag')]", - "agListenerName": "[concat(variables('vmNamePrefix'),'agl')]", - "agEpName": "[concat(variables('vmNamePrefix'),'ha')]", - "zones": ["1","2","3"] + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "copy": { + "name": "clusterIpLoop", + "count": "[sub(parameters('vmCount'),1)]" + }, + "name": "[concat(variables('vmNamePrefix'),copyIndex(1),'-clusterIp')]", + "dependsOn": [ + "nicLoop", + "[concat(variables('vmNamePrefix'),'0-clusterIp')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('ipLoopTemplateURL')]" + }, + "parameters": { + "ipConfig": { + "value": "[reference(concat(variables('vmNamePrefix'), copyIndex(1), '-nic')).ipConfigurations[1].properties.privateIPAddress]" + }, + "ipAddresses": { + "value": "[reference(concat(variables('vmNamePrefix'),copyIndex(),'-clusterIp')).outputs.result.value]" + } + } + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('witnessStorageName')]", - "apiVersion": "2016-01-01", - "location": "[parameters('location')]", - "sku": { - "name": "[variables('witnessStorageType')]" - }, - "kind": "Storage" + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "name": "[concat(variables('vmNamePrefix'),'0-agListenerIp')]", + "dependsOn": [ + "nicLoop" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('ipLoopTemplateURL')]" }, - { - "name": "[concat(variables('vmNamePrefix'), copyindex(), '-nic')]", - "type": "Microsoft.Network/networkInterfaces", - "location": "[parameters('location')]", - "apiVersion": "2017-08-01", - "copy": { - "name": "nicLoop", - "count": "[parameters('vmCount')]" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[concat(parameters('nicVnetUri'),'/subnets/',parameters('existingSubnetNames')[mod(copyIndex(),length(variables('zones')))])]" - }, - "primary": true - } - }, - { - "name": "ipconfig2", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[concat(parameters('nicVnetUri'),'/subnets/',parameters('existingSubnetNames')[mod(copyIndex(),length(variables('zones')))])]" - } - } - }, - { - "name": "ipconfig3", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[concat(parameters('nicVnetUri'),'/subnets/',parameters('existingSubnetNames')[mod(copyIndex(),length(variables('zones')))])]" - } - } - } - ] - } + "parameters": { + "ipConfig": { + "value": "[reference(concat(variables('vmNamePrefix'), '0-nic')).ipConfigurations[2].properties.privateIPAddress]" + } + } + } + }, + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "copy": { + "name": "agListenerIpLoop", + "count": "[sub(parameters('vmCount'),1)]" + }, + "name": "[concat(variables('vmNamePrefix'),copyIndex(1),'-agListenerIp')]", + "dependsOn": [ + "nicLoop", + "[concat(variables('vmNamePrefix'),'0-agListenerIp')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('ipLoopTemplateURL')]" }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "name": "[concat(variables('vmNamePrefix'),'0-clusterIp')]", - "dependsOn": [ - "nicLoop" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('ipLoopTemplateURL')]" - }, - "parameters": { - "ipConfig": { - "value": "[reference(concat(variables('vmNamePrefix'), '0-nic')).ipConfigurations[1].properties.privateIPAddress]" - } - } - } + "parameters": { + "ipConfig": { + "value": "[reference(concat(variables('vmNamePrefix'), copyIndex(1), '-nic')).ipConfigurations[2].properties.privateIPAddress]" + }, + "ipAddresses": { + "value": "[reference(concat(variables('vmNamePrefix'),copyIndex(),'-agListenerIp')).outputs.result.value]" + } + } + } + }, + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "copy": { + "name": "virtualMachineLoop", + "count": "[parameters('vmCount')]" + }, + "name": "[concat(variables('vmNamePrefix'),copyindex(),'-newVM')]", + "dependsOn": [ + "nicLoop" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('vmLoopTemplateURL')]" }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "copy": { - "name": "clusterIpLoop", - "count": "[sub(parameters('vmCount'),1)]" + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "vmName": { + "value": "[concat(variables('vmNamePrefix'), copyindex())]" + }, + "vmSize": { + "value": "[parameters('vmSize')]" + }, + "vmDiskCount": { + "value": "[parameters('vmDiskCount')]" + }, + "vmDiskSize": { + "value": "[parameters('vmDiskSize')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "_artifactsLocation": { + "value": "[parameters('_artifactsLocation')]" + }, + "_artifactsLocationSasToken": { + "value": "[parameters('_artifactsLocationSasToken')]" + }, + "imagePublisher": { + "value": "[parameters('imagePublisher')]" + }, + "imageOffer": { + "value": "[parameters('imageOffer')]" + }, + "imageSKU": { + "value": "[parameters('imageSKU')]" + }, + "imageVersion": { + "value": "[parameters('imageVersion')]" + }, + "zones": { + "value": "[take(skip(variables('zones'),mod(copyIndex(),length(variables('zones')))),1)]" + } + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmNamePrefix'),copyindex(1),'/sqlPrep')]", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "virtualMachineLoop" + ], + "copy": { + "name": "virtualMachineExtensionLoop", + "count": "[sub(parameters('vmCount'),1)]" + }, + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.71", + "autoUpgradeMinorVersion": true, + "settings": { + "modulesUrl": "[variables('sqlPrepModulesURL')]", + "configurationFunction": "[variables('sqlPrepFunction')]", + "properties": { + "domainName": "[parameters('domainName')]", + "adminCreds": { + "userName": "[parameters('adminUserName')]", + "password": "PrivateSettingsRef:adminPassword" }, - "name": "[concat(variables('vmNamePrefix'),copyIndex(1),'-clusterIp')]", - "dependsOn": [ - "nicLoop", - "[concat(variables('vmNamePrefix'),'0-clusterIp')]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('ipLoopTemplateURL')]" - }, - "parameters": { - "ipConfig": { - "value": "[reference(concat(variables('vmNamePrefix'), copyIndex(1), '-nic')).ipConfigurations[1].properties.privateIPAddress]" - }, - "ipAddresses": { - "value": "[reference(concat(variables('vmNamePrefix'),copyIndex(),'-clusterIp')).outputs.result.value]" - } - } - } - }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "name": "[concat(variables('vmNamePrefix'),'0-agListenerIp')]", - "dependsOn": [ - "nicLoop" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('ipLoopTemplateURL')]" - }, - "parameters": { - "ipConfig": { - "value": "[reference(concat(variables('vmNamePrefix'), '0-nic')).ipConfigurations[2].properties.privateIPAddress]" - } - } - } - }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "copy": { - "name": "agListenerIpLoop", - "count": "[sub(parameters('vmCount'),1)]" + "sqlServiceCreds": { + "userName": "[parameters('sqlServiceAccount')]", + "password": "PrivateSettingsRef:sqlServicePassword" }, - "name": "[concat(variables('vmNamePrefix'),copyIndex(1),'-agListenerIp')]", - "dependsOn": [ - "nicLoop", - "[concat(variables('vmNamePrefix'),'0-agListenerIp')]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('ipLoopTemplateURL')]" - }, - "parameters": { - "ipConfig": { - "value": "[reference(concat(variables('vmNamePrefix'), copyIndex(1), '-nic')).ipConfigurations[2].properties.privateIPAddress]" - }, - "ipAddresses": { - "value": "[reference(concat(variables('vmNamePrefix'),copyIndex(),'-agListenerIp')).outputs.result.value]" - } - } - } + "numberOfDisks": "[parameters('vmDiskCount')]", + "workloadType": "[parameters('workloadType')]" + } }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "copy": { - "name": "virtualMachineLoop", - "count": "[parameters('vmCount')]" + "protectedSettings": { + "items": { + "adminPassword": "[parameters('adminPassword')]", + "sqlServicePassword": "[parameters('sqlServicePassword')]" + } + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('vmNamePrefix'),'0/sqlConfig')]", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "virtualMachineLoop", + "virtualMachineExtensionLoop", + "clusterIpLoop", + "agListenerIpLoop", + "[resourceId('Microsoft.Storage/storageAccounts', variables('witnessStorageName'))]" + ], + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.71", + "autoUpgradeMinorVersion": true, + "settings": { + "modulesUrl": "[variables('sqlConfigModulesURL')]", + "configurationFunction": "[variables('sqlConfigFunction')]", + "properties": { + "domainName": "[parameters('domainName')]", + "clusterName": "[variables('clusterName')]", + "vmNamePrefix": "[variables('vmNamePrefix')]", + "sqlAlwaysOnAvailabilityGroupName": "[variables('agName')]", + "sqlAlwaysOnAvailabilityGroupListenerName": "[variables('agListenerName')]", + "sqlAlwaysOnEndpointName": "[variables('agEpName')]", + "vmCount": "[parameters('vmCount')]", + "clusterIpAddresses": "[reference(concat(variables('vmNamePrefix'),sub(parameters('vmCount'),1),'-clusterIp')).outputs.result.value]", + "agListenerIpAddresses": "[reference(concat(variables('vmNamePrefix'),sub(parameters('vmCount'),1),'-agListenerIp')).outputs.result.value]", + "numberOfDisks": "[parameters('vmDiskCount')]", + "workloadType": "[parameters('workloadType')]", + "witnessStorageName": "[variables('witnessStorageName')]", + "witnessStorageKey": { + "userName": "PLACEHOLDER-DO-NOT-USE", + "password": "PrivateSettingsRef:witnessStorageKey" }, - "name": "[concat(variables('vmNamePrefix'),copyindex(),'-newVM')]", - "dependsOn": [ - "nicLoop" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('vmLoopTemplateURL')]" - }, - "parameters": { - "location": { - "value": "[parameters('location')]" - }, - "vmName": { - "value": "[concat(variables('vmNamePrefix'), copyindex())]" - }, - "vmSize": { - "value": "[parameters('vmSize')]" - }, - "vmDiskCount": { - "value": "[parameters('vmDiskCount')]" - }, - "vmDiskSize": { - "value": "[parameters('vmDiskSize')]" - }, - "adminUsername": { - "value": "[parameters('adminUsername')]" - }, - "adminPassword": { - "value": "[parameters('adminPassword')]" - }, - "_artifactsLocation": { - "value": "[parameters('_artifactsLocation')]" - }, - "_artifactsLocationSasToken": { - "value": "[parameters('_artifactsLocationSasToken')]" - }, - "imagePublisher": { - "value": "[parameters('imagePublisher')]" - }, - "imageOffer": { - "value": "[parameters('imageOffer')]" - }, - "imageSKU": { - "value": "[parameters('imageSKU')]" - }, - "imageVersion": { - "value": "[parameters('imageVersion')]" - }, - "zones": { - "value": "[take(skip(variables('zones'),mod(copyIndex(),length(variables('zones')))),1)]" - } - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmNamePrefix'),copyindex(1),'/sqlPrep')]", - "apiVersion": "2017-03-30", - "location": "[parameters('location')]", - "dependsOn": [ - "virtualMachineLoop" - ], - "copy": { - "name": "virtualMachineExtensionLoop", - "count": "[sub(parameters('vmCount'),1)]" + "adminCreds": { + "userName": "[parameters('adminUserName')]", + "password": "PrivateSettingsRef:adminPassword" }, - "properties": { - "publisher": "Microsoft.Powershell", - "type": "DSC", - "typeHandlerVersion": "2.71", - "autoUpgradeMinorVersion": true, - "settings": { - "modulesUrl": "[variables('sqlPrepModulesURL')]", - "configurationFunction": "[variables('sqlPrepFunction')]", - "properties": { - "domainName": "[parameters('domainName')]", - "adminCreds": { - "userName": "[parameters('adminUserName')]", - "password": "PrivateSettingsRef:adminPassword" - }, - "sqlServiceCreds": { - "userName": "[parameters('sqlServiceAccount')]", - "password": "PrivateSettingsRef:sqlServicePassword" - }, - "numberOfDisks": "[parameters('vmDiskCount')]", - "workloadType": "[parameters('workloadType')]" - } - }, - "protectedSettings": { - "items": { - "adminPassword": "[parameters('adminPassword')]", - "sqlServicePassword": "[parameters('sqlServicePassword')]" - } - } + "sqlServiceCreds": { + "userName": "[parameters('sqlServiceAccount')]", + "password": "PrivateSettingsRef:sqlServicePassword" } + } }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmNamePrefix'),'0/sqlConfig')]", - "apiVersion": "2017-03-30", - "location": "[parameters('location')]", - "dependsOn": [ - "virtualMachineLoop", - "virtualMachineExtensionLoop", - "clusterIpLoop", - "agListenerIpLoop", - "[resourceId('Microsoft.Storage/storageAccounts', variables('witnessStorageName'))]" - ], - "properties": { - "publisher": "Microsoft.Powershell", - "type": "DSC", - "typeHandlerVersion": "2.71", - "autoUpgradeMinorVersion": true, - "settings": { - "modulesUrl": "[variables('sqlConfigModulesURL')]", - "configurationFunction": "[variables('sqlConfigFunction')]", - "properties": { - "domainName": "[parameters('domainName')]", - "clusterName": "[variables('clusterName')]", - "vmNamePrefix": "[variables('vmNamePrefix')]", - "sqlAlwaysOnAvailabilityGroupName": "[variables('agName')]", - "sqlAlwaysOnAvailabilityGroupListenerName": "[variables('agListenerName')]", - "sqlAlwaysOnEndpointName": "[variables('agEpName')]", - "vmCount": "[parameters('vmCount')]", - "clusterIpAddresses": "[reference(concat(variables('vmNamePrefix'),sub(parameters('vmCount'),1),'-clusterIp')).outputs.result.value]", - "agListenerIpAddresses": "[reference(concat(variables('vmNamePrefix'),sub(parameters('vmCount'),1),'-agListenerIp')).outputs.result.value]", - "numberOfDisks": "[parameters('vmDiskCount')]", - "workloadType": "[parameters('workloadType')]", - "witnessStorageName": "[variables('witnessStorageName')]", - "witnessStorageKey": { - "userName": "PLACEHOLDER-DO-NOT-USE", - "password": "PrivateSettingsRef:witnessStorageKey" - }, - "adminCreds": { - "userName": "[parameters('adminUserName')]", - "password": "PrivateSettingsRef:adminPassword" - }, - "sqlServiceCreds": { - "userName": "[parameters('sqlServiceAccount')]", - "password": "PrivateSettingsRef:sqlServicePassword" - } - } - }, - "protectedSettings": { - "items": { - "adminPassword": "[parameters('adminPassword')]", - "sqlServicePassword": "[parameters('sqlServicePassword')]", - "witnessStorageKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts',variables('witnessStorageName')),variables('apiVersionStorage')).keys[0].value]" - } - } - } - } - ], - "outputs": { - "agListenerName": { - "type": "string", - "value": "[variables('agListenerName')]" + "protectedSettings": { + "items": { + "adminPassword": "[parameters('adminPassword')]", + "sqlServicePassword": "[parameters('sqlServicePassword')]", + "witnessStorageKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts',variables('witnessStorageName')),variables('apiVersionStorage')).keys[0].value]" + } } + } + } + ], + "outputs": { + "agListenerName": { + "type": "string", + "value": "[variables('agListenerName')]" } -} \ No newline at end of file + } +} diff --git a/sql-alwayson-md-mult-subnets-zones/nestedtemplates/getIpAddress.json b/sql-alwayson-md-mult-subnets-zones/nestedtemplates/getIpAddress.json index 700ee3596d89..cc3f9a1109dd 100644 --- a/sql-alwayson-md-mult-subnets-zones/nestedtemplates/getIpAddress.json +++ b/sql-alwayson-md-mult-subnets-zones/nestedtemplates/getIpAddress.json @@ -1,21 +1,28 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "ipConfig": { - "type": "string" - }, - "ipAddresses": { - "type": "array", - "defaultValue": [] - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "ipConfig": { + "type": "string" }, - "variables": {}, - "resources": [], - "outputs": { - "result": { - "type": "array", - "value": "[concat(parameters('ipAddresses'),split(parameters('ipConfig'),','))]" - } + "ipAddresses": { + "type": "array", + "defaultValue": [] + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [], + "outputs": { + "result": { + "type": "array", + "value": "[concat(parameters('ipAddresses'),split(parameters('ipConfig'),','))]" } -} \ No newline at end of file + } +} diff --git a/sql-alwayson-md-mult-subnets-zones/nestedtemplates/newVM.json b/sql-alwayson-md-mult-subnets-zones/nestedtemplates/newVM.json index 991facc3aefc..efcd2aab010b 100644 --- a/sql-alwayson-md-mult-subnets-zones/nestedtemplates/newVM.json +++ b/sql-alwayson-md-mult-subnets-zones/nestedtemplates/newVM.json @@ -1,106 +1,105 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "location": { - "type": "string" - }, - "vmName": { - "type": "string" - }, - "vmSize": { - "type": "string" - }, - "vmDiskCount": { - "type": "int" - }, - "vmDiskSize": { - "type": "int" - }, - "adminUsername": { - "type": "string" - }, - "adminPassword": { - "type": "securestring" - }, - "imagePublisher": { - "type": "string" - }, - "imageOffer": { - "type": "string" - }, - "imageSKU": { - "type": "string" - }, - "imageVersion": { - "type": "string" + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "vmName": { + "type": "string" + }, + "vmSize": { + "type": "string" + }, + "vmDiskCount": { + "type": "int" + }, + "vmDiskSize": { + "type": "int" + }, + "adminUsername": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "imagePublisher": { + "type": "string" + }, + "imageOffer": { + "type": "string" + }, + "imageSKU": { + "type": "string" + }, + "imageVersion": { + "type": "string" + }, + "zones": { + "type": "array" + }, + "_artifactsLocation": { + "type": "string" + }, + "_artifactsLocationSasToken": { + "type": "securestring" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "name": "[parameters('vmName')]", + "zones": "[parameters('zones')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" }, - "zones": { - "type": "array" + "osProfile": { + "computerName": "[parameters('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" }, - "_artifactsLocation": { - "type": "string" + "storageProfile": { + "imageReference": { + "publisher": "[parameters('imagePublisher')]", + "offer": "[parameters('imageOffer')]", + "sku": "[parameters('imageSku')]", + "version": "[parameters('imageVersion')]" + }, + "osDisk": { + "name": "[concat(parameters('vmName'),'-osdisk')]", + "caching": "ReadWrite", + "createOption": "FromImage" + }, + "copy": [ + { + "name": "dataDisks", + "count": "[parameters('vmDiskCount')]", + "input": { + "diskSizeGB": "[parameters('vmDiskSize')]", + "lun": "[copyIndex('dataDisks')]", + "createOption": "Empty" + } + } + ] }, - "_artifactsLocationSasToken": { - "type": "securestring" - } - }, - "variables": { - }, - "resources": [ - { - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2017-03-30", - "location": "[parameters('location')]", - "name": "[parameters('vmName')]", - "zones": "[parameters('zones')]", - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" - }, - "osProfile": { - "computerName": "[parameters('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('imagePublisher')]", - "offer": "[parameters('imageOffer')]", - "sku": "[parameters('imageSku')]", - "version": "[parameters('imageVersion')]" - }, - "osDisk": { - "name": "[concat(parameters('vmName'),'-osdisk')]", - "caching": "ReadWrite", - "createOption": "FromImage" - }, - "copy": [ - { - "name": "dataDisks", - "count": "[parameters('vmDiskCount')]", - "input": { - "diskSizeGB": "[parameters('vmDiskSize')]", - "lun": "[copyIndex('dataDisks')]", - "createOption": "Empty" - } - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('vmName'),'-nic'))]" - } - ] - } + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('vmName'),'-nic'))]" } + ] } - ], - "outputs": { - "vmName": { - "type": "string", - "value": "[parameters('vmName')]" - } + } + } + ], + "outputs": { + "vmName": { + "type": "string", + "value": "[parameters('vmName')]" } -} \ No newline at end of file + } +} diff --git a/sql-reporting-services-sql-server/azuredeploy.json b/sql-reporting-services-sql-server/azuredeploy.json index 2ecfa8c87821..ad46682c2a65 100644 --- a/sql-reporting-services-sql-server/azuredeploy.json +++ b/sql-reporting-services-sql-server/azuredeploy.json @@ -76,6 +76,13 @@ "metadata": { "description": "VHD storage type" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -127,7 +134,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('vhdStorageNameRs')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "DataStorageAccountRs" }, @@ -139,7 +146,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('vhdStorageNameCatalog')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "DataStorageAccountCatalog" }, @@ -150,7 +157,7 @@ { "name": "[variables('diagnosticsStorageAccountName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "tags": { "displayName": "DiagnosticsStorageAccount" @@ -163,7 +170,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "publicIpLoop", "count": 1 @@ -182,7 +189,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "VirtualNetwork" }, @@ -206,7 +213,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": 1 @@ -239,7 +246,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmNameRs')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "RsMachine" }, @@ -303,7 +310,7 @@ { "name": "Microsoft.Insights.VMDiagnosticsSettings", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmNameRs'))]" @@ -330,7 +337,7 @@ { "name": "SSRSConfiguration", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmNameRs'))]", @@ -368,7 +375,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmNameCatalog')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "CatalogMachine" }, @@ -432,7 +439,7 @@ { "name": "SQLConfigurationMixedAuth", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmNameCatalog'))]" @@ -475,7 +482,7 @@ { "name": "Microsoft.Insights.VMDiagnosticsSettings", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmNameCatalog'))]" @@ -504,7 +511,7 @@ { "name": "[variables('nicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", @@ -533,7 +540,7 @@ { "name": "[variables('publicIPAddressName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -547,4 +554,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sql-server-2014-alwayson-existing-vnet-and-ad/azuredeploy.json b/sql-server-2014-alwayson-existing-vnet-and-ad/azuredeploy.json index fed7c842fb81..b92c388c32cb 100644 --- a/sql-server-2014-alwayson-existing-vnet-and-ad/azuredeploy.json +++ b/sql-server-2014-alwayson-existing-vnet-and-ad/azuredeploy.json @@ -107,6 +107,13 @@ "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": { diff --git a/sql-server-2014-alwayson-existing-vnet-and-ad/nested/deploy-sql-alwayson.json b/sql-server-2014-alwayson-existing-vnet-and-ad/nested/deploy-sql-alwayson.json index 8a20ca15d0ef..f3b421a72036 100644 --- a/sql-server-2014-alwayson-existing-vnet-and-ad/nested/deploy-sql-alwayson.json +++ b/sql-server-2014-alwayson-existing-vnet-and-ad/nested/deploy-sql-alwayson.json @@ -52,6 +52,13 @@ }, "_artifactsLocationSasToken": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -66,7 +73,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('sqlNamePrefix'),'0/sqlAOPrepare')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [], "properties": { "publisher": "Microsoft.Powershell", @@ -102,7 +109,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('sqlNamePrefix'),'1/CreateCluster')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',parameters('sqlNamePrefix'),'0/extensions/sqlAOPrepare')]" ], @@ -152,4 +159,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/sql-server-2014-alwayson-existing-vnet-and-ad/nested/deploy-sql-cluster.json b/sql-server-2014-alwayson-existing-vnet-and-ad/nested/deploy-sql-cluster.json index 0285e022c32d..4f4656f08a96 100644 --- a/sql-server-2014-alwayson-existing-vnet-and-ad/nested/deploy-sql-cluster.json +++ b/sql-server-2014-alwayson-existing-vnet-and-ad/nested/deploy-sql-cluster.json @@ -1,474 +1,481 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "namePrefix": { - "type": "string" - }, - "domainName": { - "type": "string" - }, - "dnsServerName": { - "type": "string" - }, - "adminUsername": { - "type": "string" - }, - "adminPassword": { - "type": "securestring" - }, - "sqlServerServiceAccountUserName": { - "type": "string" - }, - "sqlServerServiceAccountPassword": { - "type": "securestring" - }, - "storageAccountType": { - "type": "securestring" - }, - "nicSubnetUri": { - "type": "string" - }, - "lbSubnetUri": { - "type": "string" - }, - "sqlLBIPAddress": { - "type": "string" - }, - "sqlVMSize": { - "type": "string" - }, - "sqlWitnessVMSize": { - "type": "string" - }, - "_artifactsLocation": { - "type": "string" - }, - "_artifactsLocationSasToken": { - "type": "string" - }, - "windowsImagePublisher": { - "type": "string", - "defaultValue": "MicrosoftSQLServer" - }, - "windowsImageOffer": { - "type": "string", - "defaultValue": "SQL2014SP2-WS2012R2" - }, - "windowsImageSKU": { - "type": "string", - "defaultValue": "Enterprise" - }, - "windowsImageVersion": { - "type": "string", - "defaultValue": "latest" - } - }, - "variables": { - "apiVersionStorage": "2015-06-15", - "sqlDiskSize": 1000, - "sqlWitnessDiskSize": 128, - "sqlNamePrefix": "[concat(parameters('namePrefix'),'-sql-')]", - "sqlAvailabilitySetName": "[concat(variables('sqlNamePrefix'),'as')]", - "sqlLBName": "[concat(variables('sqlNamePrefix'),'ilb')]", - "sqlLBId": "[resourceId('Microsoft.Network/loadBalancers',variables('sqlLBName'))]", - "lbFE1": "[concat(variables('sqlNamePrefix'),'ilbfe1')]", - "lbBE": "[concat(variables('sqlNamePrefix'),'ilbbe')]", - "sqlLBFEConfigID1": "[concat(variables('sqllbID'),'/frontendIPConfigurations/',variables('lbFE1'))]", - "sqlLBBEAddressPoolID": "[concat(variables('sqllbID'),'/backendAddressPools/',variables('lbBE'))]", - "sqlAOProbe1": "[concat(variables('sqlNamePrefix'),'ilbp1')]", - "sqlLBProbeID1": "[concat(variables('sqllbID'),'/probes/',variables('sqlAOProbe1'))]", - "sqlStorageAccountPrefix": "[concat(parameters('namePrefix'),take(uniqueString(resourceGroup().id),8),'sql')]", - "sqlWitnessStorageAccountName": "[concat(parameters('namePrefix'),take(uniqueString(resourceGroup().id),8),'wit')]", - "vmContainerName": "vhds", - "deploySqlWitnessShare": "deploySqlWitnessShare", - "deploySqlWitnessShareId": "[concat('Microsoft.Resources/deployments/', variables('deploySqlWitnessShare'))]", - "deploySqlWitnessShareTemplateUrl": "[concat(parameters('_artifactsLocation'),'/nested/deploy-sql-witness.json',parameters('_artifactsLocationSasToken'))]", - "sqlWitnessSharePath": "[concat(parameters('namePrefix'),'-fsw')]", - "sqlWitnessVMName": "[concat(variables('sqlNamePrefix'),'w')]", - "deploySqlAlwaysOn": "deploySqlAlwaysOn", - "deploySqlAlwaysOnTemplateUrl": "[concat(parameters('_artifactsLocation'),'/nested/deploy-sql-alwayson.json',parameters('_artifactsLocationSasToken'))]", - "sqlAOEPName": "[concat(parameters('namePrefix'),'-agep')]", - "sqlAOAGName1": "[concat(parameters('namePrefix'),'-ag1')]", - "sqlAOListener1": "[concat(parameters('namePrefix'),'-agl1')]" - }, - "resources": [ - { - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('sqlAvailabilitySetName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('sqlStorageAccountPrefix'), copyindex())]", - "apiVersion": "2015-06-15", - "copy": { - "name": "storageAccountLoop", - "count": 2 - }, - "location": "[resourceGroup().location]", - "properties": { - "accountType": "[parameters('storageAccountType')]" - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('sqlWitnessStorageAccountName')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": { - "accountType": "[parameters('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "name": "[variables('sqlLBName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", - "dependsOn": [], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('lbFE1')]", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[parameters('sqlLBIPAddress')]", - "subnet": { - "id": "[parameters('lbSubnetUri')]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('lbBE')]" - } - ], - "loadBalancingRules": [ - { - "name": "[variables('sqlAOListener1')]", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('sqlLBFEConfigID1')]" - }, - "backendAddressPool": { - "id": "[variables('sqlLBBEAddressPoolID')]" - }, - "probe": { - "id": "[variables('sqlLBProbeID1')]" - }, - "protocol": "Tcp", - "frontendPort": 1433, - "backendPort": 1433, - "enableFloatingIP": true - } - } - ], - "probes": [ - { - "name": "[variables('sqlAOProbe1')]", - "properties": { - "protocol": "Tcp", - "port": 59999, - "intervalInSeconds": 5, - "numberOfProbes": 2 - } - } - ] - } - }, - { - "name": "[concat(variables('sqlNamePrefix'), copyindex(), '-nic')]", - "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "copy": { - "name": "nicLoop", - "count": 2 - }, - "dependsOn": [ - "[variables('sqlLBID')]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[parameters('nicSubnetUri')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[variables('sqlLBBEAddressPoolID')]" - } - ] - } - } - ] - } - }, - { - "name": "[concat(variables('sqlWitnessVMName'), '-nic')]", - "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[parameters('nicSubnetUri')]" - } - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('sqlNamePrefix'), copyindex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "virtualMachineLoop", - "count": 2 - }, - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts',concat(variables('sqlStorageAccountPrefix'), copyindex()))]", - "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('sqlNamePrefix'), copyindex(), '-nic'))]", - "[resourceId('Microsoft.Compute/availabilitySets', variables('sqlAvailabilitySetName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('SqlVMSize')]" - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('sqlAvailabilitySetName'))]" - }, - "osProfile": { - "computerName": "[concat(variables('sqlNamePrefix'), copyindex())]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('windowsImagePublisher')]", - "offer": "[parameters('windowsImageOffer')]", - "sku": "[parameters('windowsImageSKU')]", - "version": "[parameters('windowsImageVersion')]" - }, - "osDisk": { - "name": "[concat(variables('sqlNamePrefix'), copyindex(), '-osdisk.vhd')]", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/',variables('sqlStorageAccountPrefix'),copyIndex()),variables('apiVersionStorage')).primaryEndpoints.blob, variables('vmContainerName'), '/', variables('sqlNamePrefix'), copyindex(), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - }, - "dataDisks": [ - { - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/',variables('sqlStorageAccountPrefix'),copyIndex()),variables('apiVersionStorage')).primaryEndpoints.blob, variables('vmContainerName'), '/', variables('sqlNamePrefix'), copyindex(), '-datadisk1.vhd')]" - }, - "name": "[concat(variables('sqlNamePrefix'), copyindex(), '-datadisk1.vhd')]", - "caching": "None", - "createOption": "Empty", - "diskSizeGB": "[variables('sqlDiskSize')]", - "lun": 0 - }, - { - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/',variables('sqlStorageAccountPrefix'),copyIndex()),variables('apiVersionStorage')).primaryEndpoints.blob, variables('vmContainerName'), '/', variables('sqlNamePrefix'), copyindex(), '-logdisk1.vhd')]" - }, - "name": "[concat(variables('sqlNamePrefix'), copyindex(), '-logdisk1.vhd')]", - "caching": "None", - "createOption": "Empty", - "diskSizeGB": "[variables('sqlDiskSize')]", - "lun": 1 - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('sqlNamePrefix'), copyindex(), '-nic'))]" - } - ] - } - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('sqlWitnessVMName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts',variables('sqlWitnessStorageAccountName'))]", - "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('sqlWitnessVMName'), '-nic'))]", - "[resourceId('Microsoft.Compute/availabilitySets', variables('sqlAvailabilitySetName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('SqlWitnessVMSize')]" - }, - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('sqlAvailabilitySetName'))]" - }, - "osProfile": { - "computerName": "[variables('sqlWitnessVMName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('windowsImagePublisher')]", - "offer": "[parameters('windowsImageOffer')]", - "sku": "[parameters('windowsImageSKU')]", - "version": "[parameters('windowsImageVersion')]" - }, - "osDisk": { - "name": "[concat(variables('sqlWitnessVMName'), '-osdisk.vhd')]", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/',variables('sqlWitnessStorageAccountName')),variables('apiVersionStorage')).primaryEndpoints.blob, variables('vmContainerName'), '/', variables('sqlWitnessVMName'), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - }, - "dataDisks": [ - { - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/',variables('sqlWitnessStorageAccountName')),variables('apiVersionStorage')).primaryEndpoints.blob, variables('vmContainerName'), '/', variables('sqlWitnessVMName'), '-datadisk1.vhd')]" - }, - "name": "[concat(variables('sqlWitnessVMName'), '-datadisk1.vhd')]", - "caching": "None", - "createOption": "Empty", - "diskSizeGB": "[variables('sqlWitnessDiskSize')]", - "lun": 0 - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('sqlWitnessVMName'), '-nic'))]" - } - ] - } - } - }, - { - "name": "[variables('deploySqlWitnessShare')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines',variables('sqlWitnessVMName'))]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('deploySqlWitnessShareTemplateUrl')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "sqlWitnessVMName": { - "value": "[variables('sqlWitnessVMName')]" - }, - "domainName": { - "value": "[parameters('domainName')]" - }, - "sharePath": { - "value": "[variables('sqlWitnessSharePath')]" - }, - "adminUsername": { - "value": "[parameters('adminUsername')]" - }, - "adminPassword": { - "value": "[parameters('adminPassword')]" - }, - "_artifactsLocation": { - "value": "[parameters('_artifactsLocation')]" - }, - "_artifactsLocationSasToken": { - "value": "[parameters('_artifactsLocationSasToken')]" - } - } - } - }, - { - "name": "[variables('deploySqlAlwaysOn')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2015-01-01", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines',concat(variables('sqlNamePrefix'),'0'))]", - "[resourceId('Microsoft.Compute/virtualMachines',concat(variables('sqlNamePrefix'),'1'))]", - "[variables('deploySqlWitnessShareId')]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('deploySqlAlwaysOnTemplateUrl')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "sqlNamePrefix": { - "value": "[variables('sqlNamePrefix')]" - }, - "domainName": { - "value": "[parameters('domainName')]" - }, - "namePrefix": { - "value": "[parameters('namePrefix')]" - }, - "sharePath": { - "value": "[variables('sqlWitnessSharePath')]" - }, - "sqlWitnessVMName": { - "value": "[variables('sqlWitnessVMName')]" - }, - "sqlLBName": { - "value": "[variables('sqlLBName')]" - }, - "sqlLBIPAddress": { - "value": "[parameters('sqlLBIPAddress')]" - }, - "dnsServerName": { - "value": "[parameters('dnsServerName')]" - }, - "sqlServerServiceAccountUserName": { - "value": "[parameters('sqlServerServiceAccountUserName')]" - }, - "sqlServerServiceAccountPassword": { - "value": "[parameters('sqlServerServiceAccountPassword')]" - }, - "adminUsername": { - "value": "[parameters('adminUsername')]" - }, - "adminPassword": { - "value": "[parameters('adminPassword')]" - }, - "_artifactsLocation": { - "value": "[parameters('_artifactsLocation')]" - }, - "_artifactsLocationSasToken": { - "value": "[parameters('_artifactsLocationSasToken')]" - }, - "sqlAlwaysOnEndpointName": { - "value": "[variables('sqlAOEPName')]" - }, - "sqlAlwaysOnAvailabilityGroupName1": { - "value": "[variables('sqlAOAGName1')]" - }, - "sqlAlwaysOnAvailabilityGroupListenerName1": { - "value": "[variables('sqlAOListener1')]" - } - } - } - } - ], - "outputs": {} + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "namePrefix": { + "type": "string" + }, + "domainName": { + "type": "string" + }, + "dnsServerName": { + "type": "string" + }, + "adminUsername": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "sqlServerServiceAccountUserName": { + "type": "string" + }, + "sqlServerServiceAccountPassword": { + "type": "securestring" + }, + "storageAccountType": { + "type": "securestring" + }, + "nicSubnetUri": { + "type": "string" + }, + "lbSubnetUri": { + "type": "string" + }, + "sqlLBIPAddress": { + "type": "string" + }, + "sqlVMSize": { + "type": "string" + }, + "sqlWitnessVMSize": { + "type": "string" + }, + "_artifactsLocation": { + "type": "string" + }, + "_artifactsLocationSasToken": { + "type": "string" + }, + "windowsImagePublisher": { + "type": "string", + "defaultValue": "MicrosoftSQLServer" + }, + "windowsImageOffer": { + "type": "string", + "defaultValue": "SQL2014SP2-WS2012R2" + }, + "windowsImageSKU": { + "type": "string", + "defaultValue": "Enterprise" + }, + "windowsImageVersion": { + "type": "string", + "defaultValue": "latest" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "apiVersionStorage": "2015-06-15", + "sqlDiskSize": 1000, + "sqlWitnessDiskSize": 128, + "sqlNamePrefix": "[concat(parameters('namePrefix'),'-sql-')]", + "sqlAvailabilitySetName": "[concat(variables('sqlNamePrefix'),'as')]", + "sqlLBName": "[concat(variables('sqlNamePrefix'),'ilb')]", + "sqlLBId": "[resourceId('Microsoft.Network/loadBalancers',variables('sqlLBName'))]", + "lbFE1": "[concat(variables('sqlNamePrefix'),'ilbfe1')]", + "lbBE": "[concat(variables('sqlNamePrefix'),'ilbbe')]", + "sqlLBFEConfigID1": "[concat(variables('sqllbID'),'/frontendIPConfigurations/',variables('lbFE1'))]", + "sqlLBBEAddressPoolID": "[concat(variables('sqllbID'),'/backendAddressPools/',variables('lbBE'))]", + "sqlAOProbe1": "[concat(variables('sqlNamePrefix'),'ilbp1')]", + "sqlLBProbeID1": "[concat(variables('sqllbID'),'/probes/',variables('sqlAOProbe1'))]", + "sqlStorageAccountPrefix": "[concat(parameters('namePrefix'),take(uniqueString(resourceGroup().id),8),'sql')]", + "sqlWitnessStorageAccountName": "[concat(parameters('namePrefix'),take(uniqueString(resourceGroup().id),8),'wit')]", + "vmContainerName": "vhds", + "deploySqlWitnessShare": "deploySqlWitnessShare", + "deploySqlWitnessShareId": "[concat('Microsoft.Resources/deployments/', variables('deploySqlWitnessShare'))]", + "deploySqlWitnessShareTemplateUrl": "[concat(parameters('_artifactsLocation'),'/nested/deploy-sql-witness.json',parameters('_artifactsLocationSasToken'))]", + "sqlWitnessSharePath": "[concat(parameters('namePrefix'),'-fsw')]", + "sqlWitnessVMName": "[concat(variables('sqlNamePrefix'),'w')]", + "deploySqlAlwaysOn": "deploySqlAlwaysOn", + "deploySqlAlwaysOnTemplateUrl": "[concat(parameters('_artifactsLocation'),'/nested/deploy-sql-alwayson.json',parameters('_artifactsLocationSasToken'))]", + "sqlAOEPName": "[concat(parameters('namePrefix'),'-agep')]", + "sqlAOAGName1": "[concat(parameters('namePrefix'),'-ag1')]", + "sqlAOListener1": "[concat(parameters('namePrefix'),'-agl1')]" + }, + "resources": [ + { + "type": "Microsoft.Compute/availabilitySets", + "name": "[variables('sqlAvailabilitySetName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": {} + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[concat(variables('sqlStorageAccountPrefix'), copyindex())]", + "apiVersion": "2015-06-15", + "copy": { + "name": "storageAccountLoop", + "count": 2 + }, + "location": "[parameters('location')]", + "properties": { + "accountType": "[parameters('storageAccountType')]" + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('sqlWitnessStorageAccountName')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "accountType": "[parameters('storageAccountType')]" + } + }, + { + "apiVersion": "2015-06-15", + "name": "[variables('sqlLBName')]", + "type": "Microsoft.Network/loadBalancers", + "location": "[parameters('location')]", + "dependsOn": [], + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('lbFE1')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[parameters('sqlLBIPAddress')]", + "subnet": { + "id": "[parameters('lbSubnetUri')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('lbBE')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('sqlAOListener1')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('sqlLBFEConfigID1')]" + }, + "backendAddressPool": { + "id": "[variables('sqlLBBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('sqlLBProbeID1')]" + }, + "protocol": "Tcp", + "frontendPort": 1433, + "backendPort": 1433, + "enableFloatingIP": true + } + } + ], + "probes": [ + { + "name": "[variables('sqlAOProbe1')]", + "properties": { + "protocol": "Tcp", + "port": 59999, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + } + }, + { + "name": "[concat(variables('sqlNamePrefix'), copyindex(), '-nic')]", + "type": "Microsoft.Network/networkInterfaces", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "copy": { + "name": "nicLoop", + "count": 2 + }, + "dependsOn": [ + "[variables('sqlLBID')]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[parameters('nicSubnetUri')]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('sqlLBBEAddressPoolID')]" + } + ] + } + } + ] + } + }, + { + "name": "[concat(variables('sqlWitnessVMName'), '-nic')]", + "type": "Microsoft.Network/networkInterfaces", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[parameters('nicSubnetUri')]" + } + } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[concat(variables('sqlNamePrefix'), copyindex())]", + "location": "[parameters('location')]", + "copy": { + "name": "virtualMachineLoop", + "count": 2 + }, + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts',concat(variables('sqlStorageAccountPrefix'), copyindex()))]", + "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('sqlNamePrefix'), copyindex(), '-nic'))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('sqlAvailabilitySetName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('SqlVMSize')]" + }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('sqlAvailabilitySetName'))]" + }, + "osProfile": { + "computerName": "[concat(variables('sqlNamePrefix'), copyindex())]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('windowsImagePublisher')]", + "offer": "[parameters('windowsImageOffer')]", + "sku": "[parameters('windowsImageSKU')]", + "version": "[parameters('windowsImageVersion')]" + }, + "osDisk": { + "name": "[concat(variables('sqlNamePrefix'), copyindex(), '-osdisk.vhd')]", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/',variables('sqlStorageAccountPrefix'),copyIndex()),variables('apiVersionStorage')).primaryEndpoints.blob, variables('vmContainerName'), '/', variables('sqlNamePrefix'), copyindex(), '-osdisk.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "FromImage" + }, + "dataDisks": [ + { + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/',variables('sqlStorageAccountPrefix'),copyIndex()),variables('apiVersionStorage')).primaryEndpoints.blob, variables('vmContainerName'), '/', variables('sqlNamePrefix'), copyindex(), '-datadisk1.vhd')]" + }, + "name": "[concat(variables('sqlNamePrefix'), copyindex(), '-datadisk1.vhd')]", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": "[variables('sqlDiskSize')]", + "lun": 0 + }, + { + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/',variables('sqlStorageAccountPrefix'),copyIndex()),variables('apiVersionStorage')).primaryEndpoints.blob, variables('vmContainerName'), '/', variables('sqlNamePrefix'), copyindex(), '-logdisk1.vhd')]" + }, + "name": "[concat(variables('sqlNamePrefix'), copyindex(), '-logdisk1.vhd')]", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": "[variables('sqlDiskSize')]", + "lun": 1 + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('sqlNamePrefix'), copyindex(), '-nic'))]" + } + ] + } + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('sqlWitnessVMName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts',variables('sqlWitnessStorageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('sqlWitnessVMName'), '-nic'))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('sqlAvailabilitySetName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('SqlWitnessVMSize')]" + }, + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('sqlAvailabilitySetName'))]" + }, + "osProfile": { + "computerName": "[variables('sqlWitnessVMName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('windowsImagePublisher')]", + "offer": "[parameters('windowsImageOffer')]", + "sku": "[parameters('windowsImageSKU')]", + "version": "[parameters('windowsImageVersion')]" + }, + "osDisk": { + "name": "[concat(variables('sqlWitnessVMName'), '-osdisk.vhd')]", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/',variables('sqlWitnessStorageAccountName')),variables('apiVersionStorage')).primaryEndpoints.blob, variables('vmContainerName'), '/', variables('sqlWitnessVMName'), '-osdisk.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "FromImage" + }, + "dataDisks": [ + { + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/',variables('sqlWitnessStorageAccountName')),variables('apiVersionStorage')).primaryEndpoints.blob, variables('vmContainerName'), '/', variables('sqlWitnessVMName'), '-datadisk1.vhd')]" + }, + "name": "[concat(variables('sqlWitnessVMName'), '-datadisk1.vhd')]", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": "[variables('sqlWitnessDiskSize')]", + "lun": 0 + } + ] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('sqlWitnessVMName'), '-nic'))]" + } + ] + } + } + }, + { + "name": "[variables('deploySqlWitnessShare')]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines',variables('sqlWitnessVMName'))]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('deploySqlWitnessShareTemplateUrl')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "sqlWitnessVMName": { + "value": "[variables('sqlWitnessVMName')]" + }, + "domainName": { + "value": "[parameters('domainName')]" + }, + "sharePath": { + "value": "[variables('sqlWitnessSharePath')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "_artifactsLocation": { + "value": "[parameters('_artifactsLocation')]" + }, + "_artifactsLocationSasToken": { + "value": "[parameters('_artifactsLocationSasToken')]" + } + } + } + }, + { + "name": "[variables('deploySqlAlwaysOn')]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2015-01-01", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines',concat(variables('sqlNamePrefix'),'0'))]", + "[resourceId('Microsoft.Compute/virtualMachines',concat(variables('sqlNamePrefix'),'1'))]", + "[variables('deploySqlWitnessShareId')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('deploySqlAlwaysOnTemplateUrl')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "sqlNamePrefix": { + "value": "[variables('sqlNamePrefix')]" + }, + "domainName": { + "value": "[parameters('domainName')]" + }, + "namePrefix": { + "value": "[parameters('namePrefix')]" + }, + "sharePath": { + "value": "[variables('sqlWitnessSharePath')]" + }, + "sqlWitnessVMName": { + "value": "[variables('sqlWitnessVMName')]" + }, + "sqlLBName": { + "value": "[variables('sqlLBName')]" + }, + "sqlLBIPAddress": { + "value": "[parameters('sqlLBIPAddress')]" + }, + "dnsServerName": { + "value": "[parameters('dnsServerName')]" + }, + "sqlServerServiceAccountUserName": { + "value": "[parameters('sqlServerServiceAccountUserName')]" + }, + "sqlServerServiceAccountPassword": { + "value": "[parameters('sqlServerServiceAccountPassword')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "_artifactsLocation": { + "value": "[parameters('_artifactsLocation')]" + }, + "_artifactsLocationSasToken": { + "value": "[parameters('_artifactsLocationSasToken')]" + }, + "sqlAlwaysOnEndpointName": { + "value": "[variables('sqlAOEPName')]" + }, + "sqlAlwaysOnAvailabilityGroupName1": { + "value": "[variables('sqlAOAGName1')]" + }, + "sqlAlwaysOnAvailabilityGroupListenerName1": { + "value": "[variables('sqlAOListener1')]" + } + } + } + } + ], + "outputs": {} } diff --git a/sql-server-2014-alwayson-existing-vnet-and-ad/nested/deploy-sql-witness.json b/sql-server-2014-alwayson-existing-vnet-and-ad/nested/deploy-sql-witness.json index fd5072a5f70f..54c31875eaf6 100644 --- a/sql-server-2014-alwayson-existing-vnet-and-ad/nested/deploy-sql-witness.json +++ b/sql-server-2014-alwayson-existing-vnet-and-ad/nested/deploy-sql-witness.json @@ -22,6 +22,13 @@ }, "_artifactsLocationSasToken": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -33,7 +40,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('sqlWitnessVMName'),'/CreateFileShareWitness')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [], "properties": { "publisher": "Microsoft.Powershell", @@ -62,4 +69,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/sqldb-django-on-ubuntu/azuredeploy.json b/sqldb-django-on-ubuntu/azuredeploy.json index fcce13f0b9bf..a12c242ca323 100644 --- a/sqldb-django-on-ubuntu/azuredeploy.json +++ b/sqldb-django-on-ubuntu/azuredeploy.json @@ -121,6 +121,13 @@ "description": "SQL Version" }, "defaultValue": "12.0" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -141,7 +148,7 @@ "resources": [ { "apiVersion": "2014-04-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[parameters('serverName')]", "properties": { "administratorLogin": "[parameters('administratorLogin')]", @@ -154,7 +161,7 @@ "dependsOn": [ "[concat('Microsoft.Sql/servers/', parameters('serverName'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "[parameters('databaseName')]", "properties": { "collation": "[parameters('collation')]", @@ -169,7 +176,7 @@ "dependsOn": [ "[concat('Microsoft.Sql/servers/', parameters('serverName'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "name": "FirewallRule1", "properties": { "endIpAddress": "[parameters('firewallEndIP')]", @@ -184,7 +191,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -193,7 +200,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -205,7 +212,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -226,7 +233,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -252,7 +259,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -295,7 +302,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -315,4 +322,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sqlvm-alwayson-cluster/azuredeploy.json b/sqlvm-alwayson-cluster/azuredeploy.json index 4ec10b83bfd8..38400dbe4b5c 100644 --- a/sqlvm-alwayson-cluster/azuredeploy.json +++ b/sqlvm-alwayson-cluster/azuredeploy.json @@ -364,6 +364,13 @@ "description": "The Sql VM work load type: GENERAL - general work load; DW - datawear house work load; OLTP - Transactional processing work load" }, "defaultValue": "GENERAL" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -499,7 +506,7 @@ }, "parameters": { "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "sqlStorageAccountName": { "value": "[parameters('sqlStorageAccountName')]" @@ -553,7 +560,7 @@ }, "parameters": { "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "sqlLBName": { "value": "[variables('lbSettings').sqlLBName]" @@ -600,7 +607,7 @@ }, "parameters": { "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adPDCNicName": { "value": "[variables('adPDCNicName')]" @@ -680,7 +687,7 @@ "value": "[parameters('dcStorageAccountName')]" }, "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adVMSize": { "value": "[parameters('adVMSize')]" @@ -772,7 +779,7 @@ }, "parameters": { "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "virtualNetworkName": { "value": "[variables('virtualNetworkNameWithSuffix')]" @@ -806,7 +813,7 @@ }, "parameters": { "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adBDCVMName": { "value": "[variables('vmSettings').adBDCVMName]" @@ -844,7 +851,7 @@ }, "parameters": { "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "virtualNetworkName": { "value": "[variables('virtualNetworkNameWithSuffix')]" @@ -879,7 +886,7 @@ }, "parameters": { "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "nicName": { "value": "[variables('sqlwNicName')]" @@ -921,7 +928,7 @@ }, "parameters": { "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "nicName": { "value": "[concat(variables('vmSettings').sqlVMName, '0-nic')]" @@ -971,7 +978,7 @@ }, "parameters": { "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "nicName": { "value": "[concat(variables('vmSettings').sqlVMName, '1-nic')]" @@ -1024,7 +1031,7 @@ "value": "[variables('vmSettings').sqlVMName]" }, "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" @@ -1101,7 +1108,7 @@ "value": "[variables('vmSettings').sqlVMName]" }, "location": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "adminUsername": { "value": "[parameters('adminUsername')]" diff --git a/sqlvm-alwayson-cluster/nested/configuringAlwaysOn.json b/sqlvm-alwayson-cluster/nested/configuringAlwaysOn.json index 8498067045bb..06dc354890a2 100644 --- a/sqlvm-alwayson-cluster/nested/configuringAlwaysOn.json +++ b/sqlvm-alwayson-cluster/nested/configuringAlwaysOn.json @@ -1,130 +1,128 @@ -{ - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "sqlVMName":{ - "type":"string" - }, - "location":{ - "type":"string" - }, - "adminUsername":{ - "type":"string" - }, - "adminPassword":{ - "type":"securestring" - }, - "domainName":{ - "type":"string" - }, - "sqlAOEPName":{ - "type":"string" - }, - "sqlServerServiceAccountUserName":{ - "type":"string" - }, - "sqlServerServiceAccountPassword":{ - "type":"securestring" - }, - "createClusterModulesURL":{ - "type":"string" - }, - "createClusterConfigurationFunction":{ - "type":"string" - }, - "clusterName":{ - "type":"string" - }, - "sharePath":{ - "type":"string" - }, - "sqlAOAGName":{ - "type":"string" - }, - "sqlAOListenerName":{ - "type":"string" - }, - "sqlAOListenerPort":{ - "type":"string" - }, - "sqlLBName":{ - "type":"string" - }, - "sqlLBIPAddress":{ - "type":"string" - }, - "adPDCVMName":{ - "type":"string" - }, - "sqlwVMName":{ - "type":"string" - }, - "numberOfDisks":{ - "type":"string" - }, - "workloadType":{ - "type":"string" - } - }, - "resources":[ - { - "type":"Microsoft.Compute/virtualMachines/extensions", - "name":"[concat(parameters('sqlVMName'),'1/configuringAlwaysOn')]", - "apiVersion":"2015-06-15", - "location":"[parameters('location')]", - "properties":{ - "publisher":"Microsoft.Powershell", - "type":"DSC", - "typeHandlerVersion":"2.19", - "autoUpgradeMinorVersion":false, - "settings":{ - "modulesURL":"[parameters('createClusterModulesURL')]", - "configurationFunction":"[parameters('createClusterConfigurationFunction')]", - "properties":{ - "domainName":"[parameters('domainName')]", - "clusterName":"[parameters('clusterName')]", - "sharePath":"[concat('\\\\',parameters('sqlwVMName'),'\\',parameters('sharePath'))]", - "nodes":[ - "[concat(parameters('sqlVMName'),'0')]", - "[concat(parameters('sqlVMName'),'1')]" - ], - "sqlAlwaysOnEndpointName":"[parameters('sqlAOEPName')]", - "sqlAlwaysOnAvailabilityGroupName":"[parameters('sqlAOAGName')]", - "sqlAlwaysOnAvailabilityGroupListenerName":"[parameters('sqlAOListenerName')]", - "SqlAlwaysOnAvailabilityGroupListenerPort":"[parameters('sqlAOListenerPort')]", - "databaseNames":"AutoHa-sample", - "lbName":"[parameters('sqlLBName')]", - "lbAddress":"[parameters('sqlLBIPAddress')]", - "primaryReplica":"[concat(parameters('sqlVMName'),'1')]", - "secondaryReplica":"[concat(parameters('sqlVMName'),'0')]", - "dnsServerName":"[parameters('adPDCVMName')]", - "adminCreds":{ - "userName":"[parameters('adminUsername')]", - "password":"privateSettingsRef:adminPassword" - }, - "sqlServiceCreds":{ - "userName":"[parameters('sqlServerServiceAccountUserName')]", - "password":"privateSettingsRef:sqlServerServiceAccountPassword" - }, - "SQLAuthCreds":{ - "userName":"sqlsa", - "password":"privateSettingsRef:sqlAuthPassword" - }, - "NumberOfDisks":"[parameters('numberOfDisks')]", - "WorkloadType":"[parameters('workloadType')]" - } +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "sqlVMName": { + "type": "string" + }, + "location": { + "type": "string" + }, + "adminUsername": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "domainName": { + "type": "string" + }, + "sqlAOEPName": { + "type": "string" + }, + "sqlServerServiceAccountUserName": { + "type": "string" + }, + "sqlServerServiceAccountPassword": { + "type": "securestring" + }, + "createClusterModulesURL": { + "type": "string" + }, + "createClusterConfigurationFunction": { + "type": "string" + }, + "clusterName": { + "type": "string" + }, + "sharePath": { + "type": "string" + }, + "sqlAOAGName": { + "type": "string" + }, + "sqlAOListenerName": { + "type": "string" + }, + "sqlAOListenerPort": { + "type": "string" + }, + "sqlLBName": { + "type": "string" + }, + "sqlLBIPAddress": { + "type": "string" + }, + "adPDCVMName": { + "type": "string" + }, + "sqlwVMName": { + "type": "string" + }, + "numberOfDisks": { + "type": "string" + }, + "workloadType": { + "type": "string" + } + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('sqlVMName'),'1/configuringAlwaysOn')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.19", + "autoUpgradeMinorVersion": false, + "settings": { + "modulesURL": "[parameters('createClusterModulesURL')]", + "configurationFunction": "[parameters('createClusterConfigurationFunction')]", + "properties": { + "domainName": "[parameters('domainName')]", + "clusterName": "[parameters('clusterName')]", + "sharePath": "[concat('\\\\',parameters('sqlwVMName'),'\\',parameters('sharePath'))]", + "nodes": [ + "[concat(parameters('sqlVMName'),'0')]", + "[concat(parameters('sqlVMName'),'1')]" + ], + "sqlAlwaysOnEndpointName": "[parameters('sqlAOEPName')]", + "sqlAlwaysOnAvailabilityGroupName": "[parameters('sqlAOAGName')]", + "sqlAlwaysOnAvailabilityGroupListenerName": "[parameters('sqlAOListenerName')]", + "SqlAlwaysOnAvailabilityGroupListenerPort": "[parameters('sqlAOListenerPort')]", + "databaseNames": "AutoHa-sample", + "lbName": "[parameters('sqlLBName')]", + "lbAddress": "[parameters('sqlLBIPAddress')]", + "primaryReplica": "[concat(parameters('sqlVMName'),'1')]", + "secondaryReplica": "[concat(parameters('sqlVMName'),'0')]", + "dnsServerName": "[parameters('adPDCVMName')]", + "adminCreds": { + "userName": "[parameters('adminUsername')]", + "password": "privateSettingsRef:adminPassword" + }, + "sqlServiceCreds": { + "userName": "[parameters('sqlServerServiceAccountUserName')]", + "password": "privateSettingsRef:sqlServerServiceAccountPassword" + }, + "SQLAuthCreds": { + "userName": "sqlsa", + "password": "privateSettingsRef:sqlAuthPassword" }, - "protectedSettings":{ - "items":{ - "adminPassword":"[parameters('adminPassword')]", - "sqlServerServiceAccountPassword":"[parameters('sqlServerServiceAccountPassword')]", - "sqlAuthPassword":"[parameters('sqlServerServiceAccountPassword')]" - } - } - } + "NumberOfDisks": "[parameters('numberOfDisks')]", + "WorkloadType": "[parameters('workloadType')]" + } + }, + "protectedSettings": { + "items": { + "adminPassword": "[parameters('adminPassword')]", + "sqlServerServiceAccountPassword": "[parameters('sqlServerServiceAccountPassword')]", + "sqlAuthPassword": "[parameters('sqlServerServiceAccountPassword')]" + } + } } - ], - "outputs":{ - - } -} \ No newline at end of file + } + ], + "outputs": {} +} diff --git a/sqlvm-alwayson-cluster/nested/configuringBackupADVM.json b/sqlvm-alwayson-cluster/nested/configuringBackupADVM.json index 88484f822b3b..e852a2e332da 100644 --- a/sqlvm-alwayson-cluster/nested/configuringBackupADVM.json +++ b/sqlvm-alwayson-cluster/nested/configuringBackupADVM.json @@ -1,60 +1,58 @@ -{ - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "adBDCVMName":{ - "type":"string" - }, - "location":{ - "type":"string" - }, - "adminUsername":{ - "type":"string" - }, - "adminPassword":{ - "type":"securestring" - }, - "domainName":{ - "type":"string" - }, - "adBDCConfigurationFunction":{ - "type":"string" - }, - "adBDCModulesURL":{ - "type":"string" - } - }, - "resources":[ - { - "type":"Microsoft.Compute/virtualMachines/extensions", - "name":"[concat(parameters('adBDCVMName'),'/CreateBDC')]", - "apiVersion":"2015-06-15", - "location":"[parameters('location')]", - "properties":{ - "publisher":"Microsoft.Powershell", - "type":"DSC", - "typeHandlerVersion":"2.19", - "autoUpgradeMinorVersion":false, - "settings":{ - "modulesURL":"[parameters('adBDCModulesURL')]", - "configurationFunction": "[parameters('adBDCConfigurationFunction')]", - "properties":{ - "domainName":"[parameters('domainName')]", - "adminCreds":{ - "userName":"[parameters('adminUsername')]", - "password":"privateSettingsRef:adminPassword" - } - } - }, - "protectedSettings":{ - "items":{ - "adminPassword":"[parameters('adminPassword')]" - } +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adBDCVMName": { + "type": "string" + }, + "location": { + "type": "string" + }, + "adminUsername": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "domainName": { + "type": "string" + }, + "adBDCConfigurationFunction": { + "type": "string" + }, + "adBDCModulesURL": { + "type": "string" + } + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('adBDCVMName'),'/CreateBDC')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.19", + "autoUpgradeMinorVersion": false, + "settings": { + "modulesURL": "[parameters('adBDCModulesURL')]", + "configurationFunction": "[parameters('adBDCConfigurationFunction')]", + "properties": { + "domainName": "[parameters('domainName')]", + "adminCreds": { + "userName": "[parameters('adminUsername')]", + "password": "privateSettingsRef:adminPassword" } - } + } + }, + "protectedSettings": { + "items": { + "adminPassword": "[parameters('adminPassword')]" + } + } } - ], - "outputs":{ - - } -} \ No newline at end of file + } + ], + "outputs": {} +} diff --git a/sqlvm-alwayson-cluster/nested/creatingNICS.json b/sqlvm-alwayson-cluster/nested/creatingNICS.json index 07e4cc2aae91..63f2fb990c1f 100644 --- a/sqlvm-alwayson-cluster/nested/creatingNICS.json +++ b/sqlvm-alwayson-cluster/nested/creatingNICS.json @@ -173,4 +173,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/sqlvm-alwayson-cluster/nested/nic.json b/sqlvm-alwayson-cluster/nested/nic.json index 0712385f0817..752192233ca0 100644 --- a/sqlvm-alwayson-cluster/nested/nic.json +++ b/sqlvm-alwayson-cluster/nested/nic.json @@ -41,4 +41,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sqlvm-alwayson-cluster/nested/preparingSqlServer.json b/sqlvm-alwayson-cluster/nested/preparingSqlServer.json index 691e6e4f4c84..28fd41199366 100644 --- a/sqlvm-alwayson-cluster/nested/preparingSqlServer.json +++ b/sqlvm-alwayson-cluster/nested/preparingSqlServer.json @@ -1,218 +1,216 @@ -{ - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "sqlVMName":{ - "type":"string" - }, - "location":{ - "type":"string" - }, - "adminUsername":{ - "type":"string" - }, - "adminPassword":{ - "type":"securestring" - }, - "domainName":{ - "type":"string" - }, - "sqlAOPrepareModulesURL":{ - "type":"string" - }, - "sqlAOPrepareConfigurationFunction":{ - "type":"string" - }, - "sqlAOEPName":{ - "type":"string" - }, - "sqlServerServiceAccountUserName":{ - "type":"string" - }, - "sqlServerServiceAccountPassword":{ - "type":"securestring" - }, - "sharePath":{ - "type":"string" - }, - "adPDCVMName":{ - "type":"string" - }, - "sqlwVMName":{ - "type":"string" - }, - "fswModulesURL":{ - "type":"string" - }, - "fswConfigurationFunction":{ - "type":"string" - }, - "autoPatchingEnable":{ - "type":"bool" - }, - "autoPatchingDay":{ - "type":"string" - }, - "autoPatchingStartHour":{ - "type":"string" - }, - "numberOfDisks":{ - "type":"string" - }, - "workloadType":{ - "type":"string" +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "sqlVMName": { + "type": "string" + }, + "location": { + "type": "string" + }, + "adminUsername": { + "type": "string" + }, + "adminPassword": { + "type": "securestring" + }, + "domainName": { + "type": "string" + }, + "sqlAOPrepareModulesURL": { + "type": "string" + }, + "sqlAOPrepareConfigurationFunction": { + "type": "string" + }, + "sqlAOEPName": { + "type": "string" + }, + "sqlServerServiceAccountUserName": { + "type": "string" + }, + "sqlServerServiceAccountPassword": { + "type": "securestring" + }, + "sharePath": { + "type": "string" + }, + "adPDCVMName": { + "type": "string" + }, + "sqlwVMName": { + "type": "string" + }, + "fswModulesURL": { + "type": "string" + }, + "fswConfigurationFunction": { + "type": "string" + }, + "autoPatchingEnable": { + "type": "bool" + }, + "autoPatchingDay": { + "type": "string" + }, + "autoPatchingStartHour": { + "type": "string" + }, + "numberOfDisks": { + "type": "string" + }, + "workloadType": { + "type": "string" + } + }, + "variables": { + "Monday": "[mod(div(add(add(24,int(parameters('autoPatchingStartHour'))),2),24),7)]", + "Tuesday": "[mod(div(add(add(48,int(parameters('autoPatchingStartHour'))),2),24),7)]", + "Wednesday": "[mod(div(add(add(72,int(parameters('autoPatchingStartHour'))),2),24),7)]", + "Thursday": "[mod(div(add(add(96,int(parameters('autoPatchingStartHour'))),2),24),7)]", + "Friday": "[mod(div(add(add(120,int(parameters('autoPatchingStartHour'))),2),24),7)]", + "Saturday": "[mod(div(add(add(144,int(parameters('autoPatchingStartHour'))),2),24),7)]", + "Sunday": "[mod(div(add(add(168,int(parameters('autoPatchingStartHour'))),2),24),7)]", + "Never": "8", + "Everyday": "0", + "1": "Monday", + "2": "Tuesday", + "3": "Wednesday", + "4": "Thursday", + "5": "Friday", + "6": "Saturday", + "7": "Sunday", + "8": "Monday", + "0": "Everyday" + }, + "resources": [ + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('sqlwVMName'),'/CreateFileShareWitness')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.19", + "autoUpgradeMinorVersion": false, + "settings": { + "modulesURL": "[parameters('fswModulesURL')]", + "configurationFunction": "[parameters('fswConfigurationFunction')]", + "properties": { + "domainName": "[parameters('domainName')]", + "SharePath": "[parameters('sharePath')]", + "adminCreds": { + "userName": "[parameters('adminUsername')]", + "password": "privateSettingsRef:adminPassword" + } + } + }, + "protectedSettings": { + "items": { + "adminPassword": "[parameters('adminPassword')]" + } + } + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('sqlVMName'),'0/SqlVmIaasExtension')]", + "location": "[parameters('location')]", + "properties": { + "type": "SqlIaaSAgent", + "publisher": "Microsoft.SqlServer.Management", + "typeHandlerVersion": "1.2", + "autoUpgradeMinorVersion": "true", + "settings": { + "AutoTelemetrySettings": { + "Region": "[parameters('location')]" + }, + "AutoPatchingSettings": { + "PatchCategory": "WindowsMandatoryUpdates", + "Enable": "[parameters('autoPatchingEnable')]", + "DayOfWeek": "[parameters('autoPatchingDay')]", + "MaintenanceWindowStartingHour": "[int(parameters('autoPatchingStartHour'))]", + "MaintenanceWindowDuration": "60" + }, + "AutoBackupSettings": { + "Enable": false, + "RetentionPeriod": "30", + "EnableEncryption": false + } + } } - }, - "variables":{ - "Monday":"[mod(div(add(add(24,int(parameters('autoPatchingStartHour'))),2),24),7)]", - "Tuesday":"[mod(div(add(add(48,int(parameters('autoPatchingStartHour'))),2),24),7)]", - "Wednesday":"[mod(div(add(add(72,int(parameters('autoPatchingStartHour'))),2),24),7)]", - "Thursday":"[mod(div(add(add(96,int(parameters('autoPatchingStartHour'))),2),24),7)]", - "Friday":"[mod(div(add(add(120,int(parameters('autoPatchingStartHour'))),2),24),7)]", - "Saturday":"[mod(div(add(add(144,int(parameters('autoPatchingStartHour'))),2),24),7)]", - "Sunday":"[mod(div(add(add(168,int(parameters('autoPatchingStartHour'))),2),24),7)]", - "Never":"8", - "Everyday":"0", - "1":"Monday", - "2":"Tuesday", - "3":"Wednesday", - "4":"Thursday", - "5":"Friday", - "6":"Saturday", - "7":"Sunday", - "8":"Monday", - "0":"Everyday" - }, - "resources":[ - { - "type":"Microsoft.Compute/virtualMachines/extensions", - "name":"[concat(parameters('sqlwVMName'),'/CreateFileShareWitness')]", - "apiVersion":"2015-06-15", - "location":"[parameters('location')]", - "properties":{ - "publisher":"Microsoft.Powershell", - "type":"DSC", - "typeHandlerVersion":"2.19", - "autoUpgradeMinorVersion":false, - "settings":{ - "modulesURL":"[parameters('fswModulesURL')]", - "configurationFunction":"[parameters('fswConfigurationFunction')]", - "properties":{ - "domainName":"[parameters('domainName')]", - "SharePath":"[parameters('sharePath')]", - "adminCreds":{ - "userName":"[parameters('adminUsername')]", - "password":"privateSettingsRef:adminPassword" - } - } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('sqlVMName'),'1/SqlVmIaasExtension')]", + "location": "[parameters('location')]", + "properties": { + "type": "SqlIaaSAgent", + "publisher": "Microsoft.SqlServer.Management", + "typeHandlerVersion": "1.2", + "autoUpgradeMinorVersion": "true", + "settings": { + "AutoTelemetrySettings": { + "Region": "[parameters('location')]" + }, + "AutoPatchingSettings": { + "PatchCategory": "WindowsMandatoryUpdates", + "Enable": "[parameters('autoPatchingEnable')]", + "DayOfWeek": "[variables(string(variables(parameters('autoPatchingDay'))))]", + "MaintenanceWindowStartingHour": "[mod(add(int(parameters('autoPatchingStartHour')),2),24)]", + "MaintenanceWindowDuration": "60" + }, + "AutoBackupSettings": { + "Enable": false, + "RetentionPeriod": "30", + "EnableEncryption": false + } + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('sqlVMName'),'0/sqlAOPrepare')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',parameters('sqlwVMName'),'/extensions/CreateFileShareWitness')]", + "[concat('Microsoft.Compute/virtualMachines/',parameters('sqlVMName'),'0/extensions/SqlVmIaasExtension')]" + ], + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.19", + "autoUpgradeMinorVersion": false, + "settings": { + "modulesURL": "[parameters('sqlAOPrepareModulesURL')]", + "configurationFunction": "[parameters('sqlAOPrepareConfigurationFunction')]", + "properties": { + "domainName": "[parameters('domainName')]", + "sqlAlwaysOnEndpointName": "[parameters('sqlAOEPName')]", + "adminCreds": { + "userName": "[parameters('adminUsername')]", + "password": "privateSettingsRef:AdminPassword" }, - "protectedSettings":{ - "items":{ - "adminPassword":"[parameters('adminPassword')]" - } - } - } - }, - { - "apiVersion":"2015-06-15", - "type":"Microsoft.Compute/virtualMachines/extensions", - "name":"[concat(parameters('sqlVMName'),'0/SqlVmIaasExtension')]", - "location":"[parameters('location')]", - "properties":{ - "type":"SqlIaaSAgent", - "publisher":"Microsoft.SqlServer.Management", - "typeHandlerVersion":"1.2", - "autoUpgradeMinorVersion":"true", - "settings":{ - "AutoTelemetrySettings":{ - "Region":"[parameters('location')]" - }, - "AutoPatchingSettings":{ - "PatchCategory":"WindowsMandatoryUpdates", - "Enable":"[parameters('autoPatchingEnable')]", - "DayOfWeek":"[parameters('autoPatchingDay')]", - "MaintenanceWindowStartingHour":"[int(parameters('autoPatchingStartHour'))]", - "MaintenanceWindowDuration":"60" - }, - "AutoBackupSettings":{ - "Enable":false, - "RetentionPeriod":"30", - "EnableEncryption":false - } - } - } - }, - { - "apiVersion":"2015-06-15", - "type":"Microsoft.Compute/virtualMachines/extensions", - "name":"[concat(parameters('sqlVMName'),'1/SqlVmIaasExtension')]", - "location":"[parameters('location')]", - "properties":{ - "type":"SqlIaaSAgent", - "publisher":"Microsoft.SqlServer.Management", - "typeHandlerVersion":"1.2", - "autoUpgradeMinorVersion":"true", - "settings":{ - "AutoTelemetrySettings":{ - "Region":"[parameters('location')]" - }, - "AutoPatchingSettings":{ - "PatchCategory":"WindowsMandatoryUpdates", - "Enable":"[parameters('autoPatchingEnable')]", - "DayOfWeek":"[variables(string(variables(parameters('autoPatchingDay'))))]", - "MaintenanceWindowStartingHour":"[mod(add(int(parameters('autoPatchingStartHour')),2),24)]", - "MaintenanceWindowDuration":"60" - }, - "AutoBackupSettings":{ - "Enable":false, - "RetentionPeriod":"30", - "EnableEncryption":false - } - } - } - }, - { - "type":"Microsoft.Compute/virtualMachines/extensions", - "name":"[concat(parameters('sqlVMName'),'0/sqlAOPrepare')]", - "apiVersion":"2015-06-15", - "location":"[parameters('location')]", - "dependsOn":[ - "[concat('Microsoft.Compute/virtualMachines/',parameters('sqlwVMName'),'/extensions/CreateFileShareWitness')]", - "[concat('Microsoft.Compute/virtualMachines/',parameters('sqlVMName'),'0/extensions/SqlVmIaasExtension')]" - ], - "properties":{ - "publisher":"Microsoft.Powershell", - "type":"DSC", - "typeHandlerVersion":"2.19", - "autoUpgradeMinorVersion":false, - "settings":{ - "modulesURL":"[parameters('sqlAOPrepareModulesURL')]", - "configurationFunction":"[parameters('sqlAOPrepareConfigurationFunction')]", - "properties":{ - "domainName":"[parameters('domainName')]", - "sqlAlwaysOnEndpointName":"[parameters('sqlAOEPName')]", - "adminCreds":{ - "userName":"[parameters('adminUsername')]", - "password":"privateSettingsRef:AdminPassword" - }, - "sqlServiceCreds":{ - "userName":"[parameters('sqlServerServiceAccountUserName')]", - "password":"privateSettingsRef:SqlServerServiceAccountPassword" - }, - "NumberOfDisks":"[parameters('numberOfDisks')]", - "WorkloadType":"[parameters('workloadType')]" - } + "sqlServiceCreds": { + "userName": "[parameters('sqlServerServiceAccountUserName')]", + "password": "privateSettingsRef:SqlServerServiceAccountPassword" }, - "protectedSettings":{ - "items":{ - "adminPassword":"[parameters('adminPassword')]", - "sqlServerServiceAccountPassword":"[parameters('sqlServerServiceAccountPassword')]" - } - } - } + "NumberOfDisks": "[parameters('numberOfDisks')]", + "WorkloadType": "[parameters('workloadType')]" + } + }, + "protectedSettings": { + "items": { + "adminPassword": "[parameters('adminPassword')]", + "sqlServerServiceAccountPassword": "[parameters('sqlServerServiceAccountPassword')]" + } + } } - ], - "outputs":{ - - } -} \ No newline at end of file + } + ], + "outputs": {} +} diff --git a/sqlvm-alwayson-cluster/nested/provisioningNetworkStorageAGSet.json b/sqlvm-alwayson-cluster/nested/provisioningNetworkStorageAGSet.json index 67c61b1d446f..899455ac72e5 100644 --- a/sqlvm-alwayson-cluster/nested/provisioningNetworkStorageAGSet.json +++ b/sqlvm-alwayson-cluster/nested/provisioningNetworkStorageAGSet.json @@ -1,152 +1,150 @@ -{ - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "sqlStorageAccountName":{ - "type":"string" - }, - "dcStorageAccountName":{ - "type":"string" - }, - "location":{ - "type":"string" - }, - "SqlStorageAccountType":{ - "type":"string" - }, - "DcStorageAccountType":{ - "type":"string" - }, - "virtualNetworkName":{ - "type":"string" - }, - "virtualNetworkAddressRange":{ - "type":"string" - }, - "subnets":{ - "type":"array" - }, - "rdpIPAddressName":{ - "type":"string" - }, - "rdpLBName":{ - "type":"string" - }, - "rdpLBFE":{ - "type":"string" - }, - "adLBBE":{ - "type":"string" - }, - "RDPNAT":{ - "type":"string" - }, - "rdplbFEConfigID":{ - "type":"string" +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "sqlStorageAccountName": { + "type": "string" + }, + "dcStorageAccountName": { + "type": "string" + }, + "location": { + "type": "string" + }, + "SqlStorageAccountType": { + "type": "string" + }, + "DcStorageAccountType": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string" + }, + "virtualNetworkAddressRange": { + "type": "string" + }, + "subnets": { + "type": "array" + }, + "rdpIPAddressName": { + "type": "string" + }, + "rdpLBName": { + "type": "string" + }, + "rdpLBFE": { + "type": "string" + }, + "adLBBE": { + "type": "string" + }, + "RDPNAT": { + "type": "string" + }, + "rdplbFEConfigID": { + "type": "string" + } + }, + "resources": [ + { + "name": "[parameters('sqlStorageAccountName')]", + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2015-05-01-preview", + "location": "[parameters('location')]", + "properties": { + "accountType": "[parameters('SqlStorageAccountType')]" } - }, - "resources":[ - { - "name":"[parameters('sqlStorageAccountName')]", - "type":"Microsoft.Storage/storageAccounts", - "apiVersion":"2015-05-01-preview", - "location":"[parameters('location')]", - "properties":{ - "accountType":"[parameters('SqlStorageAccountType')]" - } - }, - { - "type":"Microsoft.Storage/storageAccounts", - "name":"[parameters('dcStorageAccountName')]", - "apiVersion":"2015-05-01-preview", - "location":"[parameters('location')]", - "properties":{ - "accountType":"[parameters('DcStorageAccountType')]" - } - }, - { - "type":"Microsoft.Storage/storageAccounts", - "name":"[concat(uniquestring(parameters('sqlStorageAccountName')), 'fsw')]", - "apiVersion":"2015-05-01-preview", - "location":"[parameters('location')]", - "properties":{ - "accountType":"Standard_LRS" - } - }, - { - "type":"Microsoft.Storage/storageAccounts", - "name":"[concat(uniquestring(parameters('sqlStorageAccountName')), 'diag')]", - "apiVersion":"2015-05-01-preview", - "location":"[parameters('location')]", - "properties":{ - "accountType":"Standard_LRS" - } - }, - { - "apiVersion":"2015-06-15", - "type":"Microsoft.Network/publicIPAddresses", - "name":"[parameters('rdpIPAddressName')]", - "location":"[parameters('location')]", - "properties":{ - "publicIPAllocationMethod":"dynamic" - } - }, - { - "apiVersion":"2015-06-15", - "name":"[parameters('rdpLBName')]", - "type":"Microsoft.Network/loadBalancers", - "location":"[parameters('location')]", - "dependsOn":[ - "[resourceId('Microsoft.Network/publicIPAddresses',parameters('rdpIPAddressName'))]" - ], - "properties":{ - "frontendIPConfigurations":[ - { - "name":"[parameters('rdpLBFE')]", - "properties":{ - "publicIPAddress":{ - "id":"[resourceId('Microsoft.Network/publicIPAddresses',parameters('rdpIPAddressName'))]" - } - } - } - ], - "backendAddressPools":[ - { - "name":"[parameters('adLBBE')]" - } - ], - "inboundNatRules":[ - { - "name":"[parameters('RDPNAT')]", - "properties":{ - "frontendIPConfiguration":{ - "id":"[parameters('rdplbFEConfigID')]" - }, - "protocol":"tcp", - "frontendPort":3389, - "backendPort":3389, - "enableFloatingIP":false - } - } - ] - } - }, - { - "name":"[parameters('virtualNetworkName')]", - "type":"Microsoft.Network/virtualNetworks", - "location":"[parameters('location')]", - "apiVersion":"2015-06-15", - "properties":{ - "addressSpace":{ - "addressPrefixes":[ - "[parameters('virtualNetworkAddressRange')]" - ] - }, - "subnets":"[parameters('subnets')]" - } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('dcStorageAccountName')]", + "apiVersion": "2015-05-01-preview", + "location": "[parameters('location')]", + "properties": { + "accountType": "[parameters('DcStorageAccountType')]" } - ], - "outputs":{ - - } -} \ No newline at end of file + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[concat(uniquestring(parameters('sqlStorageAccountName')), 'fsw')]", + "apiVersion": "2015-05-01-preview", + "location": "[parameters('location')]", + "properties": { + "accountType": "Standard_LRS" + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[concat(uniquestring(parameters('sqlStorageAccountName')), 'diag')]", + "apiVersion": "2015-05-01-preview", + "location": "[parameters('location')]", + "properties": { + "accountType": "Standard_LRS" + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[parameters('rdpIPAddressName')]", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "dynamic" + } + }, + { + "apiVersion": "2015-06-15", + "name": "[parameters('rdpLBName')]", + "type": "Microsoft.Network/loadBalancers", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses',parameters('rdpIPAddressName'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "[parameters('rdpLBFE')]", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('rdpIPAddressName'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[parameters('adLBBE')]" + } + ], + "inboundNatRules": [ + { + "name": "[parameters('RDPNAT')]", + "properties": { + "frontendIPConfiguration": { + "id": "[parameters('rdplbFEConfigID')]" + }, + "protocol": "tcp", + "frontendPort": 3389, + "backendPort": 3389, + "enableFloatingIP": false + } + } + ] + } + }, + { + "name": "[parameters('virtualNetworkName')]", + "type": "Microsoft.Network/virtualNetworks", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressRange')]" + ] + }, + "subnets": "[parameters('subnets')]" + } + } + ], + "outputs": {} +} diff --git a/sqlvm-alwayson-cluster/nested/provisioningVM1.json b/sqlvm-alwayson-cluster/nested/provisioningVM1.json index 5f04d67268f7..86f916f47f6d 100644 --- a/sqlvm-alwayson-cluster/nested/provisioningVM1.json +++ b/sqlvm-alwayson-cluster/nested/provisioningVM1.json @@ -406,7 +406,5 @@ } } ], - "outputs": { - - } -} \ No newline at end of file + "outputs": {} +} diff --git a/sqlvm-alwayson-cluster/nested/provisioningVM2.json b/sqlvm-alwayson-cluster/nested/provisioningVM2.json index 2e19d984aba1..770076ead741 100644 --- a/sqlvm-alwayson-cluster/nested/provisioningVM2.json +++ b/sqlvm-alwayson-cluster/nested/provisioningVM2.json @@ -416,7 +416,5 @@ } } ], - "outputs": { - - } -} \ No newline at end of file + "outputs": {} +} diff --git a/sqlvm-alwayson-cluster/nested/provisioningVM3.json b/sqlvm-alwayson-cluster/nested/provisioningVM3.json index e32d1940e81b..c94243d0dc58 100644 --- a/sqlvm-alwayson-cluster/nested/provisioningVM3.json +++ b/sqlvm-alwayson-cluster/nested/provisioningVM3.json @@ -427,4 +427,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/sqlvm-alwayson-cluster/nested/provisioningVM4.json b/sqlvm-alwayson-cluster/nested/provisioningVM4.json index 8a27d80fd33f..6577bbb4545e 100644 --- a/sqlvm-alwayson-cluster/nested/provisioningVM4.json +++ b/sqlvm-alwayson-cluster/nested/provisioningVM4.json @@ -437,4 +437,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/sqlvm-alwayson-cluster/nested/publicip-rdp.json b/sqlvm-alwayson-cluster/nested/publicip-rdp.json index 7743078da351..d157b1af5522 100644 --- a/sqlvm-alwayson-cluster/nested/publicip-rdp.json +++ b/sqlvm-alwayson-cluster/nested/publicip-rdp.json @@ -11,17 +11,17 @@ "rdpLBName": { "type": "string" }, - "rdpLBFE" : { + "rdpLBFE": { "type": "string" }, - "adLBBE" : { + "adLBBE": { "type": "string" }, - "RDPNAT" : { - "type" : "string" + "RDPNAT": { + "type": "string" }, - "rdplbFEConfigID" : { - "type" : "string" + "rdplbFEConfigID": { + "type": "string" } }, "resources": [ @@ -35,46 +35,45 @@ } }, { - "apiVersion": "2015-06-15", - "name": "[parameters('rdpLBName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[parameters('location')]", - "dependsOn": [ - "[resourceId('Microsoft.Network/publicIPAddresses',parameters('rdpIPAddressName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[parameters('rdpLBFE')]", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('rdpIPAddressName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[parameters('adLBBE')]" - - } - ], - "inboundNatRules": [ - { - "name": "[parameters('RDPNAT')]", - "properties": { - "frontendIPConfiguration": { - "id": "[parameters('rdplbFEConfigID')]" - }, - "protocol": "tcp", - "frontendPort": 3389, - "backendPort": 3389, - "enableFloatingIP": false - } - } - ] - } - } + "apiVersion": "2015-06-15", + "name": "[parameters('rdpLBName')]", + "type": "Microsoft.Network/loadBalancers", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses',parameters('rdpIPAddressName'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "[parameters('rdpLBFE')]", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('rdpIPAddressName'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[parameters('adLBBE')]" + } + ], + "inboundNatRules": [ + { + "name": "[parameters('RDPNAT')]", + "properties": { + "frontendIPConfiguration": { + "id": "[parameters('rdplbFEConfigID')]" + }, + "protocol": "tcp", + "frontendPort": 3389, + "backendPort": 3389, + "enableFloatingIP": false + } + } + ] + } + } ], "outputs": { "resourceId": { @@ -82,4 +81,4 @@ "value": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('rdpIPAddressName'))]" } } -} \ No newline at end of file +} diff --git a/sqlvm-alwayson-cluster/nested/setupLBs.json b/sqlvm-alwayson-cluster/nested/setupLBs.json index 76f1e26e3330..d10fbd16e95b 100644 --- a/sqlvm-alwayson-cluster/nested/setupLBs.json +++ b/sqlvm-alwayson-cluster/nested/setupLBs.json @@ -1,94 +1,94 @@ -{ - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "location":{ - "type":"string" - }, - "sqlLBName":{ - "type":"string" - }, - "sqlLBFE":{ - "type":"string" - }, - "sqlLBIPAddress":{ - "type":"string" - }, - "staticSubnetRef":{ - "type":"string" - }, - "sqlLBBE":{ - "type":"string" - }, - "sqlLBBEID":{ - "type":"string" - }, - "sqllbFEConfigID":{ - "type":"string" - }, - "sqllbProbeID":{ - "type":"string" - }, - "SQLAOProbe":{ - "type":"string" +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "sqlLBName": { + "type": "string" + }, + "sqlLBFE": { + "type": "string" + }, + "sqlLBIPAddress": { + "type": "string" + }, + "staticSubnetRef": { + "type": "string" + }, + "sqlLBBE": { + "type": "string" + }, + "sqlLBBEID": { + "type": "string" + }, + "sqllbFEConfigID": { + "type": "string" + }, + "sqllbProbeID": { + "type": "string" + }, + "SQLAOProbe": { + "type": "string" + } + }, + "resources": [ + { + "apiVersion": "2015-06-15", + "name": "[parameters('sqlLBName')]", + "type": "Microsoft.Network/loadBalancers", + "location": "[parameters('location')]", + "properties": { + "frontendIPConfigurations": [ + { + "name": "[parameters('sqlLBFE')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[parameters('sqlLBIPAddress')]", + "subnet": { + "id": "[parameters('staticSubnetRef')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[parameters('sqlLBBE')]" + } + ], + "loadBalancingRules": [ + { + "name": "SQLAlwaysOnEndPointListener", + "properties": { + "backendAddressPool": { + "id": "[parameters('sqlLBBEID')]" + }, + "frontendIPConfiguration": { + "id": "[parameters('sqllbFEConfigID')]" + }, + "probe": { + "id": "[parameters('sqllbProbeID')]" + }, + "protocol": "tcp", + "frontendPort": 1433, + "backendPort": 1433, + "enableFloatingIP": true + } + } + ], + "probes": [ + { + "name": "[parameters('SQLAOProbe')]", + "properties": { + "protocol": "tcp", + "port": 59999, + "intervalInSeconds": "5", + "numberOfProbes": "2" + } + } + ] } - }, - "resources":[ - { - "apiVersion":"2015-06-15", - "name":"[parameters('sqlLBName')]", - "type":"Microsoft.Network/loadBalancers", - "location":"[parameters('location')]", - "properties":{ - "frontendIPConfigurations":[ - { - "name":"[parameters('sqlLBFE')]", - "properties":{ - "privateIPAllocationMethod":"Static", - "privateIPAddress":"[parameters('sqlLBIPAddress')]", - "subnet":{ - "id":"[parameters('staticSubnetRef')]" - } - } - } - ], - "backendAddressPools":[ - { - "name":"[parameters('sqlLBBE')]" - } - ], - "loadBalancingRules":[ - { - "name":"SQLAlwaysOnEndPointListener", - "properties":{ - "backendAddressPool":{ - "id":"[parameters('sqlLBBEID')]" - }, - "frontendIPConfiguration":{ - "id":"[parameters('sqllbFEConfigID')]" - }, - "probe":{ - "id":"[parameters('sqllbProbeID')]" - }, - "protocol":"tcp", - "frontendPort":1433, - "backendPort":1433, - "enableFloatingIP":true - } - } - ], - "probes":[ - { - "name":"[parameters('SQLAOProbe')]", - "properties":{ - "protocol":"tcp", - "port":59999, - "intervalInSeconds":"5", - "numberOfProbes":"2" - } - } - ] - } - } - ] -} \ No newline at end of file + } + ] +} diff --git a/sqlvm-alwayson-cluster/nested/storageAccountVirtualNetworkPublicIP.json b/sqlvm-alwayson-cluster/nested/storageAccountVirtualNetworkPublicIP.json index 492fb5b22e62..209660825e55 100644 --- a/sqlvm-alwayson-cluster/nested/storageAccountVirtualNetworkPublicIP.json +++ b/sqlvm-alwayson-cluster/nested/storageAccountVirtualNetworkPublicIP.json @@ -128,4 +128,4 @@ } ], "outputs": {} -} \ No newline at end of file +} diff --git a/sqlvm-alwayson-cluster/nested/vnet-new.json b/sqlvm-alwayson-cluster/nested/vnet-new.json index 622af4e83836..6e2b45727bc6 100644 --- a/sqlvm-alwayson-cluster/nested/vnet-new.json +++ b/sqlvm-alwayson-cluster/nested/vnet-new.json @@ -16,19 +16,19 @@ } }, "resources": [ - { - "name": "[parameters('virtualNetworkName')]", - "type": "Microsoft.Network/virtualNetworks", - "location": "[parameters('location')]", - "apiVersion": "2015-06-15", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[parameters('virtualNetworkAddressRange')]" - ] - }, - "subnets": "[parameters('subnets')]" + { + "name": "[parameters('virtualNetworkName')]", + "type": "Microsoft.Network/virtualNetworks", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressRange')]" + ] + }, + "subnets": "[parameters('subnets')]" + } } - } ] -} \ No newline at end of file +} diff --git a/sqlvm-alwayson-cluster/nested/vnet-with-dns-server.json b/sqlvm-alwayson-cluster/nested/vnet-with-dns-server.json index 5a500321d524..083baa2681eb 100644 --- a/sqlvm-alwayson-cluster/nested/vnet-with-dns-server.json +++ b/sqlvm-alwayson-cluster/nested/vnet-with-dns-server.json @@ -53,4 +53,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sqlvm-provisioning-csp/azuredeploy.json b/sqlvm-provisioning-csp/azuredeploy.json index 92fa553608fd..cba7bf62601e 100644 --- a/sqlvm-provisioning-csp/azuredeploy.json +++ b/sqlvm-provisioning-csp/azuredeploy.json @@ -104,6 +104,13 @@ "metadata": { "description": "DNS name for the VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -117,7 +124,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageType')]" } @@ -126,7 +133,7 @@ "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2015-05-01-preview", "name": "[parameters('publicDnsName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -138,7 +145,7 @@ "type": "Microsoft.Network/virtualNetworks", "apiVersion": "2015-05-01-preview", "name": "[parameters('vnetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -159,7 +166,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('vmnic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('publicDnsName'))]", "[concat('Microsoft.Network/virtualNetworks/', parameters('vnetName'))]" @@ -185,7 +192,7 @@ "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2015-05-01-preview", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('storageName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('vmnic'))]" diff --git a/stampery-trailbot-ubuntu/azuredeploy.json b/stampery-trailbot-ubuntu/azuredeploy.json index 417002ee6398..9e77f3a3118d 100644 --- a/stampery-trailbot-ubuntu/azuredeploy.json +++ b/stampery-trailbot-ubuntu/azuredeploy.json @@ -45,6 +45,13 @@ "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": { @@ -75,7 +82,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -84,7 +91,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -96,7 +103,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -117,7 +124,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -143,7 +150,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -191,7 +198,7 @@ { "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" @@ -210,4 +217,4 @@ } } ] -} \ No newline at end of file +} diff --git a/steelscript-appfwkdev-linux/azuredeploy.json b/steelscript-appfwkdev-linux/azuredeploy.json index 7d461a31c3a2..9b07672456da 100644 --- a/steelscript-appfwkdev-linux/azuredeploy.json +++ b/steelscript-appfwkdev-linux/azuredeploy.json @@ -1,291 +1,298 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.25", - "parameters": { - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/steelscript-appfwkdev-linux" - }, - "_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": "" - }, - "virtualMachineSize": { - "type": "string", - "defaultValue": "Standard_D2_v2", - "metadata": { - "description": "The VM size." - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.25", + "parameters": { + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/steelscript-appfwkdev-linux" + }, + "_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": "" + }, + "virtualMachineSize": { + "type": "string", + "defaultValue": "Standard_D2_v2", + "metadata": { + "description": "The VM size." + } + }, + "linuxImage": { + "type": "object", + "defaultValue": { + "Publisher": "OpenLogic", + "Offer": "Centos", + "Sku": "7.3" + }, + "allowedValues": [ + { + "Publisher": "OpenLogic", + "Offer": "Centos", + "Sku": "7.3" }, - "linuxImage": { - "type": "object", - "defaultValue": { - "Publisher": "OpenLogic", - "Offer": "Centos", - "Sku": "7.3" - }, - "allowedValues": [ - { - "Publisher": "OpenLogic", - "Offer": "Centos", - "Sku": "7.3" - }, - { - "Publisher": "OpenLogic", - "Offer": "Centos", - "Sku": "7.0" - }, - { - "Publisher": "Canonical", - "Offer": "UbuntuServer", - "Sku": "17.04" - } - ], - "metadata": { - "description": "The linux sku image for the VM, among those tested." - } + { + "Publisher": "OpenLogic", + "Offer": "Centos", + "Sku": "7.0" }, - "adminPublicKey": { - "type": "string", - "metadata": { - "description": "The SSH public key to authenticate on the VM using the vm login (see VM login output). Example: ssh-rsa KKKKKKKKKK..." - } + { + "Publisher": "Canonical", + "Offer": "UbuntuServer", + "Sku": "17.04" } + ], + "metadata": { + "description": "The linux sku image for the VM, among those tested." + } }, - "variables": { - "appPrefix": "ssappfwkdev", - "appName": "[concat(variables('appPrefix'),'-',uniquestring(resourceGroup().id))]", - "appServerTcpPort": "8000", - "vnetId": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", - "virtualNetworkName": "[concat(variables('appPrefix'),'-vnet')]", - "addressPrefix": "10.0.0.0/16", - "subnetName": "[concat(variables('appPrefix'),'-subnet')]", - "subnetPrefix": "10.0.0.0/24", - "subnetRef": "[concat(variables('vnetId'), '/subnets/', variables('subnetName'))]", - "dnsLabelPrefix": "[variables('appName')]", - "publicIPAddressType": "Dynamic", - "publicIpAddressName": "[concat(variables('appPrefix'),'-pip')]", - "networkInterfaceName": "[concat(variables('appPrefix'),'-nic')]", - "networkSecurityGroupName": "[concat(variables('appPrefix'),'-nsg')]", - "virtualMachineName": "[concat(variables('appPrefix'),'-vm')]", - "adminUsername": "[concat(variables('appPrefix'),'-admin')]", - "vhdStorageType": "Standard_LRS", - "diagnosticsStorageAccountName": "[concat('diag',uniqueString(resourceGroup().id))]", - "extensionName": "install-ssappfwkdev-script", - "ScriptFolder": "scripts", - "ScriptFileName": "install-ssappfwkdev.sh" + "adminPublicKey": { + "type": "string", + "metadata": { + "description": "The SSH public key to authenticate on the VM using the vm login (see VM login output). Example: ssh-rsa KKKKKKKKKK..." + } }, - "resources": [ - { - "name": "[variables('virtualNetworkName')]", - "type": "Microsoft.Network/virtualNetworks", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "appPrefix": "ssappfwkdev", + "appName": "[concat(variables('appPrefix'),'-',uniquestring(resourceGroup().id))]", + "appServerTcpPort": "8000", + "vnetId": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", + "virtualNetworkName": "[concat(variables('appPrefix'),'-vnet')]", + "addressPrefix": "10.0.0.0/16", + "subnetName": "[concat(variables('appPrefix'),'-subnet')]", + "subnetPrefix": "10.0.0.0/24", + "subnetRef": "[concat(variables('vnetId'), '/subnets/', variables('subnetName'))]", + "dnsLabelPrefix": "[variables('appName')]", + "publicIPAddressType": "Dynamic", + "publicIpAddressName": "[concat(variables('appPrefix'),'-pip')]", + "networkInterfaceName": "[concat(variables('appPrefix'),'-nic')]", + "networkSecurityGroupName": "[concat(variables('appPrefix'),'-nsg')]", + "virtualMachineName": "[concat(variables('appPrefix'),'-vm')]", + "adminUsername": "[concat(variables('appPrefix'),'-admin')]", + "vhdStorageType": "Standard_LRS", + "diagnosticsStorageAccountName": "[concat('diag',uniqueString(resourceGroup().id))]", + "extensionName": "install-ssappfwkdev-script", + "ScriptFolder": "scripts", + "ScriptFileName": "install-ssappfwkdev.sh" + }, + "resources": [ + { + "name": "[variables('virtualNetworkName')]", + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] + "addressPrefix": "[variables('subnetPrefix')]" } - }, - { - "name": "[variables('publicIpAddressName')]", - "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", + } + ] + } + }, + { + "name": "[variables('publicIpAddressName')]", + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "[variables('publicIpAddressType')]", + "dnsSettings": { + "domainNameLabel": "[variables('dnsLabelPrefix')]" + } + } + }, + { + "name": "[variables('networkSecurityGroupName')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "default-allow-ssh", "properties": { - "publicIPAllocationMethod": "[variables('publicIpAddressType')]", - "dnsSettings": { - "domainNameLabel": "[variables('dnsLabelPrefix')]" - } + "priority": 1000, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "22", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } - }, - { - "name": "[variables('networkSecurityGroupName')]", - "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", + }, + { + "name": "[variables('appPrefix')]", "properties": { - "securityRules": [ - { - "name": "default-allow-ssh", - "properties": { - "priority": 1000, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "22", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "[variables('appPrefix')]", - "properties": { - "priority": 1010, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "[variables('appServerTcpPort')]", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - } - ] + "priority": 1010, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "[variables('appServerTcpPort')]", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } - }, - { - "name": "[variables('networkInterfaceName')]", - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2017-04-01", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", - "[concat('Microsoft.Network/publicIpAddresses/', variables('publicIpAddressName'))]", - "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" - ], + } + ] + } + }, + { + "name": "[variables('networkInterfaceName')]", + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2017-04-01", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", + "[concat('Microsoft.Network/publicIpAddresses/', variables('publicIpAddressName'))]", + "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "subnet": { - "id": "[variables('subnetRef')]" - }, - "privateIPAllocationMethod": "Dynamic", - "publicIpAddress": { - "id": "[resourceId('Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]" - } - } - } - ], - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + "subnet": { + "id": "[variables('subnetRef')]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId('Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]" + } + } + } + ], + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('diagnosticsStorageAccountName')]", + "apiVersion": "2017-06-01", + "location": "[parameters('location')]", + "sku": { + "name": "[variables('vhdStorageType')]" + }, + "kind": "Storage", + "properties": {} + }, + { + "name": "[variables('virtualMachineName')]", + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName'))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]" + ], + "properties": { + "osProfile": { + "computerName": "[variables('virtualMachineName')]", + "adminUsername": "[variables('adminUsername')]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[concat('/home/', variables('adminUsername'), '/.ssh/authorized_keys')]", + "keyData": "[parameters('adminPublicKey')]" } + ] } + } }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('diagnosticsStorageAccountName')]", - "apiVersion": "2017-06-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "[variables('vhdStorageType')]" - }, - "kind": "Storage", - "properties": {} + "hardwareProfile": { + "vmSize": "[parameters('virtualMachineSize')]" }, - { - "name": "[variables('virtualMachineName')]", - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]" - ], - "properties": { - "osProfile": { - "computerName": "[variables('virtualMachineName')]", - "adminUsername": "[variables('adminUsername')]", - "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "path": "[concat('/home/', variables('adminUsername'), '/.ssh/authorized_keys')]", - "keyData": "[parameters('adminPublicKey')]" - } - ] - } - } - }, - "hardwareProfile": { - "vmSize": "[parameters('virtualMachineSize')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('linuxImage').Publisher]", - "offer": "[parameters('linuxImage').Offer]", - "sku": "[parameters('linuxImage').Sku]", - "version": "latest" - }, - "osDisk": { - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "[variables('vhdStorageType')]" - } - }, - "dataDisks": [] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName')), '2016-01-01').primaryEndpoints.blob)]" - } - } + "storageProfile": { + "imageReference": { + "publisher": "[parameters('linuxImage').Publisher]", + "offer": "[parameters('linuxImage').Offer]", + "sku": "[parameters('linuxImage').Sku]", + "version": "latest" + }, + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[variables('vhdStorageType')]" } + }, + "dataDisks": [] }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('virtualMachineName'),'/', variables('extensionName'))]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'))]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'), '/', variables('ScriptFolder'), '/', variables('ScriptFileName'), parameters('_artifactsLocationSasToken'))]" - ] - }, - "protectedSettings": { - "commandToExecute": "[concat('./',variables('ScriptFileName'))]" - } + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]" } - } - ], - "outputs": { - "ssh command": { - "type": "string", - "value": "[concat('ssh ',variables('adminUsername'),'@',reference(concat('Microsoft.Network/publicIPAddresses/', variables('publicIpAddressName'))).dnsSettings.fqdn)]" + ] }, - "URL": { - "type": "string", - "value": "[concat('http://',reference(concat('Microsoft.Network/publicIPAddresses/', variables('publicIpAddressName'))).dnsSettings.fqdn,':',variables('appServerTcpPort'))]" + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName')), '2016-01-01').primaryEndpoints.blob)]" + } + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('virtualMachineName'),'/', variables('extensionName'))]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'))]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'), '/', variables('ScriptFolder'), '/', variables('ScriptFileName'), parameters('_artifactsLocationSasToken'))]" + ] }, - "Credentials": { - "type": "string", - "value": "admin / admin" + "protectedSettings": { + "commandToExecute": "[concat('./',variables('ScriptFileName'))]" } + } + } + ], + "outputs": { + "ssh command": { + "type": "string", + "value": "[concat('ssh ',variables('adminUsername'),'@',reference(concat('Microsoft.Network/publicIPAddresses/', variables('publicIpAddressName'))).dnsSettings.fqdn)]" + }, + "URL": { + "type": "string", + "value": "[concat('http://',reference(concat('Microsoft.Network/publicIPAddresses/', variables('publicIpAddressName'))).dnsSettings.fqdn,':',variables('appServerTcpPort'))]" + }, + "Credentials": { + "type": "string", + "value": "admin / admin" } + } } diff --git a/storage-iops-latency-throughput-demo/azuredeploy.json b/storage-iops-latency-throughput-demo/azuredeploy.json index b167a36a4ee0..1fed03c2f0da 100644 --- a/storage-iops-latency-throughput-demo/azuredeploy.json +++ b/storage-iops-latency-throughput-demo/azuredeploy.json @@ -43,14 +43,27 @@ "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": { "vNetPrefix": "10.0.0.0/16", "vNetSubnet1Name": "subnet-01", "vNetSubnet1Prefix": "10.0.0.0/24", - "storageAccountType": [ "Premium_LRS", "Standard_LRS" ], - "storageAccountNamePrefix": [ "premium", "standard" ], + "storageAccountType": [ + "Premium_LRS", + "Standard_LRS" + ], + "storageAccountNamePrefix": [ + "premium", + "standard" + ], "vmImagePublisher": "MicrosoftWindowsServer", "vm1ImageOffer": "WindowsServer", "vmOSDiskName": "[concat(variables('vmName'),'-','OSDisk')]", @@ -63,13 +76,12 @@ "vmPIPName": "[concat(variables('vmName'),'-PIP')]", "dscResourceFolder": "dsc", "dscResourceConfig": "vmDemo" - }, "resources": [ { "name": "[concat(variables('storageAccountNamePrefix')[copyIndex()],uniqueString(resourceGroup().id))]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "copy": { "count": "[length(variables('storageAccountType'))]", @@ -86,7 +98,7 @@ { "name": "[parameters('vNetName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [], "tags": { @@ -111,7 +123,7 @@ { "name": "[variables('vmNicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks', parameters('vNetName'))]", @@ -140,7 +152,7 @@ { "name": "[variables('vmName')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "storageAccountCopy", @@ -228,7 +240,7 @@ { "name": "DSC", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" @@ -251,8 +263,7 @@ "nodeName": "[variables('vmName')]" } }, - "protectedSettings": { - } + "protectedSettings": {} } } ] @@ -260,7 +271,7 @@ { "name": "[variables('vmPIPName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [], "tags": { @@ -273,12 +284,11 @@ } } } - ], "outputs": { "vmURI": { "type": "string", "value": "[reference(variables('vmPIPName')).dnsSettings.fqdn]" - } + } } } diff --git a/storage-iops-latency-throughput-demo/sample-managed-disks/managedDisksDemo.json b/storage-iops-latency-throughput-demo/sample-managed-disks/managedDisksDemo.json index a4272e4624f7..7ba50133d07c 100644 --- a/storage-iops-latency-throughput-demo/sample-managed-disks/managedDisksDemo.json +++ b/storage-iops-latency-throughput-demo/sample-managed-disks/managedDisksDemo.json @@ -35,6 +35,13 @@ "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": { @@ -42,10 +49,25 @@ "vNetPrefix": "10.0.0.0/16", "vNetSubnet1Name": "subnet-01", "vNetSubnet1Prefix": "10.0.0.0/24", - "diskName": [ "[concat(variables('vmName'),'-standard','-01')]", "[concat(variables('vmName'),'-standard','-02')]", "[concat(variables('vmName'),'-standard','-03')]", "[concat(variables('vmName'),'-premium','-01')]" ], + "diskName": [ + "[concat(variables('vmName'),'-standard','-01')]", + "[concat(variables('vmName'),'-standard','-02')]", + "[concat(variables('vmName'),'-standard','-03')]", + "[concat(variables('vmName'),'-premium','-01')]" + ], "diskCreateOption": "empty", - "diskAccountType": [ "Standard_LRS", "Standard_LRS", "Standard_LRS", "Premium_LRS" ], - "diskSizeGB": [ "100", "100", "100", "1023" ], + "diskAccountType": [ + "Standard_LRS", + "Standard_LRS", + "Standard_LRS", + "Premium_LRS" + ], + "diskSizeGB": [ + "100", + "100", + "100", + "1023" + ], "vmImagePublisher": "MicrosoftWindowsServer", "vmImageOffer": "WindowsServer", "vmOSDiskName": "[concat(variables('vmName'),'-','OSDisk')]", @@ -53,18 +75,16 @@ "vmName": "demo-01", "vmWindowsOSVersion": "2016-Datacenter", "vmSubnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNetName'), variables('vNetSubnet1Name'))]", - "vmContainerName": "vhds", "vmNicName": "[concat(variables('vmName'),'-nic-','0')]", "vmPIPName": "[concat(variables('vmName'),'-PIP')]", "dscResourceFolder": "dsc", "dscResourceConfig": "vmDemo" - }, "resources": [ { "name": "[variables('vNetName')]", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [], "tags": { @@ -89,7 +109,7 @@ { "name": "[variables('vmNicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks', variables('vNetName'))]", @@ -119,7 +139,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/disks", "name": "[variables('diskName')[copyIndex()]]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "diskCopy", "count": "[length(variables('diskName'))]" @@ -135,7 +155,7 @@ { "name": "[variables('vmName')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-04-30-preview", "dependsOn": [ "diskCopy", @@ -216,7 +236,7 @@ { "name": "DSC", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" @@ -239,8 +259,7 @@ "nodeName": "[variables('vmName')]" } }, - "protectedSettings": { - } + "protectedSettings": {} } } ] @@ -248,7 +267,7 @@ { "name": "[variables('vmPIPName')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2016-03-30", "dependsOn": [], "tags": { @@ -261,12 +280,11 @@ } } } - ], "outputs": { "vmURI": { "type": "string", "value": "[reference(variables('vmPIPName')).dnsSettings.fqdn]" - } + } } } diff --git a/symantec-extension-windows-vm/azuredeploy.json b/symantec-extension-windows-vm/azuredeploy.json index a40b21c355a5..c38f6a4b894b 100644 --- a/symantec-extension-windows-vm/azuredeploy.json +++ b/symantec-extension-windows-vm/azuredeploy.json @@ -109,6 +109,13 @@ "metadata": { "description": "Extension name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -121,7 +128,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -130,7 +137,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[parameters('publicIPAddressType')]" } @@ -139,7 +146,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -160,7 +167,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[parameters('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" @@ -186,7 +193,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]" @@ -229,7 +236,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/', parameters('vmExtensionName'))]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], diff --git a/tfs-basic-domain/azuredeploy.json b/tfs-basic-domain/azuredeploy.json index d629309ceab3..2f843b675af7 100644 --- a/tfs-basic-domain/azuredeploy.json +++ b/tfs-basic-domain/azuredeploy.json @@ -47,6 +47,13 @@ "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": { @@ -62,7 +69,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -71,7 +78,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vNetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -92,7 +99,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('networkInterfaceName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIpName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('vNetName'))]" @@ -118,7 +125,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]" ], @@ -157,7 +164,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/CreateDC')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', parameters('vmName'))]" ], @@ -188,7 +195,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/ConfigureTfs')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('vmName'), 'CreateDC')]" ], @@ -208,4 +215,4 @@ } } ] -} \ No newline at end of file +} diff --git a/tfs-basic-workgroup/azuredeploy.json b/tfs-basic-workgroup/azuredeploy.json index 38bdc81313e9..088e9d85083e 100644 --- a/tfs-basic-workgroup/azuredeploy.json +++ b/tfs-basic-workgroup/azuredeploy.json @@ -41,6 +41,13 @@ "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": { @@ -56,7 +63,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -65,7 +72,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vNetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -86,7 +93,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('networkInterfaceName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIpName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('vNetName'))]" @@ -112,7 +119,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]" ], @@ -151,7 +158,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/ConfigureTfs')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -174,4 +181,4 @@ } } ] -} \ No newline at end of file +} diff --git a/tfs-dual-server/azuredeploy.json b/tfs-dual-server/azuredeploy.json index f34ecb2da09a..c5c3857395dc 100644 --- a/tfs-dual-server/azuredeploy.json +++ b/tfs-dual-server/azuredeploy.json @@ -40,6 +40,13 @@ "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": { @@ -297,4 +304,4 @@ } } ] -} \ No newline at end of file +} diff --git a/tfs-dual-server/nestedtemplates/domainController.json b/tfs-dual-server/nestedtemplates/domainController.json index d14312d160c2..6d79e5cfda03 100644 --- a/tfs-dual-server/nestedtemplates/domainController.json +++ b/tfs-dual-server/nestedtemplates/domainController.json @@ -80,6 +80,13 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -92,7 +99,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('networkInterfaceName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -122,7 +129,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]" ], @@ -164,7 +171,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/CreateDC')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', parameters('vmName'))]" ], @@ -192,4 +199,4 @@ } } ] -} \ No newline at end of file +} diff --git a/tfs-dual-server/nestedtemplates/sqlServer.json b/tfs-dual-server/nestedtemplates/sqlServer.json index a30492dc4009..66eb5cab0af4 100644 --- a/tfs-dual-server/nestedtemplates/sqlServer.json +++ b/tfs-dual-server/nestedtemplates/sqlServer.json @@ -74,6 +74,13 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -86,7 +93,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('networkInterfaceName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [], "properties": { "ipConfigurations": [ @@ -116,7 +123,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]" ], @@ -158,7 +165,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/JoinDomain')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -183,7 +190,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/ConfigureSQL')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('vmName'), 'JoinDomain')]" ], @@ -211,4 +218,4 @@ } } ] -} \ No newline at end of file +} diff --git a/tfs-dual-server/nestedtemplates/tfs.json b/tfs-dual-server/nestedtemplates/tfs.json index cd3a5c8964cd..4a77f3a11b27 100644 --- a/tfs-dual-server/nestedtemplates/tfs.json +++ b/tfs-dual-server/nestedtemplates/tfs.json @@ -80,6 +80,13 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -92,7 +99,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('networkInterfaceName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -121,7 +128,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]" ], @@ -163,7 +170,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/JoinDomain')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -188,7 +195,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/ConfigureTfs')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('vmName'), 'JoinDomain')]" ], @@ -211,4 +218,4 @@ } } ] -} \ No newline at end of file +} diff --git a/tfs-dual-server/nestedtemplates/virtualNetwork.json b/tfs-dual-server/nestedtemplates/virtualNetwork.json index cd901680c96e..e6004a8db73f 100644 --- a/tfs-dual-server/nestedtemplates/virtualNetwork.json +++ b/tfs-dual-server/nestedtemplates/virtualNetwork.json @@ -37,6 +37,13 @@ "metadata": { "description": "List of DNS servers in the network" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -44,15 +51,14 @@ "lbFrontEndName": "LoadBalancerFrontEnd", "publicIpID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIpName'))]", "loadBalancerID": "[resourceId('Microsoft.Network/loadBalancers',parameters('loadBalancerName'))]", - "frontEndIPConfigID": "[concat(variables('loadBalancerID'),'/frontendIPConfigurations/', variables('lbFrontEndName'))]", - "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]" + "frontEndIPConfigID": "[concat(variables('loadBalancerID'),'/frontendIPConfigurations/', variables('lbFrontEndName'))]" }, "resources": [ { "apiVersion": "2017-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -61,7 +67,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -85,7 +91,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('availabilitySetName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -98,7 +104,7 @@ "apiVersion": "2017-09-01", "name": "[parameters('loadBalancerName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIpName'))]" ], @@ -156,4 +162,4 @@ } } ] -} \ No newline at end of file +} diff --git a/tfs-standard-existingsql/azuredeploy.json b/tfs-standard-existingsql/azuredeploy.json index 3e32d539e941..9760721e3d98 100644 --- a/tfs-standard-existingsql/azuredeploy.json +++ b/tfs-standard-existingsql/azuredeploy.json @@ -65,6 +65,13 @@ "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": { @@ -77,7 +84,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('networkInterfaceName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [], "properties": { "ipConfigurations": [ @@ -97,7 +104,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]" ], @@ -136,7 +143,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/JoinDomain')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -161,7 +168,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/ConfigureTfs')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('vmName'), 'JoinDomain')]" ], @@ -184,4 +191,4 @@ } } ] -} \ No newline at end of file +} diff --git a/tfs-standard-existingsql/prereqs/nestedtemplates/domainController.json b/tfs-standard-existingsql/prereqs/nestedtemplates/domainController.json index 7f3579785aa3..e27d25162953 100644 --- a/tfs-standard-existingsql/prereqs/nestedtemplates/domainController.json +++ b/tfs-standard-existingsql/prereqs/nestedtemplates/domainController.json @@ -80,11 +80,17 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "networkInterfaceName": "[concat(parameters('vmName'), 'nic')]", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('existingVnetName'))]", "loadBalancerID": "[resourceId('Microsoft.Network/loadBalancers',parameters('existingLoadBalancerName'))]", "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('existingVnetName'), parameters('existingSubnetName'))]" }, @@ -93,7 +99,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('networkInterfaceName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -123,7 +129,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]" ], @@ -165,7 +171,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/CreateDC')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', parameters('vmName'))]" ], @@ -193,4 +199,4 @@ } } ] -} \ No newline at end of file +} diff --git a/tfs-standard-existingsql/prereqs/nestedtemplates/sqlServer.json b/tfs-standard-existingsql/prereqs/nestedtemplates/sqlServer.json index d9726dd6afe9..1d8827a3cf36 100644 --- a/tfs-standard-existingsql/prereqs/nestedtemplates/sqlServer.json +++ b/tfs-standard-existingsql/prereqs/nestedtemplates/sqlServer.json @@ -74,11 +74,17 @@ "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "networkInterfaceName": "[concat(parameters('vmName'), 'nic')]", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('existingVnetName'))]", "loadBalancerID": "[resourceId('Microsoft.Network/loadBalancers',parameters('existingLoadBalancerName'))]", "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('existingVnetName'), parameters('existingSubnetName'))]" }, @@ -87,7 +93,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('networkInterfaceName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [], "properties": { "ipConfigurations": [ @@ -117,7 +123,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]" ], @@ -159,7 +165,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/JoinDomain')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -184,7 +190,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/ConfigureSQL')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('vmName'), 'JoinDomain')]" ], @@ -212,4 +218,4 @@ } } ] -} \ No newline at end of file +} diff --git a/tfs-standard-existingsql/prereqs/nestedtemplates/virtualNetwork.json b/tfs-standard-existingsql/prereqs/nestedtemplates/virtualNetwork.json index 2745c41b1547..13536f104033 100644 --- a/tfs-standard-existingsql/prereqs/nestedtemplates/virtualNetwork.json +++ b/tfs-standard-existingsql/prereqs/nestedtemplates/virtualNetwork.json @@ -37,23 +37,28 @@ "metadata": { "description": "List of DNS servers in the network" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "publicIpName": "publicIp", "lbFrontEndName": "LoadBalancerFrontEnd", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('vnetName'))]", "publicIpID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIpName'))]", "loadBalancerID": "[resourceId('Microsoft.Network/loadBalancers',parameters('loadBalancerName'))]", - "frontEndIPConfigID": "[concat(variables('loadBalancerID'),'/frontendIPConfigurations/', variables('lbFrontEndName'))]", - "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]" + "frontEndIPConfigID": "[concat(variables('loadBalancerID'),'/frontendIPConfigurations/', variables('lbFrontEndName'))]" }, "resources": [ { "apiVersion": "2017-09-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -62,7 +67,7 @@ "apiVersion": "2017-09-01", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -86,7 +91,7 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[parameters('availabilitySetName')]", "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Aligned" }, @@ -99,7 +104,7 @@ "apiVersion": "2017-09-01", "name": "[parameters('loadBalancerName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIpName'))]" ], @@ -146,4 +151,4 @@ } } ] -} \ No newline at end of file +} diff --git a/tfs-standard-existingsql/prereqs/prereq.azuredeploy.json b/tfs-standard-existingsql/prereqs/prereq.azuredeploy.json index 4075026cc198..9458b833c8d4 100644 --- a/tfs-standard-existingsql/prereqs/prereq.azuredeploy.json +++ b/tfs-standard-existingsql/prereqs/prereq.azuredeploy.json @@ -40,6 +40,13 @@ "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": { @@ -265,4 +272,4 @@ "value": "[concat('tfsSQL.', parameters('domainName'))]" } } -} \ No newline at end of file +} diff --git a/thinkbox-deadline/azuredeploy.json b/thinkbox-deadline/azuredeploy.json index 36c7c0f9cdc6..602cddc514bc 100644 --- a/thinkbox-deadline/azuredeploy.json +++ b/thinkbox-deadline/azuredeploy.json @@ -45,6 +45,13 @@ "metadata": { "description": "The number of slave vms to start." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -54,7 +61,6 @@ "subnetAddressRange": "10.0.0.0/24", "subnetName": "[concat( parameters('clusterName'), '-subnet')]", "subnet-id": "[concat(resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName')),'/subnets/',variables('subnetName'))]", - "apiVersion": "2015-05-01-preview", "repositoryName": "[concat( parameters('clusterName'), '-repository')]", "slaveName": "[concat( parameters('clusterName'), '-slave')]", "publicIpName": "[concat( parameters('clusterName'), '-publicIp')]", @@ -67,7 +73,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIpName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -79,7 +85,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat( variables('publicIpName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "ipLoop", "count": "[parameters('numberOfSlaves')]" @@ -95,7 +101,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -104,7 +110,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSecurityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -143,7 +149,7 @@ "dependsOn": [ "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -167,7 +173,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('networkInterfaceName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIpName'))]" @@ -193,7 +199,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat( variables('networkInterfaceName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nifLoop", "count": "[parameters('numberOfSlaves')]" @@ -223,7 +229,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('repositoryName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts',variables('storageAccountName'))]", "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]" @@ -271,7 +277,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat( variables('repositoryName'), '/autoconf')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', variables('repositoryName'))]" ], @@ -291,7 +297,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('slaveName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nifLoop", "count": "[parameters('numberOfSlaves')]" @@ -343,4 +349,4 @@ } } ] -} \ No newline at end of file +} diff --git a/torque-cluster/azuredeploy.json b/torque-cluster/azuredeploy.json index b6d93fb27129..6f57f03a8f2a 100644 --- a/torque-cluster/azuredeploy.json +++ b/torque-cluster/azuredeploy.json @@ -45,6 +45,13 @@ "metadata": { "description": "This template create N worker node. Use scaleNumber to specify that N." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -88,7 +95,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -97,7 +104,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -118,7 +125,7 @@ "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2015-05-01-preview", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -130,7 +137,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('networkSettings').virtualNetworkName)]" @@ -157,7 +164,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('masterVMName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -200,7 +207,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('masterVMName'), '/Installation')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('masterVMName'))]" ], @@ -208,7 +215,7 @@ "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, + "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "[concat(variables('templateBaseUrl'), 'azuredeploy.sh')]" @@ -223,7 +230,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), 'worker', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('networkSettings').virtualNetworkName)]" ], @@ -250,7 +257,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('workerVMName'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), 'worker', copyindex())]" diff --git a/traffic-manager-application-gateway-demo-setup/azuredeploy.json b/traffic-manager-application-gateway-demo-setup/azuredeploy.json index bc3f1c4aa4ab..3c5406b604fc 100644 --- a/traffic-manager-application-gateway-demo-setup/azuredeploy.json +++ b/traffic-manager-application-gateway-demo-setup/azuredeploy.json @@ -87,13 +87,18 @@ "description": "The base URI where artifacts required by this template are located." }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/traffic-manager-application-gateway-demo-setup/" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "virtualNetworkName": "virtualNetwork1", "subnetName": "subnet1", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", "addressPrefix": "10.0.0.0/16", "subnetPrefix": "10.0.0.0/28", "nestedTemplatesFolder": "nested", @@ -141,7 +146,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ diff --git a/traffic-manager-application-gateway-demo-setup/nested/azuredeployappgw.json b/traffic-manager-application-gateway-demo-setup/nested/azuredeployappgw.json index 391f61eb0fed..36ab6970dc0d 100644 --- a/traffic-manager-application-gateway-demo-setup/nested/azuredeployappgw.json +++ b/traffic-manager-application-gateway-demo-setup/nested/azuredeployappgw.json @@ -69,7 +69,6 @@ "Canada Central", "Canada East" ], - "defaultValue": "East US", "metadata": { "description": "Location of resources" } diff --git a/traffic-manager-application-gateway-demo-setup/nested/nested/azuredeploywebserver.json b/traffic-manager-application-gateway-demo-setup/nested/nested/azuredeploywebserver.json index 3dfa07e22786..ed45ab31ec11 100644 --- a/traffic-manager-application-gateway-demo-setup/nested/nested/azuredeploywebserver.json +++ b/traffic-manager-application-gateway-demo-setup/nested/nested/azuredeploywebserver.json @@ -85,7 +85,6 @@ "Canada Central", "Canada East" ], - "defaultValue": "East US", "metadata": { "description": "Location of resources" } @@ -335,7 +334,6 @@ "[concat(parameters('_artifactsLocation'), '/', variables('scriptFolder'), '/', variables('serverPrepareScriptFileName'), parameters('_artifactsLocationSasToken'))]" ], "commandToExecute": "[concat('sh prepwebserver.sh', ' ', string(parameters('installPHP')), ' ', variables('singleQuote'), variables('testPageMarkup'), variables('singleQuote'), ' ', parameters('testPage'), ' ', variables('singleQuote'), parameters('ubuntuOSVersion'), variables('singleQuote'))]" - } } } diff --git a/traffic-manager-demo-setup/azuredeploy.json b/traffic-manager-demo-setup/azuredeploy.json index 9a42c7a4a44d..501895d2c411 100644 --- a/traffic-manager-demo-setup/azuredeploy.json +++ b/traffic-manager-demo-setup/azuredeploy.json @@ -87,23 +87,24 @@ "description": "The base URI where artifacts required by this template are located." }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/traffic-manager-demo-setup" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "virtualNetworkName": "virtualNetwork1", "subnetName": "subnet1", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", "backendDnsPrefix": "backend-", "addressPrefix": "10.0.0.0/16", "subnetPrefix": "10.0.0.0/28", "nestedTemplatesFolder": "nested", "webServerTemplateName": "azuredeploywebserver.json", - "serverTestPage1": "[concat('

This is Server 1, Location: ', parameters('primarylocation'), '

')]", - "serverTestPage2": "[concat('

This is Server 2, Location: ', parameters('secondarylocation'), '

')]", - "serverTestPageInfo": "

Request headers:
$value){echo \"$h: $value
\n\";}?>

", - "location1": "[parameters('primarylocation')]", - "location2": "[parameters('secondarylocation')]" + "serverTestPageInfo": "

Request headers:
$value){echo \"$h: $value
\n\";}?>

" }, "resources": [ { @@ -158,7 +159,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ diff --git a/traffic-manager-demo-setup/nested/azuredeploywebserver.json b/traffic-manager-demo-setup/nested/azuredeploywebserver.json index 26b18a3df3f4..0f4573d0f020 100644 --- a/traffic-manager-demo-setup/nested/azuredeploywebserver.json +++ b/traffic-manager-demo-setup/nested/azuredeploywebserver.json @@ -85,7 +85,6 @@ "Canada Central", "Canada East" ], - "defaultValue": "East US", "metadata": { "description": "Location of resources" } @@ -334,7 +333,6 @@ "[concat(parameters('_artifactsLocation'), '/', variables('scriptFolder'), '/', variables('serverPrepareScriptFileName'), parameters('_artifactsLocationSasToken'))]" ], "commandToExecute": "[concat('sh prepwebserver.sh', ' ', string(parameters('installPHP')), ' ', variables('singleQuote'), variables('testPageMarkup'), variables('singleQuote'), ' ', parameters('testPage'), ' ', variables('singleQuote'), parameters('ubuntuOSVersion'), variables('singleQuote'))]" - } } } diff --git a/trend-chef-splunk-security/azuredeploy.json b/trend-chef-splunk-security/azuredeploy.json index f545279e0e66..f7e064c6ed45 100644 --- a/trend-chef-splunk-security/azuredeploy.json +++ b/trend-chef-splunk-security/azuredeploy.json @@ -4,7 +4,6 @@ "parameters": { "location": { "type": "string", - "defaultValue": "westus", "allowedValues": [ "westus", "eastus", @@ -632,7 +631,7 @@ "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ - "['Microsoft.Resources/deployments/vnetstorage']" + "Microsoft.Resources/deployments/vnetstorage" ], "properties": { "mode": "Incremental", @@ -754,7 +753,7 @@ "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ - "['Microsoft.Resources/deployments/vnetstorage']" + "Microsoft.Resources/deployments/vnetstorage" ], "properties": { "mode": "Incremental", @@ -840,9 +839,9 @@ "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ - "['Microsoft.Resources/deployments/vnetstorage']", - "['Microsoft.Resources/deployments/trendmicrodsm']", - "['Microsoft.Resources/deployments/orchestrator']" + "Microsoft.Resources/deployments/vnetstorage", + "Microsoft.Resources/deployments/trendmicrodsm", + "Microsoft.Resources/deployments/orchestrator" ], "properties": { "mode": "Incremental", @@ -871,7 +870,7 @@ "type": "Microsoft.Resources/deployments", "name": "splunkstandalonedeployment", "dependsOn": [ - "['Microsoft.Resources/deployments/vnetstorage']" + "Microsoft.Resources/deployments/vnetstorage" ], "properties": { "mode": "Incremental", @@ -957,9 +956,9 @@ "type": "Microsoft.Resources/deployments", "name": "dsagents", "dependsOn": [ - "['Microsoft.Resources/deployments/vnetstorage']", - "['Microsoft.Resources/deployments/trendmicrodsm']", - "['Microsoft.Resources/deployments/chefAutomate']" + "Microsoft.Resources/deployments/vnetstorage", + "Microsoft.Resources/deployments/trendmicrodsm", + "Microsoft.Resources/deployments/chefAutomate" ], "properties": { "mode": "Incremental", @@ -1075,9 +1074,9 @@ "type": "Microsoft.Resources/deployments", "name": "chefnodes", "dependsOn": [ - "['Microsoft.Resources/deployments/vnetstorage']", - "['Microsoft.Resources/deployments/trendmicrodsm']", - "['Microsoft.Resources/deployments/chefAutomate']" + "Microsoft.Resources/deployments/vnetstorage", + "Microsoft.Resources/deployments/trendmicrodsm", + "Microsoft.Resources/deployments/chefAutomate" ], "properties": { "mode": "Incremental", diff --git a/trend-chef-splunk-security/nested/database-new.json b/trend-chef-splunk-security/nested/database-new.json index 136d4e41132f..f88bf1efbc11 100755 --- a/trend-chef-splunk-security/nested/database-new.json +++ b/trend-chef-splunk-security/nested/database-new.json @@ -34,7 +34,6 @@ } }, "variables": { - "sql-api-version": "2014-04-01", "sqldb-api-version": "2015-05-01-preview", "sqlfirewallrules-api-version": "2014-04-01" }, @@ -91,4 +90,4 @@ "value": "[reference(concat('Microsoft.Sql/servers/', parameters('newsqlServerName'))).fullyQualifiedDomainName]" } } -} \ No newline at end of file +} diff --git a/trend-chef-splunk-security/nested/empty-resources.json b/trend-chef-splunk-security/nested/empty-resources.json index fd486b7f1de9..d46765c26d51 100755 --- a/trend-chef-splunk-security/nested/empty-resources.json +++ b/trend-chef-splunk-security/nested/empty-resources.json @@ -5,9 +5,8 @@ "location": { "type": "string" } - }, "variables": {}, "resources": [], "outputs": {} -} \ No newline at end of file +} diff --git a/trend-chef-splunk-security/nested/orchestrator-server-setup-trend.json b/trend-chef-splunk-security/nested/orchestrator-server-setup-trend.json index 495f2a299ff6..61220dbbe22e 100644 --- a/trend-chef-splunk-security/nested/orchestrator-server-setup-trend.json +++ b/trend-chef-splunk-security/nested/orchestrator-server-setup-trend.json @@ -15,7 +15,7 @@ "type": "object" }, "splunkTags": { - "type": "object" + "type": "object" }, "quickstartTags": { "type": "object" @@ -41,7 +41,7 @@ "https://raw.githubusercontent.com/sysgain/cloudtry-p2p-public-artifacts/master/scripts/TrendMicro/p2porchAllinOneTrend.sh" ], "commandToExecute": "sh p2porchAllinOneTrend.sh" - } + } } } ] diff --git a/trend-chef-splunk-security/nested/trendp2p-chefautomate.json b/trend-chef-splunk-security/nested/trendp2p-chefautomate.json index 5f2b742326e8..b9bbe7531fb1 100644 --- a/trend-chef-splunk-security/nested/trendp2p-chefautomate.json +++ b/trend-chef-splunk-security/nested/trendp2p-chefautomate.json @@ -1,216 +1,220 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "computeSettings": { - "type": "secureObject" - }, - "networkSettings": { - "type": "object" - }, - "subnet2Ref":{ - "type": "string" - }, - "publicIPDomainNameLabelOrchServer": { - "type": "string", - "defaultValue": "" - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "computeSettings": { + "type": "secureObject" }, - "variables": { - "singleQuote": "'", - "pipID":"[resourceId('Microsoft.Network/publicIPAddresses',parameters('networkSettings').chefAutoPip)]", - "publicIPDomainNameLabelOrchServer": "[concat('http://',parameters('publicIPDomainNameLabelOrchServer'),'.',parameters('computeSettings').location,'.cloudapp.azure.com:33001/key')]" - + "networkSettings": { + "type": "object" }, - "resources": [ - { - "name": "[parameters('networkSettings').chefAutoPip]", - "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "[parameters('networkSettings').networkApiVersion]", - "location": "[parameters('networkSettings').location]", + "subnet2Ref": { + "type": "string" + }, + "publicIPDomainNameLabelOrchServer": { + "type": "string", + "defaultValue": "" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "pipID": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('networkSettings').chefAutoPip)]", + "publicIPDomainNameLabelOrchServer": "[concat('http://',parameters('publicIPDomainNameLabelOrchServer'),'.',parameters('computeSettings').location,'.cloudapp.azure.com:33001/key')]" + }, + "resources": [ + { + "name": "[parameters('networkSettings').chefAutoPip]", + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[parameters('networkSettings').networkApiVersion]", + "location": "[parameters('networkSettings').location]", + "properties": { + "publicIPAllocationMethod": "[parameters('networkSettings').publicIpAddressType]", + "dnsSettings": { + "domainNameLabel": "[parameters('networkSettings').chefAutoDns]" + } + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[parameters('networksettings').chefAutoNsg]", + "apiVersion": "[parameters('networkSettings').networkApiVersion]", + "location": "[parameters('networkSettings').location]", + "properties": { + "securityRules": [ + { + "name": "ssh", "properties": { - "publicIPAllocationMethod": "[parameters('networkSettings').publicIpAddressType]", - "dnsSettings": { - "domainNameLabel": "[parameters('networkSettings').chefAutoDns]" - } + "priority": 1010, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "22", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } - }, - { - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[parameters('networksettings').chefAutoNsg]", - "apiVersion": "[parameters('networkSettings').networkApiVersion]", - "location": "[parameters('networkSettings').location]", + }, + { + "name": "https", "properties": { - "securityRules": [ - { - "name": "ssh", - "properties": { - "priority": 1010, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "22", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "https", - "properties": { - "priority": 1020, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "443", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "http", - "properties": { - "priority": 1030, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "80", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "git", - "properties": { - "priority": 1040, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "8989", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "udp", - "properties": { - "priority": 1050, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "8443", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - } - ] + "priority": 1020, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "443", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } - }, - { - "name": "[parameters('networkSettings').chefAutoNic]", - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "[parameters('networkSettings').networkApiVersion]", - "location": "[parameters('networkSettings').location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIpAddresses/', parameters('networkSettings').chefAutoPip)]", - "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSettings').chefautoNsg)]" - ], + }, + { + "name": "http", "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "subnet": { - "id": "[parameters('subnet2Ref')]" - }, - "privateIPAllocationMethod": "Dynamic", - "publicIpAddress": { - "id": "[resourceId('Microsoft.Network/publicIpAddresses', parameters('networkSettings').chefAutoPip)]" - } - } - } - ], - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSettings').chefautoNsg)]" - } + "priority": 1030, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "80", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } - }, - { - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('computeSettings').chefAutoVmName]", - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "location": "[parameters('computeSettings').location]", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', parameters('computeSettings').chefAutoNic)]" - ], - "plan": { - "name": "[parameters('computeSettings').imageSKU]", - "product": "[parameters('computeSettings').imageOffer]", - "publisher": "[parameters('computeSettings').imagePublisher]" - }, + }, + { + "name": "git", "properties": { - "hardwareProfile": { - "vmSize": "[parameters('computeSettings').virtualMachineSize]" - }, - "osProfile": { - "computerName": "[parameters('computeSettings').chefAutoVmName]", - "adminUsername": "[parameters('computeSettings').adminUsername]", - "adminPassword": "[parameters('computeSettings').adminPassword]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[parameters('computeSettings').imagePublisher]", - "offer": "[parameters('computeSettings').imageOffer]", - "sku": "[parameters('computeSettings').imageSKU]", - "version": "[parameters('computeSettings').imageVersion]" - }, - "osDisk": { - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "[parameters('computeSettings').storageAccountType]" - } - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('computeSettings').chefAutoNic)]" - } - ] - } + "priority": 1040, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "8989", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('computeSettings').chefAutoVmName,'/automate_setup')]", - "apiVersion": "[parameters('computeSettings').computeApiVersion]", - "location": "[parameters('computeSettings').location]", + }, + { + "name": "udp", "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[parameters('computeSettings').chefAutoScriptUrl1]" - ], - "commandToExecute": "[concat(parameters('computeSettings').rubyPath, ' ./automate_setup.rb --fqdn \"', reference(variables('pipId')).dnsSettings.fqdn, '\" --license \"', parameters('computeSettings').automateLicenseUri, '\"',' --adminUsername \"',parameters('computeSettings').adminUsername,'\"',' --firstname ','\"',parameters('computeSettings').firstname,'\"',' --lastname ','\"',parameters('computeSettings').lastname,'\"',' --mailid ','\"',parameters('computeSettings').mailid,'\"',' --adminpassword ','\"',parameters('computeSettings').adminpassword,'\"',' --orguser ','\"',parameters('computeSettings').orguser,'\"',' --fqdnorch ','\"',variables('publicIPDomainNameLabelOrchServer'),'\"')]" - } - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').chefAutoVmName)]" - ] + "priority": 1050, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "8443", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + } + ] + } + }, + { + "name": "[parameters('networkSettings').chefAutoNic]", + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[parameters('networkSettings').networkApiVersion]", + "location": "[parameters('networkSettings').location]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIpAddresses/', parameters('networkSettings').chefAutoPip)]", + "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSettings').chefautoNsg)]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "subnet": { + "id": "[parameters('subnet2Ref')]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId('Microsoft.Network/publicIpAddresses', parameters('networkSettings').chefAutoPip)]" + } + } + } + ], + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSettings').chefautoNsg)]" } - - ], - "outputs":{ - "chefAutomatefqdn":{ - "type": "string", - "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',parameters('networkSettings').chefAutoPip)).dnsSettings.fqdn]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('computeSettings').chefAutoVmName]", + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "location": "[parameters('computeSettings').location]", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', parameters('computeSettings').chefAutoNic)]" + ], + "plan": { + "name": "[parameters('computeSettings').imageSKU]", + "product": "[parameters('computeSettings').imageOffer]", + "publisher": "[parameters('computeSettings').imagePublisher]" + }, + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('computeSettings').virtualMachineSize]" + }, + "osProfile": { + "computerName": "[parameters('computeSettings').chefAutoVmName]", + "adminUsername": "[parameters('computeSettings').adminUsername]", + "adminPassword": "[parameters('computeSettings').adminPassword]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('computeSettings').imagePublisher]", + "offer": "[parameters('computeSettings').imageOffer]", + "sku": "[parameters('computeSettings').imageSKU]", + "version": "[parameters('computeSettings').imageVersion]" + }, + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('computeSettings').storageAccountType]" + } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('computeSettings').chefAutoNic)]" + } + ] } + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('computeSettings').chefAutoVmName,'/automate_setup')]", + "apiVersion": "[parameters('computeSettings').computeApiVersion]", + "location": "[parameters('computeSettings').location]", + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[parameters('computeSettings').chefAutoScriptUrl1]" + ], + "commandToExecute": "[concat(parameters('computeSettings').rubyPath, ' ./automate_setup.rb --fqdn \"', reference(variables('pipId')).dnsSettings.fqdn, '\" --license \"', parameters('computeSettings').automateLicenseUri, '\"',' --adminUsername \"',parameters('computeSettings').adminUsername,'\"',' --firstname ','\"',parameters('computeSettings').firstname,'\"',' --lastname ','\"',parameters('computeSettings').lastname,'\"',' --mailid ','\"',parameters('computeSettings').mailid,'\"',' --adminpassword ','\"',parameters('computeSettings').adminpassword,'\"',' --orguser ','\"',parameters('computeSettings').orguser,'\"',' --fqdnorch ','\"',variables('publicIPDomainNameLabelOrchServer'),'\"')]" + } + }, + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').chefAutoVmName)]" + ] + } + ], + "outputs": { + "chefAutomatefqdn": { + "type": "string", + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',parameters('networkSettings').chefAutoPip)).dnsSettings.fqdn]" } + } } diff --git a/trend-chef-splunk-security/nested/trendp2p-chefnodes.json b/trend-chef-splunk-security/nested/trendp2p-chefnodes.json index 03dc96da40d0..123c3c0db0fb 100755 --- a/trend-chef-splunk-security/nested/trendp2p-chefnodes.json +++ b/trend-chef-splunk-security/nested/trendp2p-chefnodes.json @@ -3,8 +3,7 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string", - "defaultValue": "" + "type": "string" }, "network-api-version": { "type": "string", @@ -493,4 +492,4 @@ } } ] -} \ No newline at end of file +} diff --git a/trend-chef-splunk-security/nested/trendp2p-dsagents.json b/trend-chef-splunk-security/nested/trendp2p-dsagents.json index 96906e0f3cee..4033a2e9855d 100755 --- a/trend-chef-splunk-security/nested/trendp2p-dsagents.json +++ b/trend-chef-splunk-security/nested/trendp2p-dsagents.json @@ -3,8 +3,7 @@ "contentVersion": "1.0.0.0", "parameters": { "location": { - "type": "string", - "defaultValue": "" + "type": "string" }, "network-api-version": { "type": "string", @@ -425,4 +424,4 @@ } } ] -} \ No newline at end of file +} diff --git a/trend-chef-splunk-security/nested/trendp2p-orchestrator.json b/trend-chef-splunk-security/nested/trendp2p-orchestrator.json index 1787a55cc964..791e30bd4aec 100755 --- a/trend-chef-splunk-security/nested/trendp2p-orchestrator.json +++ b/trend-chef-splunk-security/nested/trendp2p-orchestrator.json @@ -35,8 +35,7 @@ "type": "string" }, "location": { - "type": "string", - "defaultValue": "" + "type": "string" }, "network-api-version": { "type": "string", @@ -347,4 +346,4 @@ "dependsOn": [] } ] -} \ No newline at end of file +} diff --git a/trend-chef-splunk-security/nested/trendp2p-splunkenterprise.json b/trend-chef-splunk-security/nested/trendp2p-splunkenterprise.json index dbd1b85dba80..c58d0e181fb8 100755 --- a/trend-chef-splunk-security/nested/trendp2p-splunkenterprise.json +++ b/trend-chef-splunk-security/nested/trendp2p-splunkenterprise.json @@ -427,4 +427,4 @@ "value": "[concat('https://',reference(resourceId('Microsoft.Network/publicIPAddresses',parameters('publicIPAddressSettingsSplunk').name)).dnsSettings.fqdn)]" } } -} \ No newline at end of file +} diff --git a/trend-chef-splunk-security/nested/trendp2p-trenddsm.json b/trend-chef-splunk-security/nested/trendp2p-trenddsm.json index fbde59fd71cb..8a5b7b1e2f57 100755 --- a/trend-chef-splunk-security/nested/trendp2p-trenddsm.json +++ b/trend-chef-splunk-security/nested/trendp2p-trenddsm.json @@ -11,8 +11,7 @@ "defaultValue": "" }, "location": { - "type": "string", - "defaultValue": "" + "type": "string" }, "network-api-version": { "type": "string", @@ -411,4 +410,4 @@ "value": "[concat('https://',reference(resourceId('Microsoft.Network/publicIPAddresses',parameters('publicIPAddressNameTrendDSM'))).dnsSettings.fqdn)]" } } -} \ No newline at end of file +} diff --git a/trend-chef-splunk-security/nested/trendp2p-vnetstorage.json b/trend-chef-splunk-security/nested/trendp2p-vnetstorage.json index 67679a126ad1..85468e096ccb 100755 --- a/trend-chef-splunk-security/nested/trendp2p-vnetstorage.json +++ b/trend-chef-splunk-security/nested/trendp2p-vnetstorage.json @@ -15,8 +15,7 @@ "defaultValue": "" }, "location": { - "type": "string", - "defaultValue": "" + "type": "string" }, "network-api-version": { "type": "string", diff --git a/two-tier-nodejsapp-migration-to-containers-on-Azure/azuredeploy.json b/two-tier-nodejsapp-migration-to-containers-on-Azure/azuredeploy.json index b7be25335b12..0943c63a4340 100644 --- a/two-tier-nodejsapp-migration-to-containers-on-Azure/azuredeploy.json +++ b/two-tier-nodejsapp-migration-to-containers-on-Azure/azuredeploy.json @@ -1,278 +1,293 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "virtualMachineName": { - "type": "string", - "metadata": { - "description": "Name for the Virtual Machine." - } - }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "Username for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "appGitLocation": { - "type": "string", - "metadata": { - "description": "The Git Url of the app" - }, - "defaultValue": "https://github.com/evillgenius75/gbb-todo" - }, - "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/two-tier-nodejsapp-migration-to-containers-on-Azure/" - }, - "_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": "" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "virtualMachineName": { + "type": "string", + "metadata": { + "description": "Name for the Virtual Machine." + } }, - "variables": { - "OSDiskName": "osdiskfordockersimple", - "nicName": "nicCard", - "publicIPAddressName": "publicIP", - "publicIPAddressType": "Dynamic", - "nsgName": "nsg", - "vmStorageAccountContainerName": "vhds", - "virtualNetworkName": "vnet", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - - "newStorageAccountName": "[concat('storage',uniqueString(resourceGroup().id))]", - "dnsNameForPublicIP": "[concat('pip',uniqueString(resourceGroup().id))]", - "customExtensionScriptFileName": "mongo_nodejs.sh", - "todoAppTags": { - "provider": "NA" - }, - "quickstartTags": { - "name": "todoApp" + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the Virtual Machine." + } + }, + "appGitLocation": { + "type": "string", + "metadata": { + "description": "The Git Url of the app" + }, + "defaultValue": "https://github.com/evillgenius75/gbb-todo" + }, + "_artifactsLocation": { + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/two-tier-nodejsapp-migration-to-containers-on-Azure/" + }, + "_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": { + "OSDiskName": "osdiskfordockersimple", + "nicName": "nicCard", + "publicIPAddressName": "publicIP", + "publicIPAddressType": "Dynamic", + "nsgName": "nsg", + "vmStorageAccountContainerName": "vhds", + "virtualNetworkName": "vnet", + "newStorageAccountName": "[concat('storage',uniqueString(resourceGroup().id))]", + "dnsNameForPublicIP": "[concat('pip',uniqueString(resourceGroup().id))]", + "customExtensionScriptFileName": "mongo_nodejs.sh", + "todoAppTags": { + "provider": "NA" + }, + "quickstartTags": { + "name": "todoApp" + } + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('newStorageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "tags": { + "displayName": "Storage Account", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('todoAppTags').provider]" + }, + "kind": "Storage", + "sku": { + "name": "Standard_LRS" + } + }, + { + "apiVersion": "2017-04-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "location": "[parameters('location')]", + "tags": { + "displayName": "Public IP", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('todoAppTags').provider]" + }, + "properties": { + "publicIPAllocationMethod": "[variables('publicIPAddressType')]", + "dnsSettings": { + "domainNameLabel": "[variables('dnsNameForPublicIP')]" } + } }, - "resources": [{ - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('newStorageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "Storage Account", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('todoAppTags').provider]" - }, - "kind": "Storage", - "sku": { - "name": "Standard_LRS" - } - }, - { - "apiVersion": "2017-04-01", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "Public IP", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('todoAppTags').provider]" - }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('nsgName')]", + "apiVersion": "2016-03-30", + "location": "[parameters('location')]", + "comments": "NSG for Subnet", + "tags": { + "displayName": "Network Security Group", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('todoAppTags').provider]" + }, + "properties": { + "securityRules": [ + { + "name": "SSH-allow", "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]", - "dnsSettings": { - "domainNameLabel": "[variables('dnsNameForPublicIP')]" - } + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "Internet", + "destinationAddressPrefix": "10.0.0.0/16", + "access": "Allow", + "priority": 110, + "direction": "Inbound" } - }, - { - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('nsgName')]", - "apiVersion": "2016-03-30", - "location": "[resourceGroup().location]", - "comments": "NSG for Subnet", - "tags": { - "displayName": "Network Security Group", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('todoAppTags').provider]" - }, + }, + { + "name": "Nodejs-allow", "properties": { - "securityRules": [{ - "name": "SSH-allow", - "properties": { - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "Internet", - "destinationAddressPrefix": "10.0.0.0/16", - "access": "Allow", - "priority": 110, - "direction": "Inbound" - } - }, - { - "name": "Nodejs-allow", - "properties": { - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "8080", - "destinationAddressPrefix": "10.0.0.0/16", - "sourceAddressPrefix": "Internet", - "access": "Allow", - "priority": 120, - "direction": "Inbound" - } - } - ] + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "8080", + "destinationAddressPrefix": "10.0.0.0/16", + "sourceAddressPrefix": "Internet", + "access": "Allow", + "priority": 120, + "direction": "Inbound" } + } + ] + } + }, + { + "apiVersion": "2017-04-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" + ], + "tags": { + "displayName": "Virtual Network", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('todoAppTags').provider]" + }, + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] }, - { - "apiVersion": "2017-04-01", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" - ], - "tags": { - "displayName": "Virtual Network", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('todoAppTags').provider]" - }, + "subnets": [ + { + "name": "subnet", "properties": { - "addressSpace": { - "addressPrefixes": [ - "10.0.0.0/16" - ] - }, - "subnets": [{ - "name": "subnet", - "properties": { - "addressPrefix": "10.0.0.0/24", - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" - } - } - }] + "addressPrefix": "10.0.0.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + } } - }, - { - "apiVersion": "2017-04-01", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" - ], - "tags": { - "displayName": "Network Interface Card", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('todoAppTags').provider]" - }, + } + ] + } + }, + { + "apiVersion": "2017-04-01", + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('nicName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" + ], + "tags": { + "displayName": "Network Interface Card", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('todoAppTags').provider]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "ipConfigurations": [{ - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets/',variables('virtualNetworkName'), 'subnet')]" - } - } - }] + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" + }, + "subnet": { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets/',variables('virtualNetworkName'), 'subnet')]" + } } + } + ] + } + }, + { + "apiVersion": "2017-03-30", + "type": "Microsoft.Compute/virtualMachines", + "name": "[parameters('virtualMachineName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" + ], + "tags": { + "displayName": "Virtual Machine", + "quickstartName": "[variables('quickstartTags').name]", + "provider": "[variables('todoAppTags').provider]" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_F1" }, - { - "apiVersion": "2017-03-30", - "type": "Microsoft.Compute/virtualMachines", - "name": "[parameters('virtualMachineName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" - ], - "tags": { - "displayName": "Virtual Machine", - "quickstartName": "[variables('quickstartTags').name]", - "provider": "[variables('todoAppTags').provider]" - }, - "properties": { - "hardwareProfile": { - "vmSize": "Standard_F1" - }, - "osProfile": { - "computerName": "[parameters('virtualMachineName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "Canonical", - "offer": "UbuntuServer", - "sku": "16.04.0-LTS", - "version": "latest" - }, - "osDisk": { - "name": "osdisk1", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName')), '2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [{ - "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" - }] - } + "osProfile": { + "computerName": "[parameters('virtualMachineName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "16.04.0-LTS", + "version": "latest" + }, + "osDisk": { + "name": "osdisk1", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName')), '2016-01-01').primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]" }, - "resources": [{ - "name": "customExtension", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "2016-03-30", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachineName'))]" - ], - "tags": { - "displayName": "customExtension" - }, - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'),'scripts/',variables('customExtensionScriptFileName'), parameters('_artifactsLocationSasToken'))]" - ], - "commandToExecute": "[concat('sh ', variables('customExtensionScriptFileName'), ' ', parameters('appGitLocation'))]" - } - } - }] - } - ], - "outputs": { - "adminUsername": { - "type": "string", - "value": "[parameters('adminUsername')]" + "caching": "ReadWrite", + "createOption": "FromImage" + } }, - "publicIP": { - "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))).dnsSettings.fqdn]", - "type": "string" + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" + } + ] + } + }, + "resources": [ + { + "name": "customExtension", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "2016-03-30", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachineName'))]" + ], + "tags": { + "displayName": "customExtension" + }, + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'),'scripts/',variables('customExtensionScriptFileName'), parameters('_artifactsLocationSasToken'))]" + ], + "commandToExecute": "[concat('sh ', variables('customExtensionScriptFileName'), ' ', parameters('appGitLocation'))]" + } + } } + ] + } + ], + "outputs": { + "adminUsername": { + "type": "string", + "value": "[parameters('adminUsername')]" + }, + "publicIP": { + "value": "[reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))).dnsSettings.fqdn]", + "type": "string" } + } } diff --git a/ubuntu-apache-test-page/azuredeploy.json b/ubuntu-apache-test-page/azuredeploy.json index ae9c68644f3f..53230d88eed0 100644 --- a/ubuntu-apache-test-page/azuredeploy.json +++ b/ubuntu-apache-test-page/azuredeploy.json @@ -74,6 +74,13 @@ "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": { @@ -114,7 +121,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('vhdStorageName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "StorageAccount" }, @@ -126,7 +133,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[parameters('dnsNameForPublicIP')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "PublicIPAddress" }, @@ -141,7 +148,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "VirtualNetwork" }, @@ -165,7 +172,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NSG - Web Server" }, @@ -206,7 +213,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NetworkInterface" }, @@ -239,7 +246,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "VirtualMachine" }, @@ -284,7 +291,7 @@ { "name": "PrepareServer", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" @@ -302,7 +309,6 @@ "[concat(parameters('_artifactsLocation'), '/', variables('scriptFolder'), '/', variables('serverPrepareScriptFileName'), parameters('_artifactsLocationSasToken'))]" ], "commandToExecute": "[concat('sh prepwebserver.sh', ' ', string(parameters('installPHP')), ' ', variables('singleQuote'), variables('testPageMarkup'), variables('singleQuote'), ' ', parameters('testPage'), ' ', variables('singleQuote'), parameters('ubuntuOSVersion'), variables('singleQuote'))]" - } } } diff --git a/ubuntu-desktop-gnome/azuredeploy.json b/ubuntu-desktop-gnome/azuredeploy.json index 26ac86004e1c..654f5044d404 100644 --- a/ubuntu-desktop-gnome/azuredeploy.json +++ b/ubuntu-desktop-gnome/azuredeploy.json @@ -43,6 +43,13 @@ "metadata": { "description": "The VM role size of the jump box" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -50,15 +57,13 @@ "availabilitySetNodes": "avail-set", "osImagePublisher": "Canonical", "osImageOffer": "UbuntuServer", - "osImageSKU" : "14.04.3-LTS", + "osImageSKU": "14.04.3-LTS", "publicIPAddressName": "myPublicIP", "publicIPAddressType": "Dynamic", "customScriptLocation": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/ubuntu-desktop-gnome/", "wgetCommandPrefix": "[concat('wget --tries 20 --retry-connrefused --waitretry=15 -qO- ', variables('customScriptLocation'), 'configure-ubuntu.sh | nohup /bin/bash -s ')]", - "wgetCommandPostfix": " > /var/log/azure/firstinstall.log 2>&1 &'", + "wgetCommandPostfix": " > /var/log/azure/firstinstall.log 2>&1 &'", "commandPrefix": "/bin/bash -c '", - "OSDiskName": "osdisk", - "nicName": "vmNic", "virtualNetworkName": "VNET", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", @@ -80,7 +85,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -89,14 +94,14 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetNodes')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -108,7 +113,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('nsgID')]" ], @@ -135,7 +140,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -159,7 +164,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('vmName'), '-nic')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/loadBalancers/', variables('nodesLbName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -193,7 +198,7 @@ "apiVersion": "2015-06-15", "name": "[variables('nodesLbName')]", "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" ], @@ -235,7 +240,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('vmName'), '-nic')]", @@ -282,7 +287,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '/configuremaster')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/ubuntu-desktop-xfce-rdp/azuredeploy.json b/ubuntu-desktop-xfce-rdp/azuredeploy.json index 0dc32e17eed3..2e52083b2115 100644 --- a/ubuntu-desktop-xfce-rdp/azuredeploy.json +++ b/ubuntu-desktop-xfce-rdp/azuredeploy.json @@ -20,16 +20,16 @@ "description": "DNS Name for the publicly accessible node. 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." } }, - "vmSize": { + "vmSize": { "type": "string", "defaultValue": "Standard_A1", "allowedValues": [ - "Standard_A1", - "Standard_A2", - "Standard_A3", + "Standard_A1", + "Standard_A2", + "Standard_A3", "Standard_D1", "Standard_D3", - "Standard_D4" + "Standard_D4" ], "metadata": { "description": "The size of the virtual machines used when provisioning" @@ -46,6 +46,13 @@ "metadata": { "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values: 12.04.5-LTS, 14.04.2-LTS, 15.10." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -56,8 +63,7 @@ "addressPrefix": "10.0.0.0/16", "subnetName": "Subnet", "subnetPrefix": "10.0.0.0/24", - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15", + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", "storageAccountType": "Standard_LRS", "publicIPAddressName": "myPublicIP", "publicIPAddressType": "Dynamic", @@ -72,7 +78,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -81,7 +87,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -93,7 +99,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -114,7 +120,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -140,7 +146,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -183,7 +189,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -202,4 +208,3 @@ } ] } - diff --git a/ubuntu-netdisk-setup/azuredeploy.json b/ubuntu-netdisk-setup/azuredeploy.json index 23e369cf5958..e9caf03766ab 100644 --- a/ubuntu-netdisk-setup/azuredeploy.json +++ b/ubuntu-netdisk-setup/azuredeploy.json @@ -30,7 +30,7 @@ "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version." } }, - "vmSize":{ + "vmSize": { "type": "string", "defaultValue": "Basic_A3", "allowedValues": [ @@ -62,6 +62,13 @@ "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." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -85,7 +92,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -97,7 +104,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -118,7 +125,7 @@ "apiVersion": "2017-06-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -138,36 +145,32 @@ } } ], - "networkSecurityGroup": - { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups','mysg')]" + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups','mysg')]" } } }, { - "apiVersion": "2017-06-01", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "mysg", - "location": "[resourceGroup().location]", - "properties": - { - "securityRules": - [ - { - "name": "port80", - "properties": - { - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "80", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 101, - "direction": "Inbound" - } - }, - { + "apiVersion": "2017-06-01", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "mysg", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "port80", + "properties": { + "protocol": "Tcp", + "sourcePortRange": "*", + "destinationPortRange": "80", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 101, + "direction": "Inbound" + } + }, + { "name": "SSH", "properties": { "description": "Allows SSH traffic", @@ -182,11 +185,10 @@ } } ], - "networkInterfaces": - [ - { - "id":"[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" - } + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" + } ] } }, @@ -194,7 +196,7 @@ "apiVersion": "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" ], @@ -206,16 +208,16 @@ "computerName": "[variables('vmName')]", "adminUsername": "[parameters('adminUsername')]", "linuxConfiguration": { - "disablePasswordAuthentication": true, - "ssh": { - "publicKeys": [ - { - "path": "[variables('sshKeyPath')]", - "keyData": "[parameters('sshKeyData')]" - } - ] + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[variables('sshKeyPath')]", + "keyData": "[parameters('sshKeyData')]" + } + ] + } } - } }, "storageProfile": { "imageReference": { @@ -249,7 +251,7 @@ "apiVersion": "2017-03-30", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'), '/CustomScript')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], @@ -258,9 +260,11 @@ "type": "CustomScript", "typeHandlerVersion": "2.0", "settings": { - "fileUris": ["[variables('filesToDownload')]"] + "fileUris": [ + "[variables('filesToDownload')]" + ] }, - "protectedSettings":{ + "protectedSettings": { "commandToExecute": "[concat('export TERM=xterm && bash ', 'install.sh -u ', parameters('adminEmail'), ' -d ', reference(variables('publicIPAddressName')).dnsSettings.fqdn, ' -p \"', parameters('adminPass'), '\"')]" } } @@ -280,4 +284,4 @@ "value": "[reference('Microsoft.Compute/virtualMachines/MyUbuntuVM/extensions/CustomScript').instanceView.statuses[0].message]" } } -} \ No newline at end of file +} diff --git a/umbraco-cms-webapp-redis-cache/azuredeploy.json b/umbraco-cms-webapp-redis-cache/azuredeploy.json index 3701785008e9..1e840d743891 100644 --- a/umbraco-cms-webapp-redis-cache/azuredeploy.json +++ b/umbraco-cms-webapp-redis-cache/azuredeploy.json @@ -1,579 +1,585 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "appName": { - "type": "string", - "metadata": { - "description": "Name of azure web app" - } - }, - "appServiceTier": { - "type": "string", - "allowedValues": [ - "Standard", - "Premium" - ], - "defaultValue": "Standard", - "metadata": { - "description": "Choose either Standard or Premium Azure Web Apps pricing tiers. It defaults to Standard" - } - }, - "appServiceWorkerSize": { - "type": "string", - "allowedValues": [ - "0", - "1", - "2" - ], - "defaultValue": "0", - "metadata": { - "description": "Worker Size( 0=Small, 1=Medium, 2=Large )" - } - }, - "dbServerName": { - "type": "string", - "metadata": { - "description": "SQL Azure DB Server name" - } - }, - "dbAdministratorLogin": { - "type": "string", - "metadata": { - "description": "SQL Azure DB administrator user login" - } - }, - "dbAdministratorLoginPassword": { - "type": "securestring", - "metadata": { - "description": "Database admin user password" - } - }, - "dbName": { - "type": "string", - "metadata": { - "description": "Database Name" - } - }, - "dbEdition": { - "type": "string", - "allowedValues": [ - "Basic", - "Standard", - "Premium" - ], - "defaultValue": "Standard", - "metadata": { - "description": "SQL DB appServiceTier : Basic,Standard,Premium" - } - }, - "nonAdminDatabaseUsername": { - "type": "string", - "metadata": { - "description": "Non-admin Database User. Must be Unique" - } - }, - "nonAdminDatabasePassword": { - "type": "securestring", - "metadata": { - "description": "Non-admin Database User password" - } - }, - "storageAccountType": { - "type": "string", - "allowedValues": [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Standard_ZRS" - ], - "defaultValue": "Standard_LRS", - "metadata": { - "description": "Storage Account Type : Standard-LRS, Standard-GRS,Standard-RAGRS,Standard-ZRS" - } - }, - "redisCacheName": { - "type": "string", - "metadata": { - "description": "Redis Cache Name" - } - }, - "redisCacheServiceTier": { - "type": "string", - "allowedValues": [ - "Basic", - "Standard" - ], - "defaultValue": "Standard", - "metadata": { - "description": "Redis Cache appServiceTier - Basic , Standard" - } - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "appName": { + "type": "string", + "metadata": { + "description": "Name of azure web app" + } }, - "variables": { - "appInsightsRegion": "[resourceGroup().location]", - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "umbracoAdminWebAppName": "[concat(parameters('appName'), 'adminapp')]", - "appServicePlanName":"[concat(parameters('appName'), 'serviceplan')]" + "appServiceTier": { + "type": "string", + "allowedValues": [ + "Standard", + "Premium" + ], + "defaultValue": "Standard", + "metadata": { + "description": "Choose either Standard or Premium Azure Web Apps pricing tiers. It defaults to Standard" + } }, - "resources": [ - { - "apiVersion": "2014-04-01-preview", - "name": "[parameters('redisCacheName')]", - "type": "Microsoft.Cache/Redis", - "location": "[resourceGroup().location]", - "properties": { - "sku": { - "name": "[parameters('redisCacheServiceTier')]", - "family": "C", - "capacity": 0 - }, - "redisVersion": "2.8", - "enableNonSslPort": true - } + "appServiceWorkerSize": { + "type": "string", + "allowedValues": [ + "0", + "1", + "2" + ], + "defaultValue": "0", + "metadata": { + "description": "Worker Size( 0=Small, 1=Medium, 2=Large )" + } + }, + "dbServerName": { + "type": "string", + "metadata": { + "description": "SQL Azure DB Server name" + } + }, + "dbAdministratorLogin": { + "type": "string", + "metadata": { + "description": "SQL Azure DB administrator user login" + } + }, + "dbAdministratorLoginPassword": { + "type": "securestring", + "metadata": { + "description": "Database admin user password" + } + }, + "dbName": { + "type": "string", + "metadata": { + "description": "Database Name" + } + }, + "dbEdition": { + "type": "string", + "allowedValues": [ + "Basic", + "Standard", + "Premium" + ], + "defaultValue": "Standard", + "metadata": { + "description": "SQL DB appServiceTier : Basic,Standard,Premium" + } + }, + "nonAdminDatabaseUsername": { + "type": "string", + "metadata": { + "description": "Non-admin Database User. Must be Unique" + } + }, + "nonAdminDatabasePassword": { + "type": "securestring", + "metadata": { + "description": "Non-admin Database User password" + } + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Storage Account Type : Standard-LRS, Standard-GRS,Standard-RAGRS,Standard-ZRS" + } + }, + "redisCacheName": { + "type": "string", + "metadata": { + "description": "Redis Cache Name" + } + }, + "redisCacheServiceTier": { + "type": "string", + "allowedValues": [ + "Basic", + "Standard" + ], + "defaultValue": "Standard", + "metadata": { + "description": "Redis Cache appServiceTier - Basic , Standard" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "appInsightsRegion": "[parameters('location')]", + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", + "umbracoAdminWebAppName": "[concat(parameters('appName'), 'adminapp')]", + "appServicePlanName": "[concat(parameters('appName'), 'serviceplan')]" + }, + "resources": [ + { + "apiVersion": "2014-04-01-preview", + "name": "[parameters('redisCacheName')]", + "type": "Microsoft.Cache/Redis", + "location": "[parameters('location')]", + "properties": { + "sku": { + "name": "[parameters('redisCacheServiceTier')]", + "family": "C", + "capacity": 0 }, + "redisVersion": "2.8", + "enableNonSslPort": true + } + }, + { + "name": "[parameters('dbServerName')]", + "type": "Microsoft.Sql/servers", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01-preview", + "properties": { + "administratorLogin": "[parameters('dbAdministratorLogin')]", + "administratorLoginPassword": "[parameters('dbAdministratorLoginPassword')]", + "version": "12.0" + }, + "resources": [ { - "name": "[parameters('dbServerName')]", - "type": "Microsoft.Sql/servers", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01-preview", - "properties": { - "administratorLogin": "[parameters('dbAdministratorLogin')]", - "administratorLoginPassword": "[parameters('dbAdministratorLoginPassword')]", - "version": "12.0" - }, - "resources": [ - { - "apiVersion": "2014-04-01-preview", - "name": "[parameters('dbName')]", - "type": "databases", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[parameters('dbServerName')]" - ], - "properties": { - "edition": "[parameters('dbEdition')]", - "collation": "SQL_Latin1_General_CP1_CI_AS", - "requestedServiceObjectiveId": "F1173C43-91BD-4AAA-973C-54E79E15235B" - } - }, - { - "apiVersion": "2014-04-01-preview", - "name": "AllowAllWindowsAzureIps", - "type": "firewallrules", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Sql/servers/', parameters('dbServerName'))]" - ], - "properties": { - "endIpAddress": "0.0.0.0", - "startIpAddress": "0.0.0.0" - } - } - ] + "apiVersion": "2014-04-01-preview", + "name": "[parameters('dbName')]", + "type": "databases", + "location": "[parameters('location')]", + "dependsOn": [ + "[parameters('dbServerName')]" + ], + "properties": { + "edition": "[parameters('dbEdition')]", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "requestedServiceObjectiveId": "F1173C43-91BD-4AAA-973C-54E79E15235B" + } }, { - "apiVersion": "2015-05-01-preview", - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", - "properties": { - "accountType": "[parameters('storageAccountType')]" + "apiVersion": "2014-04-01-preview", + "name": "AllowAllWindowsAzureIps", + "type": "firewallrules", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Sql/servers/', parameters('dbServerName'))]" + ], + "properties": { + "endIpAddress": "0.0.0.0", + "startIpAddress": "0.0.0.0" + } + } + ] + }, + { + "apiVersion": "2015-05-01-preview", + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "location": "[parameters('location')]", + "properties": { + "accountType": "[parameters('storageAccountType')]" + } + }, + { + "apiVersion": "2014-06-01", + "name": "[variables('appServicePlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('location')]", + "properties": { + "name": "[variables('appServicePlanName')]", + "appServiceTier": "[parameters('appServiceTier')]", + "workerSize": "[parameters('appServiceWorkerSize')]", + "hostingEnvironment": "", + "numberOfWorkers": 1 + } + }, + { + "apiVersion": "2015-02-01", + "name": "[parameters('appName')]", + "type": "Microsoft.Web/Sites", + "location": "[parameters('location')]", + "tags": { + "[concat('hidden-related:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "empty" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverFarms/', variables('appServicePlanName'))]" + ], + "properties": { + "name": "[parameters('appName')]", + "serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/',resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", + "hostingEnvironment": "" + }, + "resources": [ + { + "apiVersion": "2014-06-01", + "name": "MSDeploy", + "type": "Extensions", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', parameters('appName'))]", + "[concat('Microsoft.Web/Sites/', parameters('appName'), '/config/web')]", + "[concat('Microsoft.Sql/servers/', parameters('dbServerName'), '/databases/', parameters('dbName'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" + ], + "properties": { + "packageUri": "https://auxmktplceprod.blob.core.windows.net/packages/ScalableUmbracoCms.WebPI.7.4.3.zip", + "dbType": "SQL", + "connectionString": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', parameters('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", + "setParameters": { + "Application Path": "[parameters('appName')]", + "Database Server": "[reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName]", + "Database Name": "[parameters('dbName')]", + "Database Username": "[parameters('nonAdminDatabaseUsername')]", + "Database Password": "[parameters('nonAdminDatabasePassword')]", + "Database Administrator": "[parameters('dbAdministratorLogin')]", + "Database Administrator Password": "[parameters('dbAdministratorLoginPassword')]", + "azurestoragerootUrl": "[concat('https://',variables('storageAccountName'), '.blob.core.windows.net')]", + "azurestoragecontainerName": "media", + "azurestorageconnectionString": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'), ';AccountKey=' , listKeys(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2015-05-01-preview').key1 )]", + "rediscachehost": "[concat(parameters('redisCacheName'), '.redis.cache.windows.net')]", + "rediscacheport": "6379", + "rediscacheaccessKey": "[listKeys(resourceId('Microsoft.Cache/Redis', parameters('redisCacheName')), '2014-04-01').primaryKey]", + "azurestoragecacheControl": "*|public, max-age=31536000;js|no-cache" } + } }, { - "apiVersion": "2014-06-01", - "name": "[variables('appServicePlanName')]", - "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", - "properties": { - "name": "[variables('appServicePlanName')]", - "appServiceTier": "[parameters('appServiceTier')]", - "workerSize": "[parameters('appServiceWorkerSize')]", - "hostingEnvironment": "", - "numberOfWorkers": 1 + "apiVersion": "2015-04-01", + "name": "connectionstrings", + "type": "config", + "dependsOn": [ + "[resourceId('Microsoft.Web/Sites', parameters('appName'))]", + "[concat('Microsoft.Sql/servers/', parameters('dbServerName'), '/databases/', parameters('dbName'))]", + "[concat('Microsoft.Web/Sites/', parameters('appName'), '/Extensions/MSDeploy')]" + ], + "properties": { + "defaultConnection": { + "value": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', parameters('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", + "type": "SQLAzure" } + } }, { - "apiVersion": "2015-02-01", - "name": "[parameters('appName')]", - "type": "Microsoft.Web/Sites", - "location": "[resourceGroup().location]", - "tags": { - "[concat('hidden-related:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "empty" - }, - "dependsOn": [ - "[concat('Microsoft.Web/serverFarms/', variables('appServicePlanName'))]" - ], - "properties": { - "name": "[parameters('appName')]", - "serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/',resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", - "hostingEnvironment": "" + "apiVersion": "2014-06-01", + "name": "web", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', parameters('appName'))]" + ], + "properties": { + "phpVersion": "off", + "netFrameworkVersion": "v4.5", + "use32BitWorkerProcess": "true", + "webSocketsEnabled": true, + "alwaysOn": "true", + "httpLoggingEnabled": true, + "logsDirectorySizeLimit": 40 + } + } + ] + }, + { + "apiVersion": "2014-04-01", + "name": "[concat(variables('appServicePlanName'), '-scaleset')]", + "type": "microsoft.insights/autoscalesettings", + "location": "[variables('appInsightsRegion')]", + "tags": { + "[concat('hidden-link:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" + ], + "properties": { + "profiles": [ + { + "name": "Default", + "capacity": { + "minimum": "1", + "maximum": "2", + "default": "1" }, - "resources": [ - { - "apiVersion": "2014-06-01", - "name": "MSDeploy", - "type": "Extensions", - "dependsOn": [ - "[concat('Microsoft.Web/Sites/', parameters('appName'))]", - "[concat('Microsoft.Web/Sites/', parameters('appName'), '/config/web')]", - "[concat('Microsoft.Sql/servers/', parameters('dbServerName'), '/databases/', parameters('dbName'))]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" - ], - "properties": { - "packageUri": "https://auxmktplceprod.blob.core.windows.net/packages/ScalableUmbracoCms.WebPI.7.4.3.zip", - "dbType": "SQL", - "connectionString": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', parameters('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", - "setParameters": { - "Application Path": "[parameters('appName')]", - "Database Server": "[reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName]", - "Database Name": "[parameters('dbName')]", - "Database Username": "[parameters('nonAdminDatabaseUsername')]", - "Database Password": "[parameters('nonAdminDatabasePassword')]", - "Database Administrator": "[parameters('dbAdministratorLogin')]", - "Database Administrator Password": "[parameters('dbAdministratorLoginPassword')]", - "azurestoragerootUrl": "[concat('https://',variables('storageAccountName'), '.blob.core.windows.net')]", - "azurestoragecontainerName": "media", - "azurestorageconnectionString": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'), ';AccountKey=' , listKeys(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2015-05-01-preview').key1 )]", - "rediscachehost": "[concat(parameters('redisCacheName'), '.redis.cache.windows.net')]", - "rediscacheport": "6379", - "rediscacheaccessKey": "[listKeys(resourceId('Microsoft.Cache/Redis', parameters('redisCacheName')), '2014-04-01').primaryKey]", - "azurestoragecacheControl": "*|public, max-age=31536000;js|no-cache" - } - } + "rules": [ + { + "metricTrigger": { + "metricName": "CpuPercentage", + "metricResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT10M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 }, - { - "apiVersion": "2015-04-01", - "name": "connectionstrings", - "type": "config", - "dependsOn": [ - "[resourceId('Microsoft.Web/Sites', parameters('appName'))]", - "[concat('Microsoft.Sql/servers/', parameters('dbServerName'), '/databases/', parameters('dbName'))]", - "[concat('Microsoft.Web/Sites/', parameters('appName'), '/Extensions/MSDeploy')]" - ], - "properties": { - "defaultConnection": { - "value": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', parameters('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", - "type": "SQLAzure" - } - } + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT10M" + } + }, + { + "metricTrigger": { + "metricName": "CpuPercentage", + "metricResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT1H", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 }, - { - "apiVersion": "2014-06-01", - "name": "web", - "type": "config", - "dependsOn": [ - "[concat('Microsoft.Web/Sites/', parameters('appName'))]" - ], - "properties": { - "phpVersion": "off", - "netFrameworkVersion": "v4.5", - "use32BitWorkerProcess": "true", - "webSocketsEnabled": true, - "alwaysOn": "true", - "httpLoggingEnabled": true, - "logsDirectorySizeLimit": 40 - } + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT1H" } + } ] + } + ], + "enabled": false, + "name": "[concat(variables('appServicePlanName'), '-scaleset')]", + "targetResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" + } + }, + { + "apiVersion": "2014-04-01", + "name": "[concat('ServerErrors ', parameters('appName'))]", + "type": "microsoft.insights/alertrules", + "location": "[variables('appInsightsRegion')]", + "tags": { + "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('appName'))]" + ], + "properties": { + "name": "[concat('ServerErrors ', parameters('appName'))]", + "description": "[concat(parameters('appName'), ' has some server errors, status code 5xx.')]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]", + "metricName": "Http5xx" + }, + "operator": "GreaterThan", + "threshold": 0, + "windowSize": "PT5M" }, - { - "apiVersion": "2014-04-01", - "name": "[concat(variables('appServicePlanName'), '-scaleset')]", - "type": "microsoft.insights/autoscalesettings", - "location": "[variables('appInsightsRegion')]", - "tags": { - "[concat('hidden-link:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "Resource" - }, - "dependsOn": [ - "[concat('Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" - ], - "properties": { - "profiles": [ - { - "name": "Default", - "capacity": { - "minimum": "1", - "maximum": "2", - "default": "1" - }, - "rules": [ - { - "metricTrigger": { - "metricName": "CpuPercentage", - "metricResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", - "timeGrain": "PT1M", - "statistic": "Average", - "timeWindow": "PT10M", - "timeAggregation": "Average", - "operator": "GreaterThan", - "threshold": 80 - }, - "scaleAction": { - "direction": "Increase", - "type": "ChangeCount", - "value": "1", - "cooldown": "PT10M" - } - }, - { - "metricTrigger": { - "metricName": "CpuPercentage", - "metricResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", - "timeGrain": "PT1M", - "statistic": "Average", - "timeWindow": "PT1H", - "timeAggregation": "Average", - "operator": "LessThan", - "threshold": 60 - }, - "scaleAction": { - "direction": "Decrease", - "type": "ChangeCount", - "value": "1", - "cooldown": "PT1H" - } - } - ] - } - ], - "enabled": false, - "name": "[concat(variables('appServicePlanName'), '-scaleset')]", - "targetResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" - } - }, - { - "apiVersion": "2014-04-01", - "name": "[concat('ServerErrors ', parameters('appName'))]", - "type": "microsoft.insights/alertrules", - "location": "[variables('appInsightsRegion')]", - "tags": { - "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]": "Resource" - }, - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('appName'))]" - ], - "properties": { - "name": "[concat('ServerErrors ', parameters('appName'))]", - "description": "[concat(parameters('appName'), ' has some server errors, status code 5xx.')]", - "isEnabled": false, - "condition": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", - "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]", - "metricName": "Http5xx" - }, - "operator": "GreaterThan", - "threshold": 0, - "windowSize": "PT5M" - }, - "action": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", - "sendToServiceOwners": true, - "customEmails": [] - } - } + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + }, + { + "apiVersion": "2014-04-01", + "name": "[concat('ForbiddenRequests ', parameters('appName'))]", + "type": "microsoft.insights/alertrules", + "location": "[variables('appInsightsRegion')]", + "tags": { + "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('appName'))]" + ], + "properties": { + "name": "[concat('ForbiddenRequests ', parameters('appName'))]", + "description": "[concat(parameters('appName'), ' has some requests that are forbidden, status code 403.')]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]", + "metricName": "Http403" + }, + "operator": "GreaterThan", + "threshold": 0, + "windowSize": "PT5M" }, - { - "apiVersion": "2014-04-01", - "name": "[concat('ForbiddenRequests ', parameters('appName'))]", - "type": "microsoft.insights/alertrules", - "location": "[variables('appInsightsRegion')]", - "tags": { - "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]": "Resource" - }, - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('appName'))]" - ], - "properties": { - "name": "[concat('ForbiddenRequests ', parameters('appName'))]", - "description": "[concat(parameters('appName'), ' has some requests that are forbidden, status code 403.')]", - "isEnabled": false, - "condition": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", - "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]", - "metricName": "Http403" - }, - "operator": "GreaterThan", - "threshold": 0, - "windowSize": "PT5M" - }, - "action": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", - "sendToServiceOwners": true, - "customEmails": [] - } - } + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + }, + { + "apiVersion": "2014-04-01", + "name": "[concat('CPUHigh ', variables('appServicePlanName'))]", + "type": "microsoft.insights/alertrules", + "location": "[variables('appInsightsRegion')]", + "tags": { + "[concat('hidden-link:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" + ], + "properties": { + "name": "[concat('CPUHigh ', variables('appServicePlanName'))]", + "description": "[concat('The average CPU is high across all the instances of ', variables('appServicePlanName'))]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", + "metricName": "CpuPercentage" + }, + "operator": "GreaterThan", + "threshold": 90, + "windowSize": "PT15M" }, - { - "apiVersion": "2014-04-01", - "name": "[concat('CPUHigh ', variables('appServicePlanName'))]", - "type": "microsoft.insights/alertrules", - "location": "[variables('appInsightsRegion')]", - "tags": { - "[concat('hidden-link:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "Resource" - }, - "dependsOn": [ - "[concat('Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" - ], - "properties": { - "name": "[concat('CPUHigh ', variables('appServicePlanName'))]", - "description": "[concat('The average CPU is high across all the instances of ', variables('appServicePlanName'))]", - "isEnabled": false, - "condition": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", - "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", - "metricName": "CpuPercentage" - }, - "operator": "GreaterThan", - "threshold": 90, - "windowSize": "PT15M" - }, - "action": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", - "sendToServiceOwners": true, - "customEmails": [] - } - } + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + }, + { + "apiVersion": "2014-04-01", + "name": "[concat('LongHttpQueue ', variables('appServicePlanName'))]", + "type": "microsoft.insights/alertrules", + "location": "[variables('appInsightsRegion')]", + "tags": { + "[concat('hidden-link:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" + ], + "properties": { + "name": "[concat('LongHttpQueue ', variables('appServicePlanName'))]", + "description": "[concat('The HTTP queue for the instances of ', variables('appServicePlanName'), ' has a large number of pending requests.')]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", + "metricName": "HttpQueueLength" + }, + "operator": "GreaterThan", + "threshold": 100, + "windowSize": "PT5M" }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + }, + { + "apiVersion": "2014-04-01", + "name": "[concat(parameters('appName'),'-appin')]", + "type": "microsoft.insights/components", + "location": "[variables('appInsightsRegion')]", + "tags": { + "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('appName'))]" + ], + "properties": { + "applicationId": "[parameters('appName')]" + } + }, + { + "apiVersion": "2015-02-01", + "name": "[variables('umbracoAdminWebAppName')]", + "type": "Microsoft.Web/Sites", + "location": "[parameters('location')]", + "tags": { + "[concat('hidden-related:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "empty" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverFarms/', variables('appServicePlanName'))]" + ], + "properties": { + "name": "[variables('umbracoAdminWebAppName')]", + "serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/',resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", + "hostingEnvironment": "" + }, + "resources": [ { - "apiVersion": "2014-04-01", - "name": "[concat('LongHttpQueue ', variables('appServicePlanName'))]", - "type": "microsoft.insights/alertrules", - "location": "[variables('appInsightsRegion')]", - "tags": { - "[concat('hidden-link:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "Resource" - }, - "dependsOn": [ - "[concat('Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" - ], - "properties": { - "name": "[concat('LongHttpQueue ', variables('appServicePlanName'))]", - "description": "[concat('The HTTP queue for the instances of ', variables('appServicePlanName'), ' has a large number of pending requests.')]", - "isEnabled": false, - "condition": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", - "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", - "metricName": "HttpQueueLength" - }, - "operator": "GreaterThan", - "threshold": 100, - "windowSize": "PT5M" - }, - "action": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", - "sendToServiceOwners": true, - "customEmails": [] - } + "apiVersion": "2014-06-01", + "name": "MSDeploy", + "type": "Extensions", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', variables('umbracoAdminWebAppName'))]", + "[concat('Microsoft.Web/Sites/',variables('umbracoAdminWebAppName'), '/config/web')]", + "[concat('Microsoft.Sql/servers/', parameters('dbServerName'), '/databases/', parameters('dbName'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" + ], + "properties": { + "packageUri": "https://auxmktplceprod.blob.core.windows.net/packages/ScalableUmbracoCms.WebPI.7.4.3.zip", + "dbType": "SQL", + "connectionString": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', parameters('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", + "setParameters": { + "Application Path": "[variables('umbracoAdminWebAppName')]", + "Database Server": "[reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName]", + "Database Name": "[parameters('dbName')]", + "Database Username": "[concat(parameters('nonAdminDatabaseUsername'),'admin')]", + "Database Password": "[parameters('nonAdminDatabasePassword')]", + "Database Administrator": "[parameters('dbAdministratorLogin')]", + "Database Administrator Password": "[parameters('dbAdministratorLoginPassword')]", + "azurestoragerootUrl": "[concat('https://',variables('storageAccountName'), '.blob.core.windows.net')]", + "azurestoragecontainerName": "media", + "azurestorageconnectionString": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'), ';AccountKey=' , listKeys(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2015-05-01-preview').key1 )]", + "rediscachehost": "[concat(parameters('redisCacheName'), '.redis.cache.windows.net')]", + "rediscacheport": "6379", + "rediscacheaccessKey": "[listKeys(resourceId('Microsoft.Cache/Redis', parameters('redisCacheName')), '2014-04-01').primaryKey]", + "azurestoragecacheControl": "*|public, max-age=31536000;js|no-cache" } + } }, { - "apiVersion": "2014-04-01", - "name": "[concat(parameters('appName'),'-appin')]", - "type": "microsoft.insights/components", - "location": "[variables('appInsightsRegion')]", - "tags": { - "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]": "Resource" - }, - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('appName'))]" - ], - "properties": { - "applicationId": "[parameters('appName')]" + "apiVersion": "2015-04-01", + "name": "connectionstrings", + "type": "config", + "dependsOn": [ + "[resourceId('Microsoft.Web/Sites', variables('umbracoAdminWebAppName'))]", + "[concat('Microsoft.Sql/servers/', parameters('dbServerName'), '/databases/', parameters('dbName'))]", + "[concat('Microsoft.Web/Sites/', variables('umbracoAdminWebAppName'), '/Extensions/MSDeploy')]" + ], + "properties": { + "defaultConnection": { + "value": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', parameters('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", + "type": "SQLAzure" } + } }, { - "apiVersion": "2015-02-01", - "name": "[variables('umbracoAdminWebAppName')]", - "type": "Microsoft.Web/Sites", - "location": "[resourceGroup().location]", - "tags": { - "[concat('hidden-related:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "empty" - }, - "dependsOn": [ - "[concat('Microsoft.Web/serverFarms/', variables('appServicePlanName'))]" - ], - "properties": { - "name": "[variables('umbracoAdminWebAppName')]", - "serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/',resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", - "hostingEnvironment": "" - }, - "resources": [ - { - "apiVersion": "2014-06-01", - "name": "MSDeploy", - "type": "Extensions", - "dependsOn": [ - "[concat('Microsoft.Web/Sites/', variables('umbracoAdminWebAppName'))]", - "[concat('Microsoft.Web/Sites/',variables('umbracoAdminWebAppName'), '/config/web')]", - "[concat('Microsoft.Sql/servers/', parameters('dbServerName'), '/databases/', parameters('dbName'))]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" - ], - "properties": { - "packageUri": "https://auxmktplceprod.blob.core.windows.net/packages/ScalableUmbracoCms.WebPI.7.4.3.zip", - "dbType": "SQL", - "connectionString": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', parameters('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", - "setParameters": { - "Application Path": "[variables('umbracoAdminWebAppName')]", - "Database Server": "[reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName]", - "Database Name": "[parameters('dbName')]", - "Database Username": "[concat(parameters('nonAdminDatabaseUsername'),'admin')]", - "Database Password": "[parameters('nonAdminDatabasePassword')]", - "Database Administrator": "[parameters('dbAdministratorLogin')]", - "Database Administrator Password": "[parameters('dbAdministratorLoginPassword')]", - "azurestoragerootUrl": "[concat('https://',variables('storageAccountName'), '.blob.core.windows.net')]", - "azurestoragecontainerName": "media", - "azurestorageconnectionString": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'), ';AccountKey=' , listKeys(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2015-05-01-preview').key1 )]", - "rediscachehost": "[concat(parameters('redisCacheName'), '.redis.cache.windows.net')]", - "rediscacheport": "6379", - "rediscacheaccessKey": "[listKeys(resourceId('Microsoft.Cache/Redis', parameters('redisCacheName')), '2014-04-01').primaryKey]", - "azurestoragecacheControl": "*|public, max-age=31536000;js|no-cache" - } - } - }, - { - "apiVersion": "2015-04-01", - "name": "connectionstrings", - "type": "config", - "dependsOn": [ - "[resourceId('Microsoft.Web/Sites', variables('umbracoAdminWebAppName'))]", - "[concat('Microsoft.Sql/servers/', parameters('dbServerName'), '/databases/', parameters('dbName'))]", - "[concat('Microsoft.Web/Sites/', variables('umbracoAdminWebAppName'), '/Extensions/MSDeploy')]" - - ], - "properties": { - "defaultConnection": { - "value": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', parameters('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", - "type": "SQLAzure" - } - } - }, - { - "apiVersion": "2014-06-01", - "name": "web", - "type": "config", - "dependsOn": [ - "[concat('Microsoft.Web/Sites/', variables('umbracoAdminWebAppName'))]" - ], - "properties": { - "phpVersion": "off", - "netFrameworkVersion": "v4.5", - "use32BitWorkerProcess": "true", - "webSocketsEnabled": true, - "alwaysOn": "true", - "httpLoggingEnabled": true, - "logsDirectorySizeLimit": 40 - } - } - ] + "apiVersion": "2014-06-01", + "name": "web", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', variables('umbracoAdminWebAppName'))]" + ], + "properties": { + "phpVersion": "off", + "netFrameworkVersion": "v4.5", + "use32BitWorkerProcess": "true", + "webSocketsEnabled": true, + "alwaysOn": "true", + "httpLoggingEnabled": true, + "logsDirectorySizeLimit": 40 + } } - ] + ] + } + ] } diff --git a/umbraco-webapp-simple/azuredeploy.json b/umbraco-webapp-simple/azuredeploy.json index 72fb9edb72e8..fa97c2fa8320 100644 --- a/umbraco-webapp-simple/azuredeploy.json +++ b/umbraco-webapp-simple/azuredeploy.json @@ -1,458 +1,463 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "appName": { - "type": "string", - "metadata": { - "description": "Name of azure web app" - } - }, - "appServiceTier": { - "type": "string", - "allowedValues": [ - "Standard", - "Premium" - ], - "defaultValue": "Standard", - "metadata": { - "description": "Choose either Standard or Premium Azure Web Apps pricing tiers. It defaults to Standard" - } - }, - "appServiceWorkerSize": { - "type": "string", - "allowedValues": [ - "0", - "1", - "2" - ], - "defaultValue": "0", - "metadata": { - "description": "Worker Size( 0=Small, 1=Medium, 2=Large )" - } - }, - "dbServerName": { - "type": "string", - "metadata": { - "description": "SQL Azure DB Server name" - } - }, - "dbAdministratorLogin": { - "type": "string", - "metadata": { - "description": "SQL Azure DB administrator user login" - } - }, - "dbAdministratorLoginPassword": { - "type": "securestring", - "metadata": { - "description": "Database admin user password" - } - }, - "dbName": { - "type": "string", - "metadata": { - "description": "Database Name" - } - }, - "dbEdition": { - "type": "string", - "allowedValues": [ - "Basic", - "Standard", - "Premium" - ], - "defaultValue": "Standard", - "metadata": { - "description": "SQL DB appServiceTier : Basic,Standard,Premium" - } - }, - "nonAdminDatabaseUserName": { - "type": "string", - "metadata": { - "description": "Non-admin Database User. Must be Unique" - } - }, - "nonAdminDatabasePassword": { - "type": "securestring", - "metadata": { - "description": "Non-admin Database User password" - } - }, - "storageAccountType": { - "type": "string", - "allowedValues": [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Standard_ZRS" - ], - "defaultValue": "Standard_LRS", - "metadata": { - "description": "Storage Account Type : Standard-LRS, Standard-GRS,Standard-RAGRS,Standard-ZRS" - } - } + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "appName": { + "type": "string", + "metadata": { + "description": "Name of azure web app" + } + }, + "appServiceTier": { + "type": "string", + "allowedValues": [ + "Standard", + "Premium" + ], + "defaultValue": "Standard", + "metadata": { + "description": "Choose either Standard or Premium Azure Web Apps pricing tiers. It defaults to Standard" + } }, - "variables": { - "appInsightsRegion": "South Central US", - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "umbracoAdminWebAppName": "[concat(parameters('appName'), 'adminapp')]", - "appServicePlanName":"[concat(parameters('appName'), 'serviceplan')]" + "appServiceWorkerSize": { + "type": "string", + "allowedValues": [ + "0", + "1", + "2" + ], + "defaultValue": "0", + "metadata": { + "description": "Worker Size( 0=Small, 1=Medium, 2=Large )" + } }, - "resources": [ + "dbServerName": { + "type": "string", + "metadata": { + "description": "SQL Azure DB Server name" + } + }, + "dbAdministratorLogin": { + "type": "string", + "metadata": { + "description": "SQL Azure DB administrator user login" + } + }, + "dbAdministratorLoginPassword": { + "type": "securestring", + "metadata": { + "description": "Database admin user password" + } + }, + "dbName": { + "type": "string", + "metadata": { + "description": "Database Name" + } + }, + "dbEdition": { + "type": "string", + "allowedValues": [ + "Basic", + "Standard", + "Premium" + ], + "defaultValue": "Standard", + "metadata": { + "description": "SQL DB appServiceTier : Basic,Standard,Premium" + } + }, + "nonAdminDatabaseUserName": { + "type": "string", + "metadata": { + "description": "Non-admin Database User. Must be Unique" + } + }, + "nonAdminDatabasePassword": { + "type": "securestring", + "metadata": { + "description": "Non-admin Database User password" + } + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Storage Account Type : Standard-LRS, Standard-GRS,Standard-RAGRS,Standard-ZRS" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "appInsightsRegion": "South Central US", + "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", + "appServicePlanName": "[concat(parameters('appName'), 'serviceplan')]" + }, + "resources": [ + { + "name": "[parameters('dbServerName')]", + "type": "Microsoft.Sql/servers", + "location": "[parameters('location')]", + "apiVersion": "2014-04-01-preview", + "properties": { + "administratorLogin": "[parameters('dbAdministratorLogin')]", + "administratorLoginPassword": "[parameters('dbAdministratorLoginPassword')]", + "version": "12.0" + }, + "resources": [ { - "name": "[parameters('dbServerName')]", - "type": "Microsoft.Sql/servers", - "location": "[resourceGroup().location]", - "apiVersion": "2014-04-01-preview", - "properties": { - "administratorLogin": "[parameters('dbAdministratorLogin')]", - "administratorLoginPassword": "[parameters('dbAdministratorLoginPassword')]", - "version": "12.0" - }, - "resources": [ - { - "apiVersion": "2014-04-01-preview", - "name": "[parameters('dbName')]", - "type": "databases", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[parameters('dbServerName')]" - ], - "properties": { - "edition": "[parameters('dbEdition')]", - "collation": "SQL_Latin1_General_CP1_CI_AS", - "requestedServiceObjectiveId": "F1173C43-91BD-4AAA-973C-54E79E15235B" - } - }, - { - "apiVersion": "2014-04-01-preview", - "name": "AllowAllWindowsAzureIps", - "type": "firewallrules", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Sql/servers/', parameters('dbServerName'))]" - ], - "properties": { - "endIpAddress": "0.0.0.0", - "startIpAddress": "0.0.0.0" - } - } - ] + "apiVersion": "2014-04-01-preview", + "name": "[parameters('dbName')]", + "type": "databases", + "location": "[parameters('location')]", + "dependsOn": [ + "[parameters('dbServerName')]" + ], + "properties": { + "edition": "[parameters('dbEdition')]", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "requestedServiceObjectiveId": "F1173C43-91BD-4AAA-973C-54E79E15235B" + } }, { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('storageAccountName')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "sku": { - "name": "[parameters('storageAccountType')]" - }, - "kind": "Storage", - "properties": { - } - }, + "apiVersion": "2014-04-01-preview", + "name": "AllowAllWindowsAzureIps", + "type": "firewallrules", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Sql/servers/', parameters('dbServerName'))]" + ], + "properties": { + "endIpAddress": "0.0.0.0", + "startIpAddress": "0.0.0.0" + } + } + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2014-06-01", + "name": "[variables('appServicePlanName')]", + "type": "Microsoft.Web/serverFarms", + "location": "[parameters('location')]", + "properties": { + "name": "[variables('appServicePlanName')]", + "appServiceTier": "[parameters('appServiceTier')]", + "workerSize": "[parameters('appServiceWorkerSize')]", + "hostingEnvironment": "", + "numberOfWorkers": 1 + } + }, + { + "apiVersion": "2015-02-01", + "name": "[parameters('appName')]", + "type": "Microsoft.Web/Sites", + "location": "[parameters('location')]", + "tags": { + "[concat('hidden-related:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "empty" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverFarms/', variables('appServicePlanName'))]" + ], + "properties": { + "name": "[parameters('appName')]", + "serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/',resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", + "hostingEnvironment": "" + }, + "resources": [ { - "apiVersion": "2014-06-01", - "name": "[variables('appServicePlanName')]", - "type": "Microsoft.Web/serverFarms", - "location": "[resourceGroup().location]", - "properties": { - "name": "[variables('appServicePlanName')]", - "appServiceTier": "[parameters('appServiceTier')]", - "workerSize": "[parameters('appServiceWorkerSize')]", - "hostingEnvironment": "", - "numberOfWorkers": 1 + "apiVersion": "2014-06-01", + "name": "MSDeploy", + "type": "Extensions", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', parameters('appName'))]", + "[concat('Microsoft.Web/Sites/', parameters('appName'), '/config/web')]", + "[concat('Microsoft.Sql/servers/', parameters('dbServerName'), '/databases/', parameters('dbName'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" + ], + "properties": { + "packageUri": "https://auxmktplceprod.blob.core.windows.net/packages/UmbracoCms.WebPI.7.4.3.zip", + "dbType": "SQL", + "connectionString": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', parameters('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", + "setParameters": { + "Application Path": "[parameters('appName')]", + "Database Server": "[reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName]", + "Database Name": "[parameters('dbName')]", + "Database Username": "[parameters('nonAdminDatabaseUserName')]", + "Database Password": "[parameters('nonAdminDatabasePassword')]", + "Database Administrator": "[parameters('dbAdministratorLogin')]", + "Database Administrator Password": "[parameters('dbAdministratorLoginPassword')]" } + } }, { - "apiVersion": "2015-02-01", - "name": "[parameters('appName')]", - "type": "Microsoft.Web/Sites", - "location": "[resourceGroup().location]", - "tags": { - "[concat('hidden-related:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "empty" - }, - "dependsOn": [ - "[concat('Microsoft.Web/serverFarms/', variables('appServicePlanName'))]" - ], - "properties": { - "name": "[parameters('appName')]", - "serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/',resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", - "hostingEnvironment": "" - }, - "resources": [ - { - "apiVersion": "2014-06-01", - "name": "MSDeploy", - "type": "Extensions", - "dependsOn": [ - "[concat('Microsoft.Web/Sites/', parameters('appName'))]", - "[concat('Microsoft.Web/Sites/', parameters('appName'), '/config/web')]", - "[concat('Microsoft.Sql/servers/', parameters('dbServerName'), '/databases/', parameters('dbName'))]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" - ], - "properties": { - "packageUri": "https://auxmktplceprod.blob.core.windows.net/packages/UmbracoCms.WebPI.7.4.3.zip", - "dbType": "SQL", - "connectionString": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', parameters('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", - "setParameters": { - "Application Path": "[parameters('appName')]", - "Database Server": "[reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName]", - "Database Name": "[parameters('dbName')]", - "Database Username": "[parameters('nonAdminDatabaseUserName')]", - "Database Password": "[parameters('nonAdminDatabasePassword')]", - "Database Administrator": "[parameters('dbAdministratorLogin')]", - "Database Administrator Password": "[parameters('dbAdministratorLoginPassword')]" - } - } - }, - { - "apiVersion": "2015-04-01", - "name": "connectionstrings", - "type": "config", - "dependsOn": [ - "[resourceId('Microsoft.Web/Sites', parameters('appName'))]", - "[concat('Microsoft.Sql/servers/', parameters('dbServerName'), '/databases/', parameters('dbName'))]", - "[concat('Microsoft.Web/Sites/', parameters('appName'), '/Extensions/MSDeploy')]" - ], - "properties": { - "defaultConnection": { - "value": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', parameters('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", - "type": "SQLAzure" - } - } - }, - { - "apiVersion": "2014-06-01", - "name": "web", - "type": "config", - "dependsOn": [ - "[concat('Microsoft.Web/Sites/', parameters('appName'))]" - ], - "properties": { - "phpVersion": "off", - "netFrameworkVersion": "v4.5", - "use32BitWorkerProcess": "true", - "webSocketsEnabled": true, - "alwaysOn": "true", - "httpLoggingEnabled": true, - "logsDirectorySizeLimit": 40 - } - } - ] - }, - { - "apiVersion": "2014-04-01", - "name": "[concat(variables('appServicePlanName'), '-scaleset')]", - "type": "microsoft.insights/autoscalesettings", - "location": "[variables('appInsightsRegion')]", - "tags": { - "[concat('hidden-link:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "Resource" - }, - "dependsOn": [ - "[concat('Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" - ], - "properties": { - "profiles": [ - { - "name": "Default", - "capacity": { - "minimum": "1", - "maximum": "2", - "default": "1" - }, - "rules": [ - { - "metricTrigger": { - "metricName": "CpuPercentage", - "metricResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", - "timeGrain": "PT1M", - "statistic": "Average", - "timeWindow": "PT10M", - "timeAggregation": "Average", - "operator": "GreaterThan", - "threshold": 80 - }, - "scaleAction": { - "direction": "Increase", - "type": "ChangeCount", - "value": "1", - "cooldown": "PT10M" - } - }, - { - "metricTrigger": { - "metricName": "CpuPercentage", - "metricResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", - "timeGrain": "PT1M", - "statistic": "Average", - "timeWindow": "PT1H", - "timeAggregation": "Average", - "operator": "LessThan", - "threshold": 60 - }, - "scaleAction": { - "direction": "Decrease", - "type": "ChangeCount", - "value": "1", - "cooldown": "PT1H" - } - } - ] - } - ], - "enabled": false, - "name": "[concat(variables('appServicePlanName'), '-scaleset')]", - "targetResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" + "apiVersion": "2015-04-01", + "name": "connectionstrings", + "type": "config", + "dependsOn": [ + "[resourceId('Microsoft.Web/Sites', parameters('appName'))]", + "[concat('Microsoft.Sql/servers/', parameters('dbServerName'), '/databases/', parameters('dbName'))]", + "[concat('Microsoft.Web/Sites/', parameters('appName'), '/Extensions/MSDeploy')]" + ], + "properties": { + "defaultConnection": { + "value": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('dbServerName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('dbName'), ';User Id=', parameters('dbAdministratorLogin'), '@', parameters('dbServerName'), ';Password=', parameters('dbAdministratorLoginPassword'), ';')]", + "type": "SQLAzure" } + } }, { - "apiVersion": "2014-04-01", - "name": "[concat('ServerErrors ', parameters('appName'))]", - "type": "microsoft.insights/alertrules", - "location": "[variables('appInsightsRegion')]", - "tags": { - "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]": "Resource" + "apiVersion": "2014-06-01", + "name": "web", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', parameters('appName'))]" + ], + "properties": { + "phpVersion": "off", + "netFrameworkVersion": "v4.5", + "use32BitWorkerProcess": "true", + "webSocketsEnabled": true, + "alwaysOn": "true", + "httpLoggingEnabled": true, + "logsDirectorySizeLimit": 40 + } + } + ] + }, + { + "apiVersion": "2014-04-01", + "name": "[concat(variables('appServicePlanName'), '-scaleset')]", + "type": "microsoft.insights/autoscalesettings", + "location": "[variables('appInsightsRegion')]", + "tags": { + "[concat('hidden-link:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" + ], + "properties": { + "profiles": [ + { + "name": "Default", + "capacity": { + "minimum": "1", + "maximum": "2", + "default": "1" }, - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('appName'))]" - ], - "properties": { - "name": "[concat('ServerErrors ', parameters('appName'))]", - "description": "[concat(parameters('appName'), ' has some server errors, status code 5xx.')]", - "isEnabled": false, - "condition": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", - "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]", - "metricName": "Http5xx" - }, - "operator": "GreaterThan", - "threshold": 0, - "windowSize": "PT5M" + "rules": [ + { + "metricTrigger": { + "metricName": "CpuPercentage", + "metricResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT10M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 }, - "action": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", - "sendToServiceOwners": true, - "customEmails": [] + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT10M" } - } - }, - { - "apiVersion": "2014-04-01", - "name": "[concat('ForbiddenRequests ', parameters('appName'))]", - "type": "microsoft.insights/alertrules", - "location": "[variables('appInsightsRegion')]", - "tags": { - "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]": "Resource" - }, - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('appName'))]" - ], - "properties": { - "name": "[concat('ForbiddenRequests ', parameters('appName'))]", - "description": "[concat(parameters('appName'), ' has some requests that are forbidden, status code 403.')]", - "isEnabled": false, - "condition": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", - "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]", - "metricName": "Http403" - }, - "operator": "GreaterThan", - "threshold": 0, - "windowSize": "PT5M" + }, + { + "metricTrigger": { + "metricName": "CpuPercentage", + "metricResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT1H", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 }, - "action": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", - "sendToServiceOwners": true, - "customEmails": [] + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT1H" } - } + } + ] + } + ], + "enabled": false, + "name": "[concat(variables('appServicePlanName'), '-scaleset')]", + "targetResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" + } + }, + { + "apiVersion": "2014-04-01", + "name": "[concat('ServerErrors ', parameters('appName'))]", + "type": "microsoft.insights/alertrules", + "location": "[variables('appInsightsRegion')]", + "tags": { + "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('appName'))]" + ], + "properties": { + "name": "[concat('ServerErrors ', parameters('appName'))]", + "description": "[concat(parameters('appName'), ' has some server errors, status code 5xx.')]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]", + "metricName": "Http5xx" + }, + "operator": "GreaterThan", + "threshold": 0, + "windowSize": "PT5M" }, - { - "apiVersion": "2014-04-01", - "name": "[concat('CPUHigh ', variables('appServicePlanName'))]", - "type": "microsoft.insights/alertrules", - "location": "[variables('appInsightsRegion')]", - "tags": { - "[concat('hidden-link:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "Resource" - }, - "dependsOn": [ - "[concat('Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" - ], - "properties": { - "name": "[concat('CPUHigh ', variables('appServicePlanName'))]", - "description": "[concat('The average CPU is high across all the instances of ', variables('appServicePlanName'))]", - "isEnabled": false, - "condition": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", - "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", - "metricName": "CpuPercentage" - }, - "operator": "GreaterThan", - "threshold": 90, - "windowSize": "PT15M" - }, - "action": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", - "sendToServiceOwners": true, - "customEmails": [] - } - } + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + }, + { + "apiVersion": "2014-04-01", + "name": "[concat('ForbiddenRequests ', parameters('appName'))]", + "type": "microsoft.insights/alertrules", + "location": "[variables('appInsightsRegion')]", + "tags": { + "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('appName'))]" + ], + "properties": { + "name": "[concat('ForbiddenRequests ', parameters('appName'))]", + "description": "[concat(parameters('appName'), ' has some requests that are forbidden, status code 403.')]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]", + "metricName": "Http403" + }, + "operator": "GreaterThan", + "threshold": 0, + "windowSize": "PT5M" }, - { - "apiVersion": "2014-04-01", - "name": "[concat('LongHttpQueue ', variables('appServicePlanName'))]", - "type": "microsoft.insights/alertrules", - "location": "[variables('appInsightsRegion')]", - "tags": { - "[concat('hidden-link:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "Resource" - }, - "dependsOn": [ - "[concat('Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" - ], - "properties": { - "name": "[concat('LongHttpQueue ', variables('appServicePlanName'))]", - "description": "[concat('The HTTP queue for the instances of ', variables('appServicePlanName'), ' has a large number of pending requests.')]", - "isEnabled": false, - "condition": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", - "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", - "metricName": "HttpQueueLength" - }, - "operator": "GreaterThan", - "threshold": 100, - "windowSize": "PT5M" - }, - "action": { - "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", - "sendToServiceOwners": true, - "customEmails": [] - } - } + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + }, + { + "apiVersion": "2014-04-01", + "name": "[concat('CPUHigh ', variables('appServicePlanName'))]", + "type": "microsoft.insights/alertrules", + "location": "[variables('appInsightsRegion')]", + "tags": { + "[concat('hidden-link:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" + ], + "properties": { + "name": "[concat('CPUHigh ', variables('appServicePlanName'))]", + "description": "[concat('The average CPU is high across all the instances of ', variables('appServicePlanName'))]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", + "metricName": "CpuPercentage" + }, + "operator": "GreaterThan", + "threshold": 90, + "windowSize": "PT15M" }, - { - "apiVersion": "2014-04-01", - "name": "[concat(parameters('appName'),'-appin')]", - "type": "microsoft.insights/components", - "location": "[variables('appInsightsRegion')]", - "tags": { - "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]": "Resource" - }, - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('appName'))]" - ], - "properties": { - "applicationId": "[parameters('appName')]" - } - } - ] - } + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + }, + { + "apiVersion": "2014-04-01", + "name": "[concat('LongHttpQueue ', variables('appServicePlanName'))]", + "type": "microsoft.insights/alertrules", + "location": "[variables('appInsightsRegion')]", + "tags": { + "[concat('hidden-link:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" + ], + "properties": { + "name": "[concat('LongHttpQueue ', variables('appServicePlanName'))]", + "description": "[concat('The HTTP queue for the instances of ', variables('appServicePlanName'), ' has a large number of pending requests.')]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]", + "metricName": "HttpQueueLength" + }, + "operator": "GreaterThan", + "threshold": 100, + "windowSize": "PT5M" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + }, + { + "apiVersion": "2014-04-01", + "name": "[concat(parameters('appName'),'-appin')]", + "type": "microsoft.insights/components", + "location": "[variables('appInsightsRegion')]", + "tags": { + "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('appName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('appName'))]" + ], + "properties": { + "applicationId": "[parameters('appName')]" + } + } + ] +} diff --git a/vertx-openjdk-apache-mysql-on-ubuntu/azuredeploy.json b/vertx-openjdk-apache-mysql-on-ubuntu/azuredeploy.json index 115e1fadd2b6..8943d521670e 100644 --- a/vertx-openjdk-apache-mysql-on-ubuntu/azuredeploy.json +++ b/vertx-openjdk-apache-mysql-on-ubuntu/azuredeploy.json @@ -38,10 +38,16 @@ "metadata": { "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Default value is 14.04.2-LTS" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "apiVersion": "2015-05-01-preview", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", "OSDiskName": "osdiskforvertx", @@ -63,7 +69,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -72,7 +78,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -84,7 +90,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -105,7 +111,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -131,7 +137,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -174,7 +180,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'),'/newuserscript')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" ], @@ -192,4 +198,4 @@ } } ] -} \ No newline at end of file +} diff --git a/visual-studio-dev-vm-O365/azuredeploy.json b/visual-studio-dev-vm-O365/azuredeploy.json index 9739bc3fe75b..6a73438427b3 100644 --- a/visual-studio-dev-vm-O365/azuredeploy.json +++ b/visual-studio-dev-vm-O365/azuredeploy.json @@ -59,7 +59,7 @@ "dnsLabelPrefix": { "type": "string", "metadata": { - "description": "DNS Label for the Public IP. 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." + "description": "DNS Label for the Public IP. 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." } }, "officeVersion": { @@ -69,10 +69,10 @@ "Office2016", "Office2013" ], - "metadata": { + "metadata": { "description": "Which version of Office would you would like to deploy" } - }, + }, "setupOfficeScriptFileName": { "type": "string", "defaultValue": "DeployO365SilentWithVersion.ps1", @@ -85,7 +85,14 @@ "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/visual-studio-dev-vm-O365/scripts/", "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." - } + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -106,9 +113,9 @@ { "name": "[variables('storageAccountName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "Storage01" }, @@ -119,9 +126,9 @@ { "name": "VNet01", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "VNet01" }, @@ -144,7 +151,7 @@ { "name": "[variables('vmNicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', 'Vnet01')]", @@ -173,7 +180,7 @@ { "name": "[parameters('vmName')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", @@ -215,56 +222,55 @@ ] } }, - "resources": [ - { - "name": "SetupOffice", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" - ], - "tags": { - "displayName": "SetupOffice" - }, - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.8", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'), parameters('setupOfficeScriptFileName'))]", - "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/DefaultConfiguration.xml", - "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2013Setup.exe", - "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2016Setup.exe", - "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Edit-OfficeConfigurationFile.ps1", - "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Generate-ODTConfigurationXML.ps1", - "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Install-OfficeClickToRun.ps1" - ], - "commandToExecute": "[concat('powershell -ExecutionPolicy bypass -File ', parameters('setupOfficeScriptFileName'),' -OfficeVersion ', parameters('officeVersion'))]" - } + "resources": [ + { + "name": "SetupOffice", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" + ], + "tags": { + "displayName": "SetupOffice" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.8", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'), parameters('setupOfficeScriptFileName'))]", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/DefaultConfiguration.xml", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2013Setup.exe", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2016Setup.exe", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Edit-OfficeConfigurationFile.ps1", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Generate-ODTConfigurationXML.ps1", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Install-OfficeClickToRun.ps1" + ], + "commandToExecute": "[concat('powershell -ExecutionPolicy bypass -File ', parameters('setupOfficeScriptFileName'),' -OfficeVersion ', parameters('officeVersion'))]" } } - ] - }, + } + ] + }, { "name": "[variables('vmIP01Name')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "VMIP01" }, "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { - "domainNameLabel": "[parameters('dnsLabelPrefix')]" + "domainNameLabel": "[parameters('dnsLabelPrefix')]" } } } ], "outputs": {} } - diff --git a/visual-studio-dev-vm-chocolatey/azuredeploy.json b/visual-studio-dev-vm-chocolatey/azuredeploy.json index fbdc476adc11..46e756253992 100644 --- a/visual-studio-dev-vm-chocolatey/azuredeploy.json +++ b/visual-studio-dev-vm-chocolatey/azuredeploy.json @@ -2,7 +2,7 @@ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.1", "parameters": { - "storageType": { + "storageType": { "type": "string", "defaultValue": "Premium_LRS", "allowedValues": [ @@ -66,7 +66,7 @@ "dnsLabelPrefix": { "type": "string", "metadata": { - "description": "DNS Label for the Public IP. 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." + "description": "DNS Label for the Public IP. 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." } }, "chocoPackages": { @@ -88,180 +88,185 @@ "metadata": { "description": "Public uri location of PowerShell Chocolately setup script" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - "storageName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "vnet01Prefix": "10.0.0.0/16", - "vnet01Subnet1Name": "Subnet-1", - "vnet01Subnet1Prefix": "10.0.0.0/24", - "vmImagePublisher": "MicrosoftVisualStudio", - "vmImageOffer": "VisualStudio", - "vmOSDiskName": "VMOSDisk", - "vmVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'Vnet01')]", - "vmSubnetRef": "[concat(variables('VMVnetID'), '/subnets/', variables('Vnet01Subnet1Name'))]", - "vmStorageAccountContainerName": "vhds", - "vmNicName": "[concat(parameters('VMName'), 'NetworkInterface')]", - "vmIP01Name": "VMIP01" + "variables": { + "storageName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", + "vnet01Prefix": "10.0.0.0/16", + "vnet01Subnet1Name": "Subnet-1", + "vnet01Subnet1Prefix": "10.0.0.0/24", + "vmImagePublisher": "MicrosoftVisualStudio", + "vmImageOffer": "VisualStudio", + "vmOSDiskName": "VMOSDisk", + "vmVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'Vnet01')]", + "vmSubnetRef": "[concat(variables('VMVnetID'), '/subnets/', variables('Vnet01Subnet1Name'))]", + "vmStorageAccountContainerName": "vhds", + "vmNicName": "[concat(parameters('VMName'), 'NetworkInterface')]", + "vmIP01Name": "VMIP01" + }, + "resources": [ + { + "name": "[variables('storageName')]", + "type": "Microsoft.Storage/storageAccounts", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [], + "tags": { + "displayName": "Storage01" + }, + "properties": { + "accountType": "[parameters('storageType')]" + } }, - "resources": [ - { - "name": "[variables('storageName')]", - "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ ], - "tags": { - "displayName": "Storage01" - }, - "properties": { - "accountType": "[parameters('storageType')]" - } + { + "name": "VNet01", + "type": "Microsoft.Network/virtualNetworks", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [], + "tags": { + "displayName": "VNet01" }, - { - "name": "VNet01", - "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ ], - "tags": { - "displayName": "VNet01" + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vnet01Prefix')]" + ] }, - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('vnet01Prefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('vnet01Subnet1Name')]", - "properties": { - "addressPrefix": "[variables('vnet01Subnet1Prefix')]" - } + "subnets": [ + { + "name": "[variables('vnet01Subnet1Name')]", + "properties": { + "addressPrefix": "[variables('vnet01Subnet1Prefix')]" } - ] - } + } + ] + } + }, + { + "name": "[variables('vmNicName')]", + "type": "Microsoft.Network/networkInterfaces", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', 'Vnet01')]", + "[concat('Microsoft.Network/publicIPAddresses/', variables('vmIP01Name'))]" + ], + "tags": { + "displayName": "VMNic01" }, - { - "name": "[variables('vmNicName')]", - "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', 'Vnet01')]", - "[concat('Microsoft.Network/publicIPAddresses/', variables('vmIP01Name'))]" - ], - "tags": { - "displayName": "VMNic01" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[variables('vmSubnetRef')]" - }, - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmIP01Name'))]" - } + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[variables('vmSubnetRef')]" + }, + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmIP01Name'))]" } } - ] - } + } + ] + } + }, + { + "name": "[parameters('vmName')]", + "type": "Microsoft.Compute/virtualMachines", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('storageName'))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('vmNicName'))]" + ], + "tags": { + "displayName": "VM01" }, - { - "name": "[parameters('vmName')]", - "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('storageName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('vmNicName'))]" - ], - "tags": { - "displayName": "VM01" + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" }, - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" - }, - "osProfile": { - "computerName": "[parameters('vmName')]", - "adminUsername": "[parameters('vmAdminUsername')]", - "adminPassword": "[parameters('vmAdminPassword')]" + "osProfile": { + "computerName": "[parameters('vmName')]", + "adminUsername": "[parameters('vmAdminUsername')]", + "adminPassword": "[parameters('vmAdminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[variables('vmImagePublisher')]", + "offer": "[variables('vmImageOffer')]", + "sku": "[parameters('vmVisualStudioVersion')]", + "version": "latest" }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('vmImagePublisher')]", - "offer": "[variables('vmImageOffer')]", - "sku": "[parameters('vmVisualStudioVersion')]", - "version": "latest" + "osDisk": { + "name": "VMOSDisk", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/', variables('vmOSDiskName'), '.vhd')]" }, - "osDisk": { - "name": "VMOSDisk", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/', variables('vmOSDiskName'), '.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" - } - ] + "caching": "ReadWrite", + "createOption": "FromImage" } }, - "resources": [ - { - "name": "SetupChocolatey", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" - ], - "tags": { - "displayName": "SetupChocolatey" - }, - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScriptExtension", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('setupChocolatelyScriptLocation'),parameters('setupChocolateyScriptFileName'))]" - ], - "commandToExecute": "[concat('powershell -ExecutionPolicy bypass -File ',parameters('setupChocolateyScriptFileName'),' -chocoPackages ',parameters('chocoPackages'))]" - } - + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" } - } - ] + ] + } }, - { - "name": "[variables('vmIP01Name')]", - "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ ], - "tags": { - "displayName": "VMIP01" - }, - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[parameters('dnsLabelPrefix')]" + "resources": [ + { + "name": "SetupChocolatey", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" + ], + "tags": { + "displayName": "SetupChocolatey" + }, + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScriptExtension", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('setupChocolatelyScriptLocation'),parameters('setupChocolateyScriptFileName'))]" + ], + "commandToExecute": "[concat('powershell -ExecutionPolicy bypass -File ',parameters('setupChocolateyScriptFileName'),' -chocoPackages ',parameters('chocoPackages'))]" + } } } + ] + }, + { + "name": "[variables('vmIP01Name')]", + "type": "Microsoft.Network/publicIPAddresses", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [], + "tags": { + "displayName": "VMIP01" + }, + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[parameters('dnsLabelPrefix')]" + } } - ], - "outputs": { } - } - + } + ], + "outputs": {} +} diff --git a/visual-studio-dev-vm/azuredeploy.json b/visual-studio-dev-vm/azuredeploy.json index 123f5ae5302e..ca5a1e73cdd0 100644 --- a/visual-studio-dev-vm/azuredeploy.json +++ b/visual-studio-dev-vm/azuredeploy.json @@ -44,6 +44,13 @@ "metadata": { "description": "Globally unique naming prefix for per region for the public IP address. For instance, myVMuniqueIP.westus.cloudapp.azure.com. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -67,7 +74,7 @@ { "name": "[variables('storageAccountName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -80,7 +87,7 @@ { "name": "VNet01", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -105,7 +112,7 @@ { "name": "[variables('vmNicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', 'Vnet01')]", @@ -134,7 +141,7 @@ { "name": "[variables('vmName')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", @@ -181,7 +188,7 @@ { "name": "[variables('vmIP01Name')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [], "tags": { @@ -201,4 +208,4 @@ "value": "[reference(variables('vmIP01Name')).dnsSettings.fqdn]" } } -} \ No newline at end of file +} diff --git a/visual-studio-vstsbuildagent-vm/azuredeploy.json b/visual-studio-vstsbuildagent-vm/azuredeploy.json index 2f9cdd161c09..f8281de4dffe 100644 --- a/visual-studio-vstsbuildagent-vm/azuredeploy.json +++ b/visual-studio-vstsbuildagent-vm/azuredeploy.json @@ -91,7 +91,7 @@ "description": "The Visual Studio Team Services build agent pool for this build agent to join. Use 'Default' if you don't have a separate pool." } }, - "enableAutologon" : { + "enableAutologon": { "type": "bool", "defaultValue": false, "metadata": { @@ -99,14 +99,20 @@ } }, "_artifactsLocation": { - "type": "string", - "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." - }, - "defaultValue": "https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/visual-studio-vstsbuildagent-vm/" + "type": "string", + "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." + }, + "defaultValue": "https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/visual-studio-vstsbuildagent-vm/" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." } + } }, - "variables": { "storageAccountName": "[concat(uniquestring(resourceGroup().id),'storage')]", "vnet01Prefix": "10.0.0.0/16", @@ -125,9 +131,9 @@ { "name": "[variables('storageAccountName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "Storage01" }, @@ -138,9 +144,9 @@ { "name": "VNet01", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "Vnet01" }, @@ -163,7 +169,7 @@ { "name": "[variables('vmNicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', 'Vnet01')]", @@ -192,7 +198,7 @@ { "name": "[parameters('vmName')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", @@ -238,7 +244,7 @@ { "name": "CustomScript", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" @@ -260,9 +266,9 @@ { "name": "[variables('vmIP01Name')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-05-01-preview", - "dependsOn": [ ], + "dependsOn": [], "tags": { "displayName": "VMIP01" }, @@ -274,6 +280,5 @@ } } ], - "outputs": { - } + "outputs": {} } diff --git a/vm-cpu-sysbench-meter/azuredeploy.json b/vm-cpu-sysbench-meter/azuredeploy.json index d4406b11407c..3de177ee5907 100644 --- a/vm-cpu-sysbench-meter/azuredeploy.json +++ b/vm-cpu-sysbench-meter/azuredeploy.json @@ -62,6 +62,13 @@ "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": { @@ -88,7 +95,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('vhdStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, @@ -98,7 +105,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -107,7 +114,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -128,7 +135,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('publicIPAddressName')]", "[variables('virtualNetworkName')]" @@ -154,7 +161,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NSG" }, @@ -184,7 +191,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('vhdStorageAccountName')]", "[variables('nicName')]" @@ -230,7 +237,7 @@ "dependsOn": [ "[variables('vmName')]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.OSTCExtensions", "type": "CustomScriptForLinux", diff --git a/vm-disk-performance-meter/azuredeploy.json b/vm-disk-performance-meter/azuredeploy.json index c636df530ac4..cb26933c9a81 100644 --- a/vm-disk-performance-meter/azuredeploy.json +++ b/vm-disk-performance-meter/azuredeploy.json @@ -136,6 +136,13 @@ "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": { @@ -163,7 +170,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('vhdStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, @@ -173,7 +180,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('dataStorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[parameters('dataDiskStorageAccountType')]" }, @@ -183,7 +190,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic" } @@ -192,7 +199,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -213,7 +220,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('publicIPAddressName')]", "[variables('virtualNetworkName')]" @@ -239,7 +246,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NSG" }, @@ -269,7 +276,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('vhdStorageAccountName')]", "[variables('nicName')]" @@ -327,7 +334,7 @@ "dependsOn": [ "[variables('vmName')]" ], - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publisher": "Microsoft.OSTCExtensions", "type": "CustomScriptForLinux", diff --git a/vm-simple-sles/azuredeploy.json b/vm-simple-sles/azuredeploy.json index 275ee72b40f4..a1a8cf826212 100644 --- a/vm-simple-sles/azuredeploy.json +++ b/vm-simple-sles/azuredeploy.json @@ -32,6 +32,13 @@ "metadata": { "description": "The SLES version for the VM. This will pick the latest available image of this given SLES version." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -50,7 +57,7 @@ "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2017-06-01", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, @@ -60,7 +67,7 @@ "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2017-09-01", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -72,7 +79,7 @@ "type": "Microsoft.Network/virtualNetworks", "apiVersion": "2017-09-01", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -93,7 +100,7 @@ "type": "Microsoft.Network/networkInterfaces", "apiVersion": "2017-09-01", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('publicIPAddressName')]", "[variables('virtualNetworkName')]" @@ -119,7 +126,7 @@ "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2017-03-30", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('storageAccountName')]", "[variables('nicName')]" @@ -186,4 +193,4 @@ "value": "[concat('ssh ', parameters('adminUsername'), '@', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]" } } -} \ No newline at end of file +} diff --git a/vm-to-vm-throughput-meter-multithreaded/azuredeploy.json b/vm-to-vm-throughput-meter-multithreaded/azuredeploy.json index b97fa47bd65a..9a4cddd75990 100644 --- a/vm-to-vm-throughput-meter-multithreaded/azuredeploy.json +++ b/vm-to-vm-throughput-meter-multithreaded/azuredeploy.json @@ -155,6 +155,13 @@ "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": { @@ -206,7 +213,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[concat(variables('vhdStorageAccountName'),copyIndex(1))]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "storageCopy", "count": 2 @@ -220,7 +227,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(variables('publicIPAddressName'), copyIndex(1))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "publicIPCopy", "count": 2 @@ -233,7 +240,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -254,7 +261,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex(1))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicCopy", "count": 2 @@ -284,7 +291,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')[copyIndex(0)]]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "vmCopy", "count": 2 @@ -331,7 +338,7 @@ "type": "extensions", "name": "[concat('CustomScriptExtension', copyIndex(1))]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[variables('vmName')[copyIndex(0)]]" ], @@ -365,4 +372,4 @@ "value": "[split(reference('CustomScriptExtension1').instanceView.substatuses[0].message, ' ')[2]]" } } -} \ No newline at end of file +} diff --git a/vod-aspera-wowza-azuremediaservices/ams/ams-with-automation.json b/vod-aspera-wowza-azuremediaservices/ams/ams-with-automation.json index 195104246bee..5fdf43dc6a3d 100644 --- a/vod-aspera-wowza-azuremediaservices/ams/ams-with-automation.json +++ b/vod-aspera-wowza-azuremediaservices/ams/ams-with-automation.json @@ -31,7 +31,6 @@ }, "location": { "type": "string", - "defaultValue": "West US", "allowedValues": [ "Brazil South", "East Asia", @@ -231,4 +230,4 @@ } } ] -} \ No newline at end of file +} diff --git a/vod-aspera-wowza-azuremediaservices/ams/ams.json b/vod-aspera-wowza-azuremediaservices/ams/ams.json index 6449a4945b95..b631893f6358 100644 --- a/vod-aspera-wowza-azuremediaservices/ams/ams.json +++ b/vod-aspera-wowza-azuremediaservices/ams/ams.json @@ -27,15 +27,20 @@ "metadata": { "description": "Tag Values" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "uniqueString": "[uniquestring(resourceGroup().id)]", "Input_StorageAccounts_Name": "[concat(parameters('Input_StorageAccounts_Name'),uniqueString(resourceGroup().id))]", "Output_StorageAccounts_Name": "[concat(parameters('Output_StorageAccounts_Name'),uniqueString(resourceGroup().id))]", "MediaService_StorageAccounts_Name": "[concat(parameters('MediaService_StorageAccounts_Name'),uniqueString(resourceGroup().id))]", "MediaServices_Name": "[concat(parameters('MediaServices_Name'),uniqueString(resourceGroup().id))]", - "storageApiVersion": "2015-06-15", "storageAccountType": "Standard_LRS" }, "resources": [ @@ -44,7 +49,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('Input_StorageAccounts_Name')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "[parameters('tag').key1]": "[parameters('tag').value1]" }, @@ -57,7 +62,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('Output_StorageAccounts_Name')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "[parameters('tag').key1]": "[parameters('tag').value1]" }, @@ -70,7 +75,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('MediaService_StorageAccounts_Name')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "[parameters('tag').key1]": "[parameters('tag').value1]" }, @@ -82,7 +87,7 @@ "type": "Microsoft.Media/mediaservices", "name": "[variables('MediaServices_Name')]", "apiVersion": "2015-10-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "storageAccounts": [ { @@ -130,4 +135,4 @@ "value": "[listKeys(resourceId('Microsoft.Media/mediaservices', variables('MediaServices_Name')), '2015-10-01').primaryKey]" } } -} \ No newline at end of file +} diff --git a/vod-aspera-wowza-azuremediaservices/ams/automationjob.json b/vod-aspera-wowza-azuremediaservices/ams/automationjob.json index 6bca058d26ed..522962006f09 100644 --- a/vod-aspera-wowza-azuremediaservices/ams/automationjob.json +++ b/vod-aspera-wowza-azuremediaservices/ams/automationjob.json @@ -1,228 +1,225 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "automationAccountName": { - "type": "string", - "defaultValue": "auto" - }, + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "automationAccountName": { + "type": "string", + "defaultValue": "auto" + }, + "sku": { + "type": "string", + "defaultValue": "Basic", + "allowedValues": [ + "Free", + "Basic" + ] + }, + "runbookName": { + "type": "string", + "defaultValue": "myrunbook" + }, + "credential1Name": { + "defaultValue": "Azure_RM_Account_Credentials", + "type": "string" + }, + "cred1Username": { + "type": "string", + "defaultValue": "aouser" + }, + "cred1Password": { + "type": "securestring", + "defaultValue": "Aocred" + }, + "jobId": { + "type": "string", + "defaultValue": "24b18f62-aa2c-4528-ac10-1e3602eb4053", + "metadata": { + "description": "Generate a Job ID (GUID) from https://www.guidgenerator.com/online-guid-generator.aspx " + } + }, + "location": { + "type": "string", + "allowedValues": [ + "Japan East", + "North Europe", + "South Central US", + "West Europe", + "Southeast Asia", + "East US 2" + ], + "metadata": { + "description": "Automation Service Location" + } + }, + "tag": { + "type": "object", + "defaultValue": { + "key1": "key", + "value1": "value" + }, + "metadata": { + "description": "Tag Values" + } + }, + "MediaServices_Name": { + "type": "string", + "defaultValue": "mediag5xazoq27rv36" + }, + "MediaServices_Keys": { + "type": "string", + "defaultValue": "8DJCaLikWortVYQUkPTdo84aT0bkxJdon3e6ukWrcCY=" + }, + "Input_StorageAccounts_Name": { + "type": "string", + "defaultValue": "inputg5xazoq27rv36" + }, + "Input_StorageAccounts_Keys": { + "type": "string", + "defaultValue": "Nxq9CDg5fvMnpYE180/fIrhRazVNn7zHlRjbeqRDf0FaHPgwt/6dvf7ZMEv17tu1fBYX43hf0XBaj15RrZW6Hw==" + }, + "Ouput_StorageAccounts_Name": { + "type": "string", + "defaultValue": "outputg5xazoq27rv36" + }, + "Output_StorageAccounts_Keys": { + "type": "string", + "defaultValue": "yJFJN+jes2yrfIpwl8sqo2Xjj97ep9BA11ffcuARe1iMbg0fXT38uTvSOHH7/ykuWziP61skr4NZ90lWcrLuIA==" + }, + "MediaService_StorageAccounts_Name": { + "type": "string", + "defaultValue": "mediabg5xazoq27rv36" + }, + "MediaService_StorageAccounts_Keys": { + "type": "string", + "defaultValue": "NBwzPQb3UAw23FT4aVzHKn2ywYetjQDkYSg2ekgZwx57T4wcJAQh/EkOD63rUQynW4eu1FgZTRiq2w8Ok3/mzA==" + }, + "baseUri": { + "type": "string", + "defaultValue": "https://raw.githubusercontent.com/sysgain/azurequickstarts/vcherukuri-patch-3/VOD-Aspera-Wowza-AzureMediaServices/" + } + }, + "variables": { + "variable1Name": "variable1", + "variable2Name": "variable2", + "runbookUrl": "[concat(parameters('baseUri'), 'ams/MediaservicesRestapi1.ps1')]" + }, + "resources": [ + { + "name": "[parameters('automationAccountName')]", + "type": "Microsoft.Automation/automationAccounts", + "apiVersion": "2015-01-01-preview", + "location": "[parameters('location')]", + "tags": { + "[parameters('tag').key1]": "[parameters('tag').value1]" + }, + "properties": { "sku": { - "type": "string", - "defaultValue": "Basic", - "allowedValues": [ - "Free", - "Basic" - ] - }, - "runbookName": { - "type": "string", - "defaultValue": "myrunbook" - }, - "credential1Name": { - "defaultValue": "Azure_RM_Account_Credentials", - "type": "string" - }, - "cred1Username": { - "type": "string", - "defaultValue": "aouser" - }, - "cred1Password": { - "type": "securestring", - "defaultValue": "Aocred" - }, - "jobId": { - "type": "string", - "defaultValue": "24b18f62-aa2c-4528-ac10-1e3602eb4053", - "metadata": { - "description": "Generate a Job ID (GUID) from https://www.guidgenerator.com/online-guid-generator.aspx " + "name": "[parameters('sku')]" + } + }, + "resources": [ + { + "name": "[parameters('runbookName')]", + "type": "runbooks", + "apiVersion": "2015-01-01-preview", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))]" + ], + "tags": { + "[parameters('tag').key1]": "[parameters('tag').value1]" + }, + "properties": { + "runbookType": "Script", + "logProgress": "false", + "logVerbose": "false", + "description": null, + "publishContentLink": { + "uri": "[variables('runbookUrl')]", + "version": "1.0.0.0" } + } }, - "location": { - "type": "string", - "defaultValue": "East US 2", - "allowedValues": [ - "Japan East", - "North Europe", - "South Central US", - "West Europe", - "Southeast Asia", - "East US 2" - ], - "metadata": { - "description": "Automation Service Location" - } + { + "name": "[parameters('credential1Name')]", + "type": "credentials", + "apiVersion": "2015-01-01-preview", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))]" + ], + "tags": { + "[parameters('tag').key1]": "[parameters('tag').value1]" + }, + "properties": { + "userName": "[parameters('cred1Username')]", + "password": "[parameters('cred1Password')]" + } }, - - "tag": { - "type": "object", - "defaultValue": { - "key1": "key", - "value1": "value" - }, - "metadata": { - "description": "Tag Values" + { + "name": "[concat(parameters('automationAccountName'), '/', variables('variable1Name'))]", + "type": "Microsoft.Automation/automationAccounts/variables", + "apiVersion": "2015-10-31", + "dependsOn": [ + "[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))]" + ], + "properties": { + "variable": { + "name": "[variables('variable1Name')]", + "type": "string", + "value": "", + "Encrypted": false } + } }, - "MediaServices_Name": { - "type": "string", - "defaultValue": "mediag5xazoq27rv36" - }, - "MediaServices_Keys": { - "type": "string", - "defaultValue": "8DJCaLikWortVYQUkPTdo84aT0bkxJdon3e6ukWrcCY=" - }, - "Input_StorageAccounts_Name": { - "type": "string", - "defaultValue": "inputg5xazoq27rv36" - }, - "Input_StorageAccounts_Keys": { - "type": "string", - "defaultValue": "Nxq9CDg5fvMnpYE180/fIrhRazVNn7zHlRjbeqRDf0FaHPgwt/6dvf7ZMEv17tu1fBYX43hf0XBaj15RrZW6Hw==" - }, - "Ouput_StorageAccounts_Name": { - "type": "string", - "defaultValue": "outputg5xazoq27rv36" - }, - "Output_StorageAccounts_Keys": { - "type": "string", - "defaultValue": "yJFJN+jes2yrfIpwl8sqo2Xjj97ep9BA11ffcuARe1iMbg0fXT38uTvSOHH7/ykuWziP61skr4NZ90lWcrLuIA==" - }, - "MediaService_StorageAccounts_Name": { - "type": "string", - "defaultValue": "mediabg5xazoq27rv36" - }, - "MediaService_StorageAccounts_Keys": { - "type": "string", - "defaultValue": "NBwzPQb3UAw23FT4aVzHKn2ywYetjQDkYSg2ekgZwx57T4wcJAQh/EkOD63rUQynW4eu1FgZTRiq2w8Ok3/mzA==" + { + "name": "[concat(parameters('automationAccountName'), '/', variables('variable2Name'))]", + "type": "Microsoft.Automation/automationAccounts/variables", + "apiVersion": "2015-10-31", + "dependsOn": [ + "[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))]" + ], + "properties": { + "variable": { + "name": "[variables('variable2Name')]", + "type": "string", + "value": "", + "Encrypted": false + } + } }, - "baseUri": { - "type": "string", - "defaultValue":"https://raw.githubusercontent.com/sysgain/azurequickstarts/vcherukuri-patch-3/VOD-Aspera-Wowza-AzureMediaServices/" - } - }, - "variables": { - "variable1Name": "variable1", - "variable2Name": "variable2", - "runbookUrl": "[concat(parameters('baseUri'), 'ams/MediaservicesRestapi1.ps1')]" - - }, - "resources": [ { - "name": "[parameters('automationAccountName')]", - "type": "Microsoft.Automation/automationAccounts", - "apiVersion": "2015-01-01-preview", - "location": "[parameters('location')]", - "tags": { - "[parameters('tag').key1]": "[parameters('tag').value1]" + "name": "[concat(parameters('automationAccountName'), '/', parameters('jobId'))]", + "type": "Microsoft.Automation/automationAccounts/jobs", + "apiVersion": "2015-10-31", + "location": "[parameters('location')]", + "tags": { + "[parameters('tag').key1]": "[parameters('tag').value1]" + }, + "properties": { + "runbook": { + "name": "[parameters('runbookName')]" }, - "properties": { - "sku": { - "name": "[parameters('sku')]" - } - }, - "resources": [ - { - "name": "[parameters('runbookName')]", - "type": "runbooks", - "apiVersion": "2015-01-01-preview", - "location": "[parameters('location')]", - "dependsOn": [ - "[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))]" - ], - "tags": { - "[parameters('tag').key1]": "[parameters('tag').value1]" - }, - "properties": { - "runbookType": "Script", - "logProgress": "false", - "logVerbose": "false", - "description": null, - "publishContentLink": { - "uri": "[variables('runbookUrl')]", - "version": "1.0.0.0" - } - } - }, - { - "name": "[parameters('credential1Name')]", - "type": "credentials", - "apiVersion": "2015-01-01-preview", - "location": "[parameters('location')]", - "dependsOn": [ - "[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))]" - ], - "tags": { - "[parameters('tag').key1]": "[parameters('tag').value1]" - }, - "properties": { - "userName": "[parameters('cred1Username')]", - "password": "[parameters('cred1Password')]" - } - }, - { - "name": "[concat(parameters('automationAccountName'), '/', variables('variable1Name'))]", - "type": "Microsoft.Automation/automationAccounts/variables", - "apiVersion": "2015-10-31", - "dependsOn": [ - "[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))]" - ], - "properties": { - "variable": { - "name": "[variables('variable1Name')]", - "type": "string", - "value": "", - "Encrypted": false - } - } - }, - { - "name": "[concat(parameters('automationAccountName'), '/', variables('variable2Name'))]", - "type": "Microsoft.Automation/automationAccounts/variables", - "apiVersion": "2015-10-31", - "dependsOn": [ - "[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))]" - ], - "properties": { - "variable": { - "name": "[variables('variable2Name')]", - "type": "string", - "value": "", - "Encrypted": false - } - } - }, - { - "name": "[concat(parameters('automationAccountName'), '/', parameters('jobId'))]", - "type": "Microsoft.Automation/automationAccounts/jobs", - "apiVersion": "2015-10-31", - "location": "[parameters('location')]", - "tags": { - "[parameters('tag').key1]": "[parameters('tag').value1]" - }, - "properties": { - "runbook": { - "name": "[parameters('runbookName')]" - }, - "parameters": { - "MediaServices_Name": "[parameters('MediaServices_Name')]", - "MediaServices_Keys": "[parameters('MediaServices_Keys')]", - "Input_StorageAccounts_Name": "[parameters('Input_StorageAccounts_Name')]", - "Input_StorageAccounts_Keys": "[parameters('Input_StorageAccounts_Keys')]", - "Ouput_StorageAccounts_Name": "[parameters('Ouput_StorageAccounts_Name')]", - "Output_StorageAccounts_Keys": "[parameters('Output_StorageAccounts_Keys')]", - "MediaService_StorageAccounts_Name": "[parameters('MediaService_StorageAccounts_Name')]", - "MediaService_StorageAccounts_Keys": "[parameters('MediaService_StorageAccounts_Keys')]" - } - }, - "dependsOn": [ - "[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))]", - "[resourceId('Microsoft.Automation/automationAccounts/runbooks', parameters('automationAccountName'), parameters('runbookName'))]", - "[resourceId('Microsoft.Automation/automationAccounts/credentials', parameters('automationAccountName'), parameters('credential1Name'))]", - "[resourceId('Microsoft.Automation/automationAccounts/variables', parameters('automationAccountName'), variables('variable1Name'))]", - "[resourceId('Microsoft.Automation/automationAccounts/variables', parameters('automationAccountName'), variables('variable2Name'))]" - ] - } - ] + "parameters": { + "MediaServices_Name": "[parameters('MediaServices_Name')]", + "MediaServices_Keys": "[parameters('MediaServices_Keys')]", + "Input_StorageAccounts_Name": "[parameters('Input_StorageAccounts_Name')]", + "Input_StorageAccounts_Keys": "[parameters('Input_StorageAccounts_Keys')]", + "Ouput_StorageAccounts_Name": "[parameters('Ouput_StorageAccounts_Name')]", + "Output_StorageAccounts_Keys": "[parameters('Output_StorageAccounts_Keys')]", + "MediaService_StorageAccounts_Name": "[parameters('MediaService_StorageAccounts_Name')]", + "MediaService_StorageAccounts_Keys": "[parameters('MediaService_StorageAccounts_Keys')]" + } + }, + "dependsOn": [ + "[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))]", + "[resourceId('Microsoft.Automation/automationAccounts/runbooks', parameters('automationAccountName'), parameters('runbookName'))]", + "[resourceId('Microsoft.Automation/automationAccounts/credentials', parameters('automationAccountName'), parameters('credential1Name'))]", + "[resourceId('Microsoft.Automation/automationAccounts/variables', parameters('automationAccountName'), variables('variable1Name'))]", + "[resourceId('Microsoft.Automation/automationAccounts/variables', parameters('automationAccountName'), variables('variable2Name'))]" + ] } - ] + ] + } + ] } diff --git a/vod-aspera-wowza-azuremediaservices/aspera/aspera.json b/vod-aspera-wowza-azuremediaservices/aspera/aspera.json index 34e30d2d5cf1..26fb57d82316 100644 --- a/vod-aspera-wowza-azuremediaservices/aspera/aspera.json +++ b/vod-aspera-wowza-azuremediaservices/aspera/aspera.json @@ -1,267 +1,272 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "deploymentName": { - "type": "string", - "defaultValue": "" - }, - "asperaUsername": { - "type": "string" + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentName": { + "type": "string", + "defaultValue": "" + }, + "asperaUsername": { + "type": "string" + }, + "asperaAdminPassword": { + "type": "securestring" + }, + "baseUri": { + "type": "string", + "defaultValue": "https://raw.githubusercontent.com/sysgain/azurequickstarts/master/VOD-Aspera-Wowza-AzureMediaServices/" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "virtualMachineName": "[concat(parameters('deploymentName'), 'aspera')]", + "virtualMachineSize": "Standard_DS1", + "storageAccountType": "Standard_LRS", + "virtualNetworkName": "[concat(parameters('deploymentName'), 'vnet')]", + "networkInterfaceName": "[concat(parameters('deploymentName'), 'nic')]", + "networkSecurityGroupName": "[concat(parameters('deploymentName'), 'nsg')]", + "addressPrefix": "10.0.0.0/16", + "subnetName": "subnet1", + "subnetPrefix": "10.0.1.0/24", + "publicIpAddressName": "[concat(parameters('deploymentName'), 'publicIP')]", + "vmExtensionName": "aspscript", + "scriptFilePath": "[concat(parameters('baseUri'), 'aspera/configasp.sh')]", + "executeCmd": "[concat('sh configasp.sh', ' ',parameters('asperaUsername'))]", + "vnetId": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", + "subnetRef": "[concat(variables('vnetId'), '/subnets/', variables('subnetName'))]", + "storageAccName": "[concat(parameters('deploymentName'),uniqueString(resourceGroup().id))]", + "publicIPdns": "[concat(parameters('deploymentName'),'aspera')]", + "FQDN": "[concat(variables('publicIPdns'),'.',parameters('location'),'.cloudapp.azure.com')]" + }, + "resources": [ + { + "name": "[variables('virtualMachineName')]", + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccName'))]" + ], + "properties": { + "osProfile": { + "computerName": "[variables('virtualMachineName')]", + "adminUsername": "[parameters('asperaUsername')]", + "adminPassword": "[parameters('asperaAdminPassword')]" }, - "asperaAdminPassword": { - "type": "securestring" + "hardwareProfile": { + "vmSize": "[variables('virtualMachineSize')]" }, - "baseUri": { - "type": "string", - "defaultValue": "https://raw.githubusercontent.com/sysgain/azurequickstarts/master/VOD-Aspera-Wowza-AzureMediaServices/" + "storageProfile": { + "imageReference": { + "publisher": "aspera", + "offer": "aspera-faspex-ondemand100", + "sku": "aspera_fod100", + "version": "latest" + }, + "osDisk": { + "name": "[variables('virtualMachineName')]", + "vhd": { + "uri": "[concat(concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccName')), '2015-06-15').primaryEndpoints['blob'], 'vhds/'), variables('virtualMachineName'), '.vhd')]" + }, + "createOption": "FromImage" + }, + "dataDisks": [] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]" + } + ] } + }, + "plan": { + "name": "aspera_fod100", + "publisher": "aspera", + "product": "aspera-faspex-ondemand100" + } }, - "variables": { - "virtualMachineName":"[concat(parameters('deploymentName'), 'aspera')]", - "virtualMachineSize":"Standard_DS1", - "storageAccountType":"Standard_LRS", - "virtualNetworkName":"[concat(parameters('deploymentName'), 'vnet')]", - "networkInterfaceName":"[concat(parameters('deploymentName'), 'nic')]", - "networkSecurityGroupName":"[concat(parameters('deploymentName'), 'nsg')]", - "addressPrefix":"10.0.0.0/16", - "subnetName":"subnet1", - "subnetPrefix":"10.0.1.0/24", - "publicIpAddressName":"[concat(parameters('deploymentName'), 'publicIP')]", - "vmExtensionName":"aspscript", - "publicIPdnsPrefix":"[concat(parameters('deploymentName'), 'asperadns')]", - "scriptFilePath":"[concat(parameters('baseUri'), 'aspera/configasp.sh')]", - "executeCmd": "[concat('sh configasp.sh', ' ',parameters('asperaUsername'))]", - "vnetId": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetId'), '/subnets/', variables('subnetName'))]", - "storageAccName": "[concat(parameters('deploymentName'),uniqueString(resourceGroup().id))]", - "publicIPdns":"[concat(parameters('deploymentName'),'aspera')]", - "FQDN": "[concat(variables('publicIPdns'),'.',resourceGroup().location,'.cloudapp.azure.com')]" + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('virtualMachineName'),'/', variables('vmExtensionName'))]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'))]" + ], + "properties": { + "publisher": "Microsoft.OSTCExtensions", + "type": "CustomScriptForLinux", + "typeHandlerVersion": "1.5", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[variables('scriptFilePath')]" + ], + "commandToExecute": "[variables('executeCmd')]" + } + } }, - "resources": [ - { - "name": "[variables('virtualMachineName')]", - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccName'))]" - ], + { + "name": "[variables('storageAccName')]", + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "accountType": "[variables('storageAccountType')]" + } + }, + { + "name": "[variables('virtualNetworkName')]", + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", "properties": { - "osProfile": { - "computerName": "[variables('virtualMachineName')]", - "adminUsername": "[parameters('asperaUsername')]", - "adminPassword": "[parameters('asperaAdminPassword')]" - }, - "hardwareProfile": { - "vmSize": "[variables('virtualMachineSize')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "aspera", - "offer": "aspera-faspex-ondemand100", - "sku": "aspera_fod100", - "version": "latest" - }, - "osDisk": { - "name": "[variables('virtualMachineName')]", - "vhd": { - "uri": "[concat(concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccName')), '2015-06-15').primaryEndpoints['blob'], 'vhds/'), variables('virtualMachineName'), '.vhd')]" - }, - "createOption": "FromImage" - }, - "dataDisks": [] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]" - } - ] - } - }, - "plan": { - "name": "aspera_fod100", - "publisher": "aspera", - "product": "aspera-faspex-ondemand100" + "addressPrefix": "[variables('subnetPrefix')]" } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('virtualMachineName'),'/', variables('vmExtensionName'))]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'))]" - ], + } + ] + } + }, + { + "name": "[variables('networkInterfaceName')]", + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", + "[concat('Microsoft.Network/publicIpAddresses/', variables('publicIpAddressName'))]", + "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" + ], + "properties": { + "primary": true, + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.5", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[variables('scriptFilePath')]" - ], - "commandToExecute": "[variables('executeCmd')]" - } + "subnet": { + "id": "[variables('subnetRef')]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId('Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]" + } } - }, - { - "name": "[variables('storageAccName')]", - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + } + ], + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + } + } + }, + { + "name": "[variables('publicIpAddressName')]", + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[variables('publicIPdns')]" + } + } + }, + { + "name": "[variables('networkSecurityGroupName')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "https", "properties": { - "accountType": "[variables('storageAccountType')]" + "priority": 1010, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "443", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } - }, - { - "name": "[variables('virtualNetworkName')]", - "type": "Microsoft.Network/virtualNetworks", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + }, + { + "name": "node", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] + "priority": 1020, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "9092", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } - }, - { - "name": "[variables('networkInterfaceName')]", - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", - "[concat('Microsoft.Network/publicIpAddresses/', variables('publicIpAddressName'))]", - "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" - ], + }, + { + "name": "ssh", "properties": { - "primary": true, - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "subnet": { - "id": "[variables('subnetRef')]" - }, - "privateIPAllocationMethod": "Dynamic", - "publicIpAddress": { - "id": "[resourceId('Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]" - } - } - } - ], - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" - } + "priority": 1030, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "33001", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } - }, - { - "name": "[variables('publicIpAddressName')]", - "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + }, + { + "name": "ssh2", "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('publicIPdns')]" - } + "priority": 1040, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "22", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } - }, - { - "name": "[variables('networkSecurityGroupName')]", - "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + }, + { + "name": "fasp", "properties": { - "securityRules": [ - { - "name": "https", - "properties": { - "priority": 1010, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "443", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "node", - "properties": { - "priority": 1020, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "9092", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "ssh", - "properties": { - "priority": 1030, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "33001", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "ssh2", - "properties": { - "priority": 1040, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "22", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "fasp", - "properties": { - "priority": 1050, - "sourceAddressPrefix": "*", - "protocol": "Udp", - "destinationPortRange": "33001", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - } - ] + "priority": 1050, + "sourceAddressPrefix": "*", + "protocol": "Udp", + "destinationPortRange": "33001", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" } - } - ], - "outputs": { - "asperaURL": { + } + ] + } + } + ], + "outputs": { + "asperaURL": { "type": "string", "value": "[ variables('FQDN')]" - - } } + } } diff --git a/vod-aspera-wowza-azuremediaservices/azuredeploy.json b/vod-aspera-wowza-azuremediaservices/azuredeploy.json index 0adb71a59f80..ee848673817c 100644 --- a/vod-aspera-wowza-azuremediaservices/azuredeploy.json +++ b/vod-aspera-wowza-azuremediaservices/azuredeploy.json @@ -1,327 +1,300 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "deploymentName": { - "type": "string", - "metadata": { - "description": "Deployment Name of the Stack" - } - }, - "desktopUsername": { - "type": "string", - "metadata": { - "description": "Desktop Administrator Name" - } - }, - "desktopAdminPassword": { - "type": "securestring", - "metadata": { - "description": "Desktop Administrator Password" - } - }, - "asperaUsername": { - "type": "string", - "metadata": { - "description": "Aspera Server Administrator Name" - } - }, - "asperaAdminPassword": { - "type": "securestring", - "metadata": { - "description": "Aspera Server Administrator Password" - } - }, - "wowzaUsername": { - "type": "string", - "metadata": { - "description": "Wowza Streaming Server Administrator Name" - } - }, - "wowzaAdminPassword": { - "type": "securestring", - "metadata": { - "description": "Wowza Streaming Server Administrator Password" - } - }, - "automationAccountName": { - "type": "string", - "defaultValue": "auto", - "metadata": { - - "description": "The account name must not be empty, and must not exceed 50 characters in length. The account name must start with a letter or number. The account name can contain letters, numbers, and dashes. The final character must be a letter or a number. " - - } - }, - "jobId": { - - "type": "string", - - "defaultValue": "24b18f62-aa2c-4528-ac10-1e3602eb4053", - - "metadata": { - - "description": "Generate a Job ID (GUID) from https://www.guidgenerator.com/online-guid-generator.aspx " - - } - - - }, - "baseUri": { - "type": "string", - "defaultValue":"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/vod-aspera-wowza-azuremediaservices/", -"metadata": { - - "description": "base uri for your git repo" - - } - - } - - }, - "variables": { - "uniqueString": "[uniquestring(resourceGroup().id)]", - "automationAccountName": "[concat(parameters('automationAccountName'),uniqueString(resourceGroup().id))]" - }, - - "resources": [{ - "apiVersion": "2015-01-01", - "name": "ams", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('baseUri'), 'ams/ams.json')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - - - - } - - } - - }, - - { - "apiVersion": "2015-01-01", - "name": "automationjob", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "['Microsoft.Resources/deployments/ams']" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('baseUri'), 'ams/automationjob.json')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "automationAccountName": { - "value": "[variables('automationAccountName')]" - - }, - "jobId": { - "value": "[parameters('jobId')]" - }, - "MediaServices_Name": { - "value": "[reference('ams').outputs.MediaServices_Name.value]" - }, - "MediaServices_Keys": { - "value": "[reference('ams').outputs.MediaServices_Keys.value]" - }, - "Input_StorageAccounts_Name": { - "value": "[reference('ams').outputs.Input_StorageAccounts_Name.value]" - }, - "Input_StorageAccounts_Keys": { - "value": "[reference('ams').outputs.Input_StorageAccounts_Keys.value]" - }, - "Ouput_StorageAccounts_Name": { - "value": "[reference('ams').outputs.Ouput_StorageAccounts_Name.value]" - }, - "Output_StorageAccounts_Keys": { - "value": "[reference('ams').outputs.Output_StorageAccounts_Keys.value]" - }, - "MediaService_StorageAccounts_Name": { - "value": "[reference('ams').outputs.MediaService_StorageAccounts_Name.value]" - }, - "MediaService_StorageAccounts_Keys": { - "value": "[reference('ams').outputs.MediaService_StorageAccounts_Keys.value]" - }, - "baseUri": { - "value": "[parameters('baseUri')]" - } - - - - } - - } - - }, { - "apiVersion": "2015-01-01", - "name": "desktop", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "['Microsoft.Resources/deployments/ams']" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri":"[concat(parameters('baseUri'), 'desktop/desktop.json')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "deploymentName": { - "value": "[parameters('deploymentName')]" - }, - "storageAccountName": { - "value": "[reference('ams').outputs.Input_StorageAccounts_Name.value]" - - }, - "storageAccountKey": { - "value": "[reference('ams').outputs.Input_StorageAccounts_Keys.value]" - }, - "containerName": { - "value": "videos" - }, - "desktopUsername": { - "value": "[parameters('desktopUsername')]" - }, - "desktopAdminPassword": { - "value": "[parameters('desktopAdminPassword')]" - } - - - - } - - } - }, { - "apiVersion": "2015-01-01", - "name": "aspera", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "['Microsoft.Resources/deployments/ams']" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('baseUri'), 'aspera/aspera.json')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "deploymentName": { - "value": "[parameters('deploymentName')]" - }, - "asperaUsername": { - "value": "[parameters('asperaUsername')]" - }, - "asperaAdminPassword": { - "value": "[parameters('asperaAdminPassword')]" - }, - "baseUri": { - "value": "[parameters('baseUri')]" - } - - } - } - }, { - "apiVersion": "2015-01-01", - "name": "wowza", - "type": "Microsoft.Resources/deployments", - "dependsOn": [ - "['Microsoft.Resources/deployments/ams']" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[concat(parameters('baseUri'), 'wowza/wowza.json')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "deploymentName": { - "value": "[parameters('deploymentName')]" - }, - "storageAccountName": { - "value": "[reference('ams').outputs.Ouput_StorageAccounts_Name.value]" - - }, - "storageAccountKey": { - "value": "[reference('ams').outputs.Output_StorageAccounts_Keys.value]" - }, - "containerName": { - "value": "videos" - }, - "wowzaUsername": { - "value": "[parameters('wowzaUsername')]" - }, - "wowzaAdminPassword": { - "value": "[parameters('wowzaadminPassword')]" - }, - "baseUri": { - "value": "[parameters('baseUri')]" - } - - } - } - } - - - ], - "outputs": { - "Input_StorageAccounts_Name": { - "type": "String", - "value": "[reference('ams').outputs.Input_StorageAccounts_Name.value]" - }, - "Input_StorageAccounts_Keys": { - "type": "string", - "value": "[reference('ams').outputs.Input_StorageAccounts_Keys.value]" - }, - "Ouput_StorageAccounts_Name":{ - "type": "string", - "value": "[reference('ams').outputs.Ouput_StorageAccounts_Name.value]" - }, - "Output_StorageAccounts_Keys":{ - "type": "string", - "value": "[reference('ams').outputs.Output_StorageAccounts_Keys.value]" - }, - "desktopURL": { - "type": "String", - "value": "[reference('desktop').outputs.desktopURL.value]" - }, - "desktopUsername": { - "type": "String", - "value": "[parameters('desktopUsername')]" - }, - "desktopAdminPassword": { - "type": "String", - "value": "[parameters('desktopAdminPassword')]" - }, - "asperaURL": { - "type": "String", - "value": "[reference('aspera').outputs.asperaURL.value]" - }, - "asperaUsername": { - "type": "String", - "value": "[parameters('asperaUsername')]" - }, - "asperaAdminPassword": { - "type": "String", - "value": "[parameters('asperaAdminPassword')]" - }, - "wowzaURL": { - "type": "String", - "value": "[reference('wowza').outputs.wowzaURL.value]" - }, - "wowzaUsername": { - "type": "String", - "value": "[parameters('wowzaUsername')]" - }, - "wowzaAdminPassword": { - "type": "String", - "value": "[parameters('wowzaAdminPassword')]" - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentName": { + "type": "string", + "metadata": { + "description": "Deployment Name of the Stack" + } + }, + "desktopUsername": { + "type": "string", + "metadata": { + "description": "Desktop Administrator Name" + } + }, + "desktopAdminPassword": { + "type": "securestring", + "metadata": { + "description": "Desktop Administrator Password" + } + }, + "asperaUsername": { + "type": "string", + "metadata": { + "description": "Aspera Server Administrator Name" + } + }, + "asperaAdminPassword": { + "type": "securestring", + "metadata": { + "description": "Aspera Server Administrator Password" + } + }, + "wowzaUsername": { + "type": "string", + "metadata": { + "description": "Wowza Streaming Server Administrator Name" + } + }, + "wowzaAdminPassword": { + "type": "securestring", + "metadata": { + "description": "Wowza Streaming Server Administrator Password" + } + }, + "automationAccountName": { + "type": "string", + "defaultValue": "auto", + "metadata": { + "description": "The account name must not be empty, and must not exceed 50 characters in length. The account name must start with a letter or number. The account name can contain letters, numbers, and dashes. The final character must be a letter or a number. " + } + }, + "jobId": { + "type": "string", + "defaultValue": "24b18f62-aa2c-4528-ac10-1e3602eb4053", + "metadata": { + "description": "Generate a Job ID (GUID) from https://www.guidgenerator.com/online-guid-generator.aspx " + } + }, + "baseUri": { + "type": "string", + "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/vod-aspera-wowza-azuremediaservices/", + "metadata": { + "description": "base uri for your git repo" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "automationAccountName": "[concat(parameters('automationAccountName'),uniqueString(resourceGroup().id))]" + }, + "resources": [ + { + "apiVersion": "2015-01-01", + "name": "ams", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUri'), 'ams/ams.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": {} + } + }, + { + "apiVersion": "2015-01-01", + "name": "automationjob", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "['Microsoft.Resources/deployments/ams']" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUri'), 'ams/automationjob.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "automationAccountName": { + "value": "[variables('automationAccountName')]" + }, + "jobId": { + "value": "[parameters('jobId')]" + }, + "MediaServices_Name": { + "value": "[reference('ams').outputs.MediaServices_Name.value]" + }, + "MediaServices_Keys": { + "value": "[reference('ams').outputs.MediaServices_Keys.value]" + }, + "Input_StorageAccounts_Name": { + "value": "[reference('ams').outputs.Input_StorageAccounts_Name.value]" + }, + "Input_StorageAccounts_Keys": { + "value": "[reference('ams').outputs.Input_StorageAccounts_Keys.value]" + }, + "Ouput_StorageAccounts_Name": { + "value": "[reference('ams').outputs.Ouput_StorageAccounts_Name.value]" + }, + "Output_StorageAccounts_Keys": { + "value": "[reference('ams').outputs.Output_StorageAccounts_Keys.value]" + }, + "MediaService_StorageAccounts_Name": { + "value": "[reference('ams').outputs.MediaService_StorageAccounts_Name.value]" + }, + "MediaService_StorageAccounts_Keys": { + "value": "[reference('ams').outputs.MediaService_StorageAccounts_Keys.value]" + }, + "baseUri": { + "value": "[parameters('baseUri')]" + } + } + } + }, + { + "apiVersion": "2015-01-01", + "name": "desktop", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "['Microsoft.Resources/deployments/ams']" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUri'), 'desktop/desktop.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentName": { + "value": "[parameters('deploymentName')]" + }, + "storageAccountName": { + "value": "[reference('ams').outputs.Input_StorageAccounts_Name.value]" + }, + "storageAccountKey": { + "value": "[reference('ams').outputs.Input_StorageAccounts_Keys.value]" + }, + "containerName": { + "value": "videos" + }, + "desktopUsername": { + "value": "[parameters('desktopUsername')]" + }, + "desktopAdminPassword": { + "value": "[parameters('desktopAdminPassword')]" + } + } + } + }, + { + "apiVersion": "2015-01-01", + "name": "aspera", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "['Microsoft.Resources/deployments/ams']" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUri'), 'aspera/aspera.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentName": { + "value": "[parameters('deploymentName')]" + }, + "asperaUsername": { + "value": "[parameters('asperaUsername')]" + }, + "asperaAdminPassword": { + "value": "[parameters('asperaAdminPassword')]" + }, + "baseUri": { + "value": "[parameters('baseUri')]" + } + } + } + }, + { + "apiVersion": "2015-01-01", + "name": "wowza", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "['Microsoft.Resources/deployments/ams']" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUri'), 'wowza/wowza.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentName": { + "value": "[parameters('deploymentName')]" + }, + "storageAccountName": { + "value": "[reference('ams').outputs.Ouput_StorageAccounts_Name.value]" + }, + "storageAccountKey": { + "value": "[reference('ams').outputs.Output_StorageAccounts_Keys.value]" + }, + "containerName": { + "value": "videos" + }, + "wowzaUsername": { + "value": "[parameters('wowzaUsername')]" + }, + "wowzaAdminPassword": { + "value": "[parameters('wowzaadminPassword')]" + }, + "baseUri": { + "value": "[parameters('baseUri')]" + } + } + } + } + ], + "outputs": { + "Input_StorageAccounts_Name": { + "type": "String", + "value": "[reference('ams').outputs.Input_StorageAccounts_Name.value]" + }, + "Input_StorageAccounts_Keys": { + "type": "string", + "value": "[reference('ams').outputs.Input_StorageAccounts_Keys.value]" + }, + "Ouput_StorageAccounts_Name": { + "type": "string", + "value": "[reference('ams').outputs.Ouput_StorageAccounts_Name.value]" + }, + "Output_StorageAccounts_Keys": { + "type": "string", + "value": "[reference('ams').outputs.Output_StorageAccounts_Keys.value]" + }, + "desktopURL": { + "type": "String", + "value": "[reference('desktop').outputs.desktopURL.value]" + }, + "desktopUsername": { + "type": "String", + "value": "[parameters('desktopUsername')]" + }, + "desktopAdminPassword": { + "type": "String", + "value": "[parameters('desktopAdminPassword')]" + }, + "asperaURL": { + "type": "String", + "value": "[reference('aspera').outputs.asperaURL.value]" + }, + "asperaUsername": { + "type": "String", + "value": "[parameters('asperaUsername')]" + }, + "asperaAdminPassword": { + "type": "String", + "value": "[parameters('asperaAdminPassword')]" + }, + "wowzaURL": { + "type": "String", + "value": "[reference('wowza').outputs.wowzaURL.value]" + }, + "wowzaUsername": { + "type": "String", + "value": "[parameters('wowzaUsername')]" + }, + "wowzaAdminPassword": { + "type": "String", + "value": "[parameters('wowzaAdminPassword')]" + } + } } diff --git a/vod-aspera-wowza-azuremediaservices/desktop/desktop.json b/vod-aspera-wowza-azuremediaservices/desktop/desktop.json index 8b29e6ef980c..ea963fae099b 100644 --- a/vod-aspera-wowza-azuremediaservices/desktop/desktop.json +++ b/vod-aspera-wowza-azuremediaservices/desktop/desktop.json @@ -19,6 +19,13 @@ }, "desktopAdminPassword": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -41,15 +48,14 @@ "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", "storageAccountName": "[concat(uniqueString(resourceGroup().id),'winrmsa')]", - "apiVersion": "2015-06-15", - "FQDN": "[concat(variables('dnsLabelPrefix'),'.',resourceGroup().location,'.cloudapp.azure.com')]" + "FQDN": "[concat(variables('dnsLabelPrefix'),'.',parameters('location'),'.cloudapp.azure.com')]" }, "resources": [ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -58,7 +64,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -70,7 +76,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -91,7 +97,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -117,7 +123,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -163,4 +169,4 @@ "value": "[ variables('FQDN')]" } } -} \ No newline at end of file +} diff --git a/vod-aspera-wowza-azuremediaservices/wowza/wowza.json b/vod-aspera-wowza-azuremediaservices/wowza/wowza.json index c097cfe379b3..9a120a9719b1 100644 --- a/vod-aspera-wowza-azuremediaservices/wowza/wowza.json +++ b/vod-aspera-wowza-azuremediaservices/wowza/wowza.json @@ -1,318 +1,341 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - - "deploymentName": { - "type": "string", - "defaultValue": "" - }, - "storageAccountName": { - "type": "string" - }, - "storageAccountKey": { - "type": "string" - }, - "containerName": { - "type": "string" - }, - "wowzaUsername": { - "type": "string" - }, - "wowzaAdminPassword": { - "type": "securestring" - }, - "baseUri": { - "type": "string", - "defaultValue":"https://raw.githubusercontent.com/sysgain/azurequickstarts/master/VOD-Aspera-Wowza-AzureMediaServices/" - } - }, - "variables": { - "virtualMachineName": "[concat(parameters('deploymentName'), 'wowza')]", - "virtualMachineSize": "Standard_DS1", - "storageAccountType": "Standard_LRS", - "diagnosticsStorageAccountType":"Standard_LRS", - "virtualNetworkName": "[concat(parameters('deploymentName'),'wow', 'vnet')]", - "networkInterfaceName": "[concat(parameters('deploymentName'),'wow', 'nic')]", - "networkSecurityGroupName": "[concat(parameters('deploymentName'), 'wow','nsg')]", - "addressPrefix": "10.0.0.0/16", - "subnetName": "wowsubnet", - "subnetPrefix": "10.0.10.0/24", - "publicIpAddressName": "[concat(parameters('deploymentName'),'wow', 'publicIP')]", - "virtualMachineExtensionName": "[concat(parameters('deploymentName'), 'wowzascript')]", - "publicIPdnsPrefix": "[concat(parameters('deploymentName'), 'wowzadns')]", - "scriptFilePath": "[concat(parameters('baseUri'), 'wowza/configwowza.sh')]", - "executeCmd": "[concat('sh configwowza.sh', ' ',parameters('wowzaUsername'), ' ',parameters('storageAccountName'),' ',parameters('storageAccountKey'), ' ',parameters('containerName'))]", - "vnetId": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetId'), '/subnets/', variables('subnetName'))]", - "storageAccount": "[concat('sa',uniqueString(resourceGroup().id))]", - "diagnosticsStorageAccountName": "[concat('diagsa',uniqueString(resourceGroup().id))]", - "publicIPdns": "[concat(parameters('deploymentName'),'wowza')]", - "FQDN": "[concat(variables('publicIPdns'),'.',resourceGroup().location,'.cloudapp.azure.com')]", - - "metricsresourceid": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/', 'Microsoft.Compute/virtualMachines/', variables('virtualMachineName'))]", - "metricsclosing": "[concat('')]", - "metricscounters": "", - "metricsstart": "", - "wadcfgx": "[concat(variables('metricsstart'), variables('metricscounters'), variables('metricsclosing'))]" - - }, - "resources": [{ - "name": "[variables('virtualMachineName')]", - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2017-03-30", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccount'))]", - "[concat('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName'))]" - ], - "properties": { - "osProfile": { - "computerName": "[variables('virtualMachineName')]", - "adminUsername": "[parameters('wowzaUsername')]", - "adminPassword": "[parameters('wowzaAdminPassword')]" - }, - "hardwareProfile": { - "vmSize": "[variables('virtualMachineSize')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "wowza", - "offer": "wowzastreamingengine", - "sku": "std-linux-byol-4-2", - "version": "latest" - }, - "osDisk": { - "name": "[variables('virtualMachineName')]", - "vhd": { - "uri": "[concat(concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccount')), '2015-06-15').primaryEndpoints['blob'], 'vhds/'), variables('virtualMachineName'), '.vhd')]" - }, - "createOption": "FromImage" - }, - "dataDisks": [] - }, - "networkProfile": { - "networkInterfaces": [{ - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]" - }] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('diagnosticsStorageAccountName')), '2015-06-15').primaryEndpoints['blob']]" - } - } - }, - "plan": { - "name": "std-linux-byol-4-2", - "publisher": "wowza", - "product": "wowzastreamingengine" - } - }, { - "name": "[concat(variables('virtualMachineName'),'/Microsoft.Insights.VMDiagnosticsSettings')]", - "type": "Microsoft.Compute/virtualMachines/extensions", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'))]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "LinuxDiagnostic", - "typeHandlerVersion": "2.3", - "autoUpgradeMinorVersion": true, - "settings": { - "xmlCfg": "[base64(variables('wadcfgx'))]", - "StorageAccount": "[variables('diagnosticsStorageAccountName')]" - }, - "protectedSettings": { - "storageAccountName": "[variables('diagnosticsStorageAccountName')]", - "storageAccountKey": "[listKeys(variables('diagnosticsStorageAccountName'),'2015-06-15').key1]", - "storageAccountEndPoint": "https://core.windows.net/" - } - } - }, { - "name": "[variables('storageAccount')]", - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, { - "name": "[variables('diagnosticsStorageAccountName')]", - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": { - "accountType": "[variables('diagnosticsStorageAccountType')]" - } - }, { - "name": "[variables('virtualNetworkName')]", - "type": "Microsoft.Network/virtualNetworks", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [{ - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - }] - } - }, { - "name": "[variables('networkInterfaceName')]", - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", - "[concat('Microsoft.Network/publicIpAddresses/', variables('publicIpAddressName'))]", - "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" - ], - "properties": { - "primary": true, - "ipConfigurations": [{ - "name": "ipconfig1", - "properties": { - "subnet": { - "id": "[variables('subnetRef')]" - }, - "privateIPAllocationMethod": "Dynamic", - "publicIpAddress": { - "id": "[resourceId('Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]" - } - } - }], - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" - } - } - }, { - "name": "[variables('publicIpAddressName')]", - "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "2017-10-01", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('publicIPdns')]" - } - } - - }, { - "name": "[variables('networkSecurityGroupName')]", - "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [{ - "name": "Server", - "properties": { - "priority": 1010, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "1935", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, { - "name": "HTTP", - "properties": { - "priority": 1020, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "80", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, { - "name": "HTTPS", - "properties": { - "priority": 1030, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "443", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, { - "name": "RTSP", - "properties": { - "priority": 1040, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "554", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, { - "name": "Manger", - "properties": { - "priority": 1050, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "8088", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, { - "name": "default-allow-ssh", - "properties": { - "priority": 1060, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "22", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }] - } - }, { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('virtualMachineName'),'/',variables('virtualMachineExtensionName'))]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'))]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.5", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[variables('scriptFilePath')]" - ], - "commandToExecute": "[variables('executeCmd')]" - } - } - }], - "outputs": { - "wowzaURL": { - "type": "string", - "value": "[ variables('FQDN')]" - - } - } - + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentName": { + "type": "string", + "defaultValue": "" + }, + "storageAccountName": { + "type": "string" + }, + "storageAccountKey": { + "type": "string" + }, + "containerName": { + "type": "string" + }, + "wowzaUsername": { + "type": "string" + }, + "wowzaAdminPassword": { + "type": "securestring" + }, + "baseUri": { + "type": "string", + "defaultValue": "https://raw.githubusercontent.com/sysgain/azurequickstarts/master/VOD-Aspera-Wowza-AzureMediaServices/" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "virtualMachineName": "[concat(parameters('deploymentName'), 'wowza')]", + "virtualMachineSize": "Standard_DS1", + "storageAccountType": "Standard_LRS", + "diagnosticsStorageAccountType": "Standard_LRS", + "virtualNetworkName": "[concat(parameters('deploymentName'),'wow', 'vnet')]", + "networkInterfaceName": "[concat(parameters('deploymentName'),'wow', 'nic')]", + "networkSecurityGroupName": "[concat(parameters('deploymentName'), 'wow','nsg')]", + "addressPrefix": "10.0.0.0/16", + "subnetName": "wowsubnet", + "subnetPrefix": "10.0.10.0/24", + "publicIpAddressName": "[concat(parameters('deploymentName'),'wow', 'publicIP')]", + "virtualMachineExtensionName": "[concat(parameters('deploymentName'), 'wowzascript')]", + "scriptFilePath": "[concat(parameters('baseUri'), 'wowza/configwowza.sh')]", + "executeCmd": "[concat('sh configwowza.sh', ' ',parameters('wowzaUsername'), ' ',parameters('storageAccountName'),' ',parameters('storageAccountKey'), ' ',parameters('containerName'))]", + "vnetId": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", + "subnetRef": "[concat(variables('vnetId'), '/subnets/', variables('subnetName'))]", + "storageAccount": "[concat('sa',uniqueString(resourceGroup().id))]", + "diagnosticsStorageAccountName": "[concat('diagsa',uniqueString(resourceGroup().id))]", + "publicIPdns": "[concat(parameters('deploymentName'),'wowza')]", + "FQDN": "[concat(variables('publicIPdns'),'.',parameters('location'),'.cloudapp.azure.com')]", + "metricsresourceid": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/', 'Microsoft.Compute/virtualMachines/', variables('virtualMachineName'))]", + "metricsclosing": "[concat('')]", + "metricscounters": "", + "metricsstart": "", + "wadcfgx": "[concat(variables('metricsstart'), variables('metricscounters'), variables('metricsclosing'))]" + }, + "resources": [ + { + "name": "[variables('virtualMachineName')]", + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2017-03-30", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccount'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName'))]" + ], + "properties": { + "osProfile": { + "computerName": "[variables('virtualMachineName')]", + "adminUsername": "[parameters('wowzaUsername')]", + "adminPassword": "[parameters('wowzaAdminPassword')]" + }, + "hardwareProfile": { + "vmSize": "[variables('virtualMachineSize')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "wowza", + "offer": "wowzastreamingengine", + "sku": "std-linux-byol-4-2", + "version": "latest" + }, + "osDisk": { + "name": "[variables('virtualMachineName')]", + "vhd": { + "uri": "[concat(concat(reference(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccount')), '2015-06-15').primaryEndpoints['blob'], 'vhds/'), variables('virtualMachineName'), '.vhd')]" + }, + "createOption": "FromImage" + }, + "dataDisks": [] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]" + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('diagnosticsStorageAccountName')), '2015-06-15').primaryEndpoints['blob']]" + } + } + }, + "plan": { + "name": "std-linux-byol-4-2", + "publisher": "wowza", + "product": "wowzastreamingengine" + } + }, + { + "name": "[concat(variables('virtualMachineName'),'/Microsoft.Insights.VMDiagnosticsSettings')]", + "type": "Microsoft.Compute/virtualMachines/extensions", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'))]" + ], + "properties": { + "publisher": "Microsoft.OSTCExtensions", + "type": "LinuxDiagnostic", + "typeHandlerVersion": "2.3", + "autoUpgradeMinorVersion": true, + "settings": { + "xmlCfg": "[base64(variables('wadcfgx'))]", + "StorageAccount": "[variables('diagnosticsStorageAccountName')]" + }, + "protectedSettings": { + "storageAccountName": "[variables('diagnosticsStorageAccountName')]", + "storageAccountKey": "[listKeys(variables('diagnosticsStorageAccountName'),'2015-06-15').key1]", + "storageAccountEndPoint": "https://core.windows.net/" + } + } + }, + { + "name": "[variables('storageAccount')]", + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "accountType": "[variables('storageAccountType')]" + } + }, + { + "name": "[variables('diagnosticsStorageAccountName')]", + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "accountType": "[variables('diagnosticsStorageAccountType')]" + } + }, + { + "name": "[variables('virtualNetworkName')]", + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "[variables('subnetPrefix')]" + } + } + ] + } + }, + { + "name": "[variables('networkInterfaceName')]", + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", + "[concat('Microsoft.Network/publicIpAddresses/', variables('publicIpAddressName'))]", + "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" + ], + "properties": { + "primary": true, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "subnet": { + "id": "[variables('subnetRef')]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId('Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]" + } + } + } + ], + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + } + } + }, + { + "name": "[variables('publicIpAddressName')]", + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2017-10-01", + "location": "[parameters('location')]", + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[variables('publicIPdns')]" + } + } + }, + { + "name": "[variables('networkSecurityGroupName')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "Server", + "properties": { + "priority": 1010, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "1935", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "HTTP", + "properties": { + "priority": 1020, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "80", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "HTTPS", + "properties": { + "priority": 1030, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "443", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "RTSP", + "properties": { + "priority": 1040, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "554", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "Manger", + "properties": { + "priority": 1050, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "8088", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "default-allow-ssh", + "properties": { + "priority": 1060, + "sourceAddressPrefix": "*", + "protocol": "Tcp", + "destinationPortRange": "22", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + } + ] + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('virtualMachineName'),'/',variables('virtualMachineExtensionName'))]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'))]" + ], + "properties": { + "publisher": "Microsoft.OSTCExtensions", + "type": "CustomScriptForLinux", + "typeHandlerVersion": "1.5", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[variables('scriptFilePath')]" + ], + "commandToExecute": "[variables('executeCmd')]" + } + } + } + ], + "outputs": { + "wowzaURL": { + "type": "string", + "value": "[ variables('FQDN')]" + } + } } diff --git a/vsts-fullbuild-redhat-vm/azuredeploy.json b/vsts-fullbuild-redhat-vm/azuredeploy.json index b5ed30cd327b..443e3f40af96 100755 --- a/vsts-fullbuild-redhat-vm/azuredeploy.json +++ b/vsts-fullbuild-redhat-vm/azuredeploy.json @@ -1,227 +1,234 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vstsAccountURL": { - "type": "string", - "metadata": { - "description": "Team Services Account URL (e.g. https://myaccount.visualstudio.com)" - } - }, - "vstsPAT": { - "type": "string", - "metadata": { - "description": "Team Services PAT for user with Agent Pools (read,manage) permissions" - } - }, - "vstsPoolName": { - "type": "string", - "defaultValue": "Default", - "metadata": { - "description": "Team Services Agent Pool Name" - } - }, - "vstsAgentName": { - "type": "string", - "defaultValue": "redhat-build-full", - "metadata": { - "description": "Team Services Agent Name" - } - }, - "adminUsername": { - "type": "string", - "defaultValue": "vstsbuild", - "metadata": { - "description": "Linux VM User Account Name" - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Linux VM User Password" - } - }, - "dnsLabelPrefix": { - "type": "string", - "metadata": { - "description": "DNS Label for the Public IP. It must be lowercase and must match the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$." - } - }, - "agentVMCount": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "The number of VM build servers to provision in this deployment." - } - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vstsAccountURL": { + "type": "string", + "metadata": { + "description": "Team Services Account URL (e.g. https://myaccount.visualstudio.com)" + } }, - "variables": { - "imagePublisher": "redhat", - "imageOffer": "rhel", - "imageSKU": "7.3", - "nicName": "[concat(parameters('dnsLabelPrefix'), '-nic-')]", - "addressPrefix": "10.0.0.0/16", - "subnet1Name": "Subnet-1", - "subnet1Prefix": "10.0.0.0/24", - "publicIPAddressName": "[concat(parameters('dnsLabelPrefix'), '-ip-')]", - "vmName": "[concat(parameters('dnsLabelPrefix'), '-')]", - "virtualNetworkName": "MyVNET", - "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", - "subnet1Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets/', variables('virtualNetworkName'), variables('subnet1Name'))]" + "vstsPAT": { + "type": "string", + "metadata": { + "description": "Team Services PAT for user with Agent Pools (read,manage) permissions" + } }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('StorageAccountName'), copyIndex())]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "copy": { - "name": "storageLoop", - "count": "[parameters('agentVMCount')]" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": {} + "vstsPoolName": { + "type": "string", + "defaultValue": "Default", + "metadata": { + "description": "Team Services Agent Pool Name" + } + }, + "vstsAgentName": { + "type": "string", + "defaultValue": "redhat-build-full", + "metadata": { + "description": "Team Services Agent Name" + } + }, + "adminUsername": { + "type": "string", + "defaultValue": "vstsbuild", + "metadata": { + "description": "Linux VM User Account Name" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Linux VM User Password" + } + }, + "dnsLabelPrefix": { + "type": "string", + "metadata": { + "description": "DNS Label for the Public IP. It must be lowercase and must match the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$." + } + }, + "agentVMCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The number of VM build servers to provision in this deployment." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "imagePublisher": "redhat", + "imageOffer": "rhel", + "imageSKU": "7.3", + "nicName": "[concat(parameters('dnsLabelPrefix'), '-nic-')]", + "addressPrefix": "10.0.0.0/16", + "subnet1Name": "Subnet-1", + "subnet1Prefix": "10.0.0.0/24", + "publicIPAddressName": "[concat(parameters('dnsLabelPrefix'), '-ip-')]", + "vmName": "[concat(parameters('dnsLabelPrefix'), '-')]", + "virtualNetworkName": "MyVNET", + "storageAccountName": "[concat('vhds', uniqueString(resourceGroup().id))]", + "subnet1Ref": "[resourceId('Microsoft.Network/virtualNetworks/subnets/', variables('virtualNetworkName'), variables('subnet1Name'))]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[concat(variables('StorageAccountName'), copyIndex())]", + "apiVersion": "2016-01-01", + "location": "[parameters('location')]", + "copy": { + "name": "storageLoop", + "count": "[parameters('agentVMCount')]" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage", + "properties": {} + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(variables('publicIPAddressName'), copyIndex())]", + "location": "[parameters('location')]", + "copy": { + "name": "publicIpLoop", + "count": "[parameters('agentVMCount')]" + }, + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[concat(parameters('dnsLabelPrefix'), '-', copyIndex())]" + } + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[concat(variables('publicIPAddressName'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "publicIpLoop", - "count": "[parameters('agentVMCount')]" - }, + "subnets": [ + { + "name": "[variables('subnet1Name')]", "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[concat(parameters('dnsLabelPrefix'), '-', copyIndex())]" - } + "addressPrefix": "[variables('subnet1Prefix')]" } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/networkInterfaces", + "name": "[concat(variables('nicName'), copyIndex())]", + "location": "[parameters('location')]", + "copy": { + "name": "nicLoop", + "count": "[parameters('agentVMCount')]" + }, + "dependsOn": [ + "[concat(variables('publicIPAddressName'), copyIndex())]", + "[variables('virtualNetworkName')]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnet1Name')]", - "properties": { - "addressPrefix": "[variables('subnet1Prefix')]" - } - } - ] + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(variables('publicIPAddressName'), copyIndex()))]" + }, + "subnet": { + "id": "[variables('subnet1Ref')]" + } } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Compute/virtualMachines", + "name": "[concat(variables('vmName'), copyIndex())]", + "location": "[parameters('location')]", + "copy": { + "name": "vmLoop", + "count": "[parameters('agentVMCount')]" + }, + "dependsOn": [ + "[concat(variables('StorageAccountName'), copyIndex())]", + "[concat(variables('nicName'), copyIndex())]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "Standard_F1" }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoop", - "count": "[parameters('agentVMCount')]" + "osProfile": { + "computerName": "[concat(variables('vmName'), copyIndex())]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]", + "customData": "[base64(variables('publicIPAddressName'))]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[variables('imagePublisher')]", + "offer": "[variables('imageOffer')]", + "sku": "[variables('imageSKU')]", + "version": "latest" + }, + "osDisk": { + "name": "osdisk1", + "vhd": { + "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', concat(variables('storageAccountName'), copyIndex())), '2015-06-15').primaryEndpoints.blob, 'vhds/', parameters('dnsLabelPrefix'), copyIndex(), '.vhd')]" }, - "dependsOn": [ - "[concat(variables('publicIPAddressName'), copyIndex())]", - "[variables('virtualNetworkName')]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(variables('publicIPAddressName'), copyIndex()))]" - }, - "subnet": { - "id": "[variables('subnet1Ref')]" - } - } - } - ] - } + "caching": "ReadWrite", + "createOption": "FromImage" + } }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('nicName'), copyIndex()))]" + } + ] + } + }, + "resources": [ { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('vmName'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoop", - "count": "[parameters('agentVMCount')]" - }, - "dependsOn": [ - "[concat(variables('StorageAccountName'), copyIndex())]", - "[concat(variables('nicName'), copyIndex())]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "Standard_F1" - }, - "osProfile": { - "computerName": "[concat(variables('vmName'), copyIndex())]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "customData": "[base64(variables('publicIPAddressName'))]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('imagePublisher')]", - "offer": "[variables('imageOffer')]", - "sku": "[variables('imageSKU')]", - "version": "latest" - }, - "osDisk": { - "name": "osdisk1", - "vhd": { - "uri": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts/', concat(variables('storageAccountName'), copyIndex())), '2015-06-15').primaryEndpoints.blob, 'vhds/', parameters('dnsLabelPrefix'), copyIndex(), '.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('nicName'), copyIndex()))]" - } - ] - } - }, - "resources": [ - { - "type": "extensions", - "name": "configScript", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat(variables('vmName'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/vsts-fullbuild-redhat-vm/scripts/full-rh-vstsbuild-install.sh" - ], - "commandToExecute": "[concat('sh full-rh-vstsbuild-install.sh', ' ', parameters('vstsAccountURL'), ' ', parameters('vstsPAT'), ' ', parameters('vstsPoolName'), ' ', concat(parameters('vstsAgentName'),copyIndex()), ' ', parameters('adminUsername'))]" - } - } - } - ] + "type": "extensions", + "name": "configScript", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat(variables('vmName'), copyIndex())]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/vsts-fullbuild-redhat-vm/scripts/full-rh-vstsbuild-install.sh" + ], + "commandToExecute": "[concat('sh full-rh-vstsbuild-install.sh', ' ', parameters('vstsAccountURL'), ' ', parameters('vstsPAT'), ' ', parameters('vstsPoolName'), ' ', concat(parameters('vstsAgentName'),copyIndex()), ' ', parameters('adminUsername'))]" + } + } } - ] + ] + } + ] } diff --git a/vsts-fullbuild-ubuntu-vm/azuredeploy.json b/vsts-fullbuild-ubuntu-vm/azuredeploy.json index 99d9d5f34341..77fefb209ea7 100755 --- a/vsts-fullbuild-ubuntu-vm/azuredeploy.json +++ b/vsts-fullbuild-ubuntu-vm/azuredeploy.json @@ -27,7 +27,7 @@ "metadata": { "description": "Team Services Agent Name" } - }, + }, "adminUsername": { "type": "string", "defaultValue": "vstsbuild", @@ -43,12 +43,19 @@ "metadata": { "description": "DNS Label for the Public IP. 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." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "imagePublisher": "canonical", "imageOffer": "ubuntuserver", - "imageSKU":"16.04.0-LTS", + "imageSKU": "16.04.0-LTS", "baseName": "[uniquestring(parameters('dnsLabelPrefix'),resourceGroup().id,uniquestring(deployment().name))]", "nicName": "[concat('myNic1',variables('baseName'))]", "addressPrefix": "10.0.0.0/16", @@ -70,19 +77,18 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('StorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, "kind": "Storage", - "properties": { - } + "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -94,7 +100,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -115,7 +121,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -141,7 +147,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('StorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -184,8 +190,10 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", - "dependsOn": ["[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"], + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" + ], "properties": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", diff --git a/vsts-minbuildjava-ubuntu-vm/azuredeploy.json b/vsts-minbuildjava-ubuntu-vm/azuredeploy.json index df4b287168c6..fabdbd2a93bc 100755 --- a/vsts-minbuildjava-ubuntu-vm/azuredeploy.json +++ b/vsts-minbuildjava-ubuntu-vm/azuredeploy.json @@ -27,7 +27,7 @@ "metadata": { "description": "Team Services Agent Name" } - }, + }, "adminUsername": { "type": "string", "defaultValue": "vstsbuild", @@ -43,12 +43,19 @@ "metadata": { "description": "DNS Label for the Public IP. 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." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "imagePublisher": "canonical", "imageOffer": "ubuntuserver", - "imageSKU":"16.04.0-LTS", + "imageSKU": "16.04.0-LTS", "baseName": "[uniquestring(parameters('dnsLabelPrefix'),resourceGroup().id,uniquestring(deployment().name))]", "nicName": "[concat('myNic2',variables('baseName'))]", "addressPrefix": "10.0.0.0/16", @@ -70,19 +77,18 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('StorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, "kind": "Storage", - "properties": { - } + "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -94,7 +100,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -115,7 +121,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -141,7 +147,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('StorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -184,8 +190,10 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", - "dependsOn": ["[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"], + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" + ], "properties": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", diff --git a/vsts-tomcat-redhat-vm/azuredeploy.json b/vsts-tomcat-redhat-vm/azuredeploy.json index 14d7d8722a1a..c86f978f6008 100755 --- a/vsts-tomcat-redhat-vm/azuredeploy.json +++ b/vsts-tomcat-redhat-vm/azuredeploy.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": { + "parameters": { "adminUsername": { "type": "string", "metadata": { @@ -38,12 +38,19 @@ "metadata": { "description": "Pass phrase for SSH certificate" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "imagePublisher": "redhat", "imageOffer": "rhel", - "imageSKU":"7.2", + "imageSKU": "7.2", "baseName": "[uniquestring(parameters('dnsLabelPrefix'),resourceGroup().id,uniquestring(deployment().name))]", "nicName": "[concat('myNic8',variables('baseName'))]", "addressPrefix": "10.0.0.0/16", @@ -66,19 +73,18 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('StorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, "kind": "Storage", - "properties": { - } + "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -90,7 +96,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "Custom Network Security Group" }, @@ -110,7 +116,7 @@ "direction": "Inbound" } }, - { + { "name": "default-allow-tomcat", "properties": { "description": "Allow WEB/Tomcat", @@ -124,7 +130,7 @@ "direction": "Inbound" } }, - { + { "name": "default-allow-ftp", "properties": { "description": "Allow FTP", @@ -159,7 +165,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('frontEndNSGName'))]" ], @@ -176,7 +182,7 @@ "addressPrefix": "[variables('subnet1Prefix')]", "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('frontEndNSGName'))]" - } + } } } ] @@ -186,16 +192,16 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('frontEndNSGName'))]" ], "properties": { - "networkSecurityGroup": { + "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('frontEndNSGName'))]" - }, + }, "ipConfigurations": [ { "name": "ipconfig1", @@ -216,7 +222,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('StorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -260,8 +266,10 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": ["[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"], + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" + ], "properties": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", diff --git a/vsts-tomcat-ubuntu-vm/azuredeploy.json b/vsts-tomcat-ubuntu-vm/azuredeploy.json index 0a37b557f88a..ed9109f6f630 100755 --- a/vsts-tomcat-ubuntu-vm/azuredeploy.json +++ b/vsts-tomcat-ubuntu-vm/azuredeploy.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": { + "parameters": { "adminUsername": { "type": "string", "defaultValue": "tcdeploy", @@ -36,12 +36,19 @@ "metadata": { "description": "Pass phrase for SSH certificate" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "imagePublisher": "canonical", "imageOffer": "ubuntuserver", - "imageSKU":"16.04.0-LTS", + "imageSKU": "16.04.0-LTS", "baseName": "[uniquestring(parameters('dnsLabelPrefix'),resourceGroup().id,uniquestring(deployment().name))]", "nicName": "[concat('myNic7',variables('baseName'))]", "addressPrefix": "10.0.0.0/16", @@ -64,19 +71,18 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('StorageAccountName')]", "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "sku": { "name": "[variables('storageAccountType')]" }, "kind": "Storage", - "properties": { - } + "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -88,7 +94,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('frontEndNSGName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "Custom Network Security Group" }, @@ -108,7 +114,7 @@ "direction": "Inbound" } }, - { + { "name": "default-allow-tomcat", "properties": { "description": "Allow WEB/Tomcat", @@ -122,7 +128,7 @@ "direction": "Inbound" } }, - { + { "name": "default-allow-ftp", "properties": { "description": "Allow FTP", @@ -157,7 +163,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('frontEndNSGName'))]" ], @@ -174,7 +180,7 @@ "addressPrefix": "[variables('subnet1Prefix')]", "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('frontEndNSGName'))]" - } + } } } ] @@ -184,16 +190,16 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", "[concat('Microsoft.Network/networkSecurityGroups/', variables('frontEndNSGName'))]" ], "properties": { - "networkSecurityGroup": { + "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('frontEndNSGName'))]" - }, + }, "ipConfigurations": [ { "name": "ipconfig1", @@ -214,7 +220,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('StorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -258,8 +264,10 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": ["[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"], + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" + ], "properties": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", diff --git a/webapp-blob-connection/azuredeploy.json b/webapp-blob-connection/azuredeploy.json index 24e3f3317cab..1bc0580c7c92 100644 --- a/webapp-blob-connection/azuredeploy.json +++ b/webapp-blob-connection/azuredeploy.json @@ -66,103 +66,109 @@ "metadata": { "description": "Sas token to be appended to DeployPackageURI." } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "packageURI": "[concat(parameters('DeployPackageURI'), parameters('SasToken'))]", "BlobconnectionString": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('StorageAccountName'),';AccountKey=',parameters('StorageAccountKey'))]" }, - "resources": [ - { - "name": "[parameters('WebAppSvcPlanName')]", - "type": "Microsoft.Web/serverfarms", - "location": "[resourceGroup().location]", - "apiVersion": "2014-06-01", - "dependsOn": [ ], - "tags": { - "displayName": "AppSvcPlan" - }, - "properties": { - "name": "[parameters('WebAppSvcPlanName')]", - "sku": "[parameters('WebAppSvcPlanSKU')]", - "workerSize": "[parameters('WebAppSvcPlanWorkerSize')]", - "numberOfWorkers": 1 - } - }, - { + "resources": [ + { + "name": "[parameters('WebAppSvcPlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('location')]", + "apiVersion": "2014-06-01", + "dependsOn": [], + "tags": { + "displayName": "AppSvcPlan" + }, + "properties": { + "name": "[parameters('WebAppSvcPlanName')]", + "sku": "[parameters('WebAppSvcPlanSKU')]", + "workerSize": "[parameters('WebAppSvcPlanWorkerSize')]", + "numberOfWorkers": 1 + } + }, + { + "name": "[parameters('WebAppName')]", + "type": "Microsoft.Web/sites", + "location": "[parameters('location')]", + "apiVersion": "2015-08-01", + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', parameters('WebAppSvcPlanName'))]" + ], + "tags": { + "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('WebAppSvcPlanName'))]": "Resource", + "displayName": "WebApp" + }, + "properties": { "name": "[parameters('WebAppName')]", - "type": "Microsoft.Web/sites", - "location": "[resourceGroup().location]", - "apiVersion": "2015-08-01", - "dependsOn": [ - "[concat('Microsoft.Web/serverfarms/', parameters('WebAppSvcPlanName'))]" - ], - "tags": { - "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('WebAppSvcPlanName'))]": "Resource", - "displayName": "WebApp" + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', parameters('WebAppSvcPlanName'))]" + }, + "resources": [ + { + "apiVersion": "2015-08-01", + "name": "web", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('WebAppName'))]", + "[concat('Microsoft.Web/sites/', parameters('WebAppName'), '/extensions/MSDeploy')]" + ], + "tags": { + "displayName": "WebAppConfig" + }, + "properties": { + "phpVersion": "5.6", + "netFrameworkVersion": "v4.6", + "use32BitWorkerProcess": false, + "webSocketsEnabled": true, + "alwaysOn": false, + "remoteDebuggingEnabled": true, + "remoteDebuggingVersion": "VS2015" + } }, - "properties": { - "name": "[parameters('WebAppName')]", - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', parameters('WebAppSvcPlanName'))]" + { + "name": "MSDeploy", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "2015-08-01", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('WebAppName'))]" + ], + "tags": { + "displayName": "WebAppMSDeploy" + }, + "properties": { + "packageUri": "[variables('packageURI')]" + } }, - "resources": [ - { - "apiVersion": "2015-08-01", - "name": "web", - "type": "config", - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('WebAppName'))]", - "[concat('Microsoft.Web/sites/', parameters('WebAppName'), '/extensions/MSDeploy')]" - ], - "tags": { - "displayName": "WebAppConfig" - }, - "properties": { - "phpVersion": "5.6", - "netFrameworkVersion": "v4.6", - "use32BitWorkerProcess": false, - "webSocketsEnabled": true, - "alwaysOn": false, - "remoteDebuggingEnabled": true, - "remoteDebuggingVersion": "VS2015" - } + { + "name": "connectionstrings", + "type": "config", + "apiVersion": "2015-08-01", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('WebAppName'))]", + "[concat('Microsoft.Web/sites/', parameters('WebAppName'), '/extensions/MSDeploy')]" + ], + "tags": { + "displayName": "WebAppConnectionStrings" }, - { - "name": "MSDeploy", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "2015-08-01", - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('WebAppName'))]" - ], - "tags": { - "displayName": "WebAppMSDeploy" - }, - "properties": { - "packageUri": "[variables('packageURI')]" + "properties": { + "BlobConnection": { + "value": "[variables('BlobconnectionString')]", + "type": "Custom" } - }, - { - "name": "connectionstrings", - "type": "config", - "apiVersion": "2015-08-01", - "dependsOn": [ - "[concat('Microsoft.Web/sites/', parameters('WebAppName'))]", - "[concat('Microsoft.Web/sites/', parameters('WebAppName'), '/extensions/MSDeploy')]" - ], - "tags": { - "displayName": "WebAppConnectionStrings" - }, - "properties": { - "BlobConnection": { - "value": "[variables('BlobconnectionString')]", - "type": "Custom" - } - } } - ] - } - ], - "outputs": { + } + ] } + ], + "outputs": {} } diff --git a/webapp-keyvault-ssl/azuredeploy.json b/webapp-keyvault-ssl/azuredeploy.json index c7002acb35b3..44c130f853a9 100644 --- a/webapp-keyvault-ssl/azuredeploy.json +++ b/webapp-keyvault-ssl/azuredeploy.json @@ -51,6 +51,13 @@ "metadata": { "description": "Custom hostname for creating SSL binding. This hostname should already be assigned to the Web App" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -69,7 +76,7 @@ }, "name": "[parameters('servicePlanName')]", "apiVersion": "2015-08-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "name": "[parameters('servicePlanName')]", "numberOfWorkers": 1 @@ -79,7 +86,7 @@ "type": "Microsoft.Web/certificates", "name": "[parameters('certificateName')]", "apiVersion": "2016-03-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "keyVaultId": "[parameters('existingKeyVaultId')]", "keyVaultSecretName": "[parameters('existingKeyVaultSecretName')]" @@ -89,7 +96,7 @@ "type": "Microsoft.Web/sites", "name": "[parameters('webAppName')]", "apiVersion": "2016-08-01", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Web/serverfarms', parameters('servicePlanName'))]", "[resourceId('Microsoft.Web/certificates', parameters('certificateName'))]" @@ -135,7 +142,7 @@ "value": "[parameters('hostname')]" }, "existingAppLocation": { - "value": "[resourceGroup().location]" + "value": "[parameters('location')]" }, "certificateThumprint": { "value": "[reference(resourceId('Microsoft.Web/certificates', parameters('certificateName'))).Thumbprint]" diff --git a/webapp-keyvault-ssl/nestedtemplates/webapp-ssl-bind.json b/webapp-keyvault-ssl/nestedtemplates/webapp-ssl-bind.json index 4c9e5da0c44f..b4a8e9b90fbc 100644 --- a/webapp-keyvault-ssl/nestedtemplates/webapp-ssl-bind.json +++ b/webapp-keyvault-ssl/nestedtemplates/webapp-ssl-bind.json @@ -1,50 +1,49 @@ { - "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "existingWebAppName":{ - "type":"string", - "metadata":{ - "description":"Existing App name to use for creating SSL binding. This App should have the hostname assigned as a custom domain" - } - }, - "hostname":{ - "type":"string", - "metadata":{ - "description":"Custom hostname for creating SSL binding. This hostname should already be assigned to the Web App" - } - }, - "existingAppLocation":{ - "type":"string", - "metadata":{ - "description":"App location" - } - }, - "certificateThumprint":{ - "type":"string", - "metadata":{ - "description":"SSL Certificate Thumb Print" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "existingWebAppName": { + "type": "string", + "metadata": { + "description": "Existing App name to use for creating SSL binding. This App should have the hostname assigned as a custom domain" } - }, - "resources":[ + }, + "hostname": { + "type": "string", + "metadata": { + "description": "Custom hostname for creating SSL binding. This hostname should already be assigned to the Web App" + } + }, + "existingAppLocation": { + "type": "string", + "metadata": { + "description": "App location" + } + }, + "certificateThumprint": { + "type": "string", + "metadata": { + "description": "SSL Certificate Thumb Print" + } + } + }, + "resources": [ { - "type":"Microsoft.Web/sites", - "name":"[parameters('existingWebAppName')]", - "apiVersion":"2016-08-01", - "location":"[parameters('existingAppLocation')]", - "properties":{ - "name":"[parameters('existingWebAppName')]", - "hostNameSslStates":[ - { - "name":"[parameters('hostname')]", - "sslState":"SniEnabled", - "thumbprint":"[parameters('certificateThumprint')]", - "toUpdate":true - } - ] - } + "type": "Microsoft.Web/sites", + "name": "[parameters('existingWebAppName')]", + "apiVersion": "2016-08-01", + "location": "[parameters('existingAppLocation')]", + "properties": { + "name": "[parameters('existingWebAppName')]", + "hostNameSslStates": [ + { + "name": "[parameters('hostname')]", + "sslState": "SniEnabled", + "thumbprint": "[parameters('certificateThumprint')]", + "toUpdate": true + } + ] } - - ] -} \ No newline at end of file + } + ] +} diff --git a/website-cluster-centos/azuredeploy.json b/website-cluster-centos/azuredeploy.json index b6a8028f5bfc..ffae7ded9a79 100644 --- a/website-cluster-centos/azuredeploy.json +++ b/website-cluster-centos/azuredeploy.json @@ -45,7 +45,7 @@ "6.7", "7.0", "7.1", - "7.2" + "7.2" ], "metadata": { "description": "The CentOS version for the VM. This will pick a fully patched image of this given CentOS version." @@ -64,36 +64,43 @@ "type": "string", "defaultValue": "", "metadata": { - "description": "The zabbix server IP which will monitor the nodes' status. Null means no zabbix server." - } - }, + "description": "The zabbix server IP which will monitor the nodes' status. Null means no zabbix server." + } + }, "_artifactsLocation": { "type": "string", "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." + "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." }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/website-cluster-centos/" }, "_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." + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." }, "defaultValue": "" }, "_artifactsChinaLocation": { "type": "string", "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." + "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." }, "defaultValue": "http://msmirrors.blob.core.chinacloudapi.cn/website-cluster-centos/" }, "_artifactsChinaLocationSasToken": { "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." + "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": { @@ -107,7 +114,7 @@ "templateBaseUrl": "[concat(parameters('_artifactsChinaLocation'), 'nested/')]", "templateBaseScriptsUrl": "[concat(parameters('_artifactsChinaLocation'), 'scripts/')]" }, - "environment": "[variables(concat('environment', parameters('environment')))]", + "environment": "[variables(concat('environment', parameters('environment')))]", "sharedTemplateUrl": "[concat(variables('environment').templateBaseUrl, 'shared-resources.json')]", "lbTemplateUrl": "[concat(variables('environment').templateBaseUrl, 'lb-resources.json')]", "webTemplateUrl": "[concat(variables('environment').templateBaseUrl, 'web-resources.json')]", @@ -128,7 +135,6 @@ "lbNodeVmSize": "Standard_A3", "webNodeVmSize": "Standard_A3", "dbNodeVmSize": "Standard_A3", - "apiVersion": "2015-01-01", "networkSettings": { "virtualNetworkName": "[variables('virtualNetworkName')]", "addressPrefix": "10.0.0.0/24", @@ -305,7 +311,7 @@ "value": "[variables('webNodeVmSize')]" }, "zabbixServerIPAddress": { - "value": "[parameters('zabbixServerIPAddress')]" + "value": "[parameters('zabbixServerIPAddress')]" }, "osSettings": { "value": "[variables('webOsSettings')]" @@ -361,7 +367,7 @@ "value": "[variables('dbNodeVmSize')]" }, "zabbixServerIPAddress": { - "value": "[parameters('zabbixServerIPAddress')]" + "value": "[parameters('zabbixServerIPAddress')]" }, "osSettings": { "value": "[variables('redisMasterOsSettings')]" @@ -418,7 +424,7 @@ "value": "[variables('dbNodeVmSize')]" }, "zabbixServerIPAddress": { - "value": "[parameters('zabbixServerIPAddress')]" + "value": "[parameters('zabbixServerIPAddress')]" }, "osSettings": { "value": "[variables('redisSlaveOsSettings')]" @@ -477,7 +483,7 @@ "value": "[variables('dbNodeVmSize')]" }, "zabbixServerIPAddress": { - "value": "[parameters('zabbixServerIPAddress')]" + "value": "[parameters('zabbixServerIPAddress')]" }, "osSettings": { "value": "[variables('mysqlMasterOsSettings')]" @@ -537,7 +543,7 @@ "value": "[variables('dbNodeVmSize')]" }, "zabbixServerIPAddress": { - "value": "[parameters('zabbixServerIPAddress')]" + "value": "[parameters('zabbixServerIPAddress')]" }, "osSettings": { "value": "[variables('mysqlSlaveOsSettings')]" @@ -598,7 +604,7 @@ "value": "[variables('lbNodeVmSize')]" }, "zabbixServerIPAddress": { - "value": "[parameters('zabbixServerIPAddress')]" + "value": "[parameters('zabbixServerIPAddress')]" }, "osSettings": { "value": "[variables('lbOsSettings')]" diff --git a/website-cluster-centos/nested/disksSelector.json b/website-cluster-centos/nested/disksSelector.json index 411c4aab757d..0b78badc4e93 100644 --- a/website-cluster-centos/nested/disksSelector.json +++ b/website-cluster-centos/nested/disksSelector.json @@ -52,6 +52,13 @@ "metadata": { "description": "Size of the data disks" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -934,4 +941,3 @@ } } } - diff --git a/website-cluster-centos/nested/lb-resources.json b/website-cluster-centos/nested/lb-resources.json index 0424b62b2770..501966a9ea84 100644 --- a/website-cluster-centos/nested/lb-resources.json +++ b/website-cluster-centos/nested/lb-resources.json @@ -43,12 +43,18 @@ }, "subnet": { "type": "object" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", "storageAccountName": "[concat(uniquestring(resourceGroup().id), parameters('vmbasename'))]", - "apiVersion": "2015-06-15", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, "resources": [ @@ -56,7 +62,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -65,7 +71,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -96,7 +102,7 @@ "direction": "Inbound" } }, - { + { "name": "zabbixAgent", "properties": { "description": "Allows zabbix monitoring", @@ -110,7 +116,7 @@ "direction": "Inbound" } }, - { + { "name": "zabbixAgent1", "properties": { "description": "Allows zabbix monitoring", @@ -131,7 +137,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'PublicIp')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { @@ -139,11 +145,11 @@ } } }, - { + { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', parameters('namespace'), parameters('vmbasename'), 'PublicIp')]" ], @@ -159,7 +165,7 @@ "subnet": { "id": "[variables('subnetRef')]" }, - "networkSecurityGroup": { + "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('securityGroupName'))]" } } @@ -171,7 +177,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" @@ -187,48 +193,48 @@ }, "storageProfile": { "imageReference": "[parameters('osSettings').imageReference]", - "dataDisks": [ - { - "name": "datadisk1", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 0, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk1.vhd')]" - }, - "createOption": "Empty", - "caching": "ReadWrite" - }, - { - "name": "datadisk2", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 1, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk2.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - }, - { - "name": "datadisk3", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 2, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk3.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - }, - { - "name": "datadisk4", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 3, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk4.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - } - ], + "dataDisks": [ + { + "name": "datadisk1", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 0, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk1.vhd')]" + }, + "createOption": "Empty", + "caching": "ReadWrite" + }, + { + "name": "datadisk2", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 1, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk2.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + }, + { + "name": "datadisk3", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 2, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk3.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + }, + { + "name": "datadisk4", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 3, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk4.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + } + ], "osDisk": { "name": "osdisk", "vhd": { @@ -251,7 +257,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/lbInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('namespace'), parameters('vmbasename'), 'vm')]", "[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]" @@ -263,8 +269,8 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": "[parameters('osSettings').scripts]" - }, - "protectedSettings": { + }, + "protectedSettings": { "commandToExecute": "[concat('bash lb.sh ', parameters('webNodeCount'), ' ', parameters('zabbixServerIPAddress'))]" } } diff --git a/website-cluster-centos/nested/mysqlMaster-resources.json b/website-cluster-centos/nested/mysqlMaster-resources.json index b45ef5bd839a..b45d00efade1 100644 --- a/website-cluster-centos/nested/mysqlMaster-resources.json +++ b/website-cluster-centos/nested/mysqlMaster-resources.json @@ -43,11 +43,17 @@ }, "zabbixServerIPAddress": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "apiVersion": "2015-06-15", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'mysqlmaster')]", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, @@ -56,7 +62,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -65,7 +71,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -96,7 +102,7 @@ "direction": "Inbound" } }, - { + { "name": "zabbixAgent", "properties": { "description": "Allows zabbix monitoring", @@ -110,7 +116,7 @@ "direction": "Inbound" } }, - { + { "name": "zabbixAgent1", "properties": { "description": "Allows zabbix monitoring", @@ -131,7 +137,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -153,7 +159,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]" @@ -169,48 +175,48 @@ }, "storageProfile": { "imageReference": "[parameters('osSettings').imageReference]", - "dataDisks": [ - { - "name": "datadisk1", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 0, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk1.vhd')]" - }, - "createOption": "Empty", - "caching": "ReadWrite" - }, - { - "name": "datadisk2", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 1, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk2.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - }, - { - "name": "datadisk3", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 2, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk3.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - }, - { - "name": "datadisk4", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 3, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk4.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - } - ], + "dataDisks": [ + { + "name": "datadisk1", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 0, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk1.vhd')]" + }, + "createOption": "Empty", + "caching": "ReadWrite" + }, + { + "name": "datadisk2", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 1, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk2.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + }, + { + "name": "datadisk3", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 2, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk3.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + }, + { + "name": "datadisk4", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 3, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk4.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + } + ], "osDisk": { "name": "osdisk", "vhd": { @@ -233,7 +239,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/mysqlMasterInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], @@ -244,8 +250,8 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": "[parameters('osSettings').scripts]" - }, - "protectedSettings": { + }, + "protectedSettings": { "commandToExecute": "[concat('bash mysqlMaster.sh ', parameters('mysqlPassword'), ' ', parameters('zabbixServerIPAddress'))]" } } diff --git a/website-cluster-centos/nested/mysqlSlave-resources.json b/website-cluster-centos/nested/mysqlSlave-resources.json index 4c058c1dccf2..76ff2b70440d 100644 --- a/website-cluster-centos/nested/mysqlSlave-resources.json +++ b/website-cluster-centos/nested/mysqlSlave-resources.json @@ -43,11 +43,17 @@ }, "zabbixServerIPAddress": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "apiVersion": "2015-06-15", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'mysqlslave')]", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, @@ -56,7 +62,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -65,7 +71,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -96,7 +102,7 @@ "direction": "Inbound" } }, - { + { "name": "zabbixAgent", "properties": { "description": "Allows zabbix monitoring", @@ -110,7 +116,7 @@ "direction": "Inbound" } }, - { + { "name": "zabbixAgent1", "properties": { "description": "Allows zabbix monitoring", @@ -131,7 +137,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -153,7 +159,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]" @@ -169,48 +175,48 @@ }, "storageProfile": { "imageReference": "[parameters('osSettings').imageReference]", - "dataDisks": [ - { - "name": "datadisk1", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 0, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk1.vhd')]" - }, - "createOption": "Empty", - "caching": "ReadWrite" - }, - { - "name": "datadisk2", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 1, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk2.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - }, - { - "name": "datadisk3", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 2, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk3.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - }, - { - "name": "datadisk4", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 3, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk4.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - } - ], + "dataDisks": [ + { + "name": "datadisk1", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 0, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk1.vhd')]" + }, + "createOption": "Empty", + "caching": "ReadWrite" + }, + { + "name": "datadisk2", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 1, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk2.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + }, + { + "name": "datadisk3", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 2, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk3.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + }, + { + "name": "datadisk4", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 3, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk4.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + } + ], "osDisk": { "name": "osdisk", "vhd": { @@ -233,7 +239,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/mysqlSlaveInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], @@ -244,8 +250,8 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": "[parameters('osSettings').scripts]" - }, - "protectedSettings": { + }, + "protectedSettings": { "commandToExecute": "[concat('bash mysqlSlave.sh ', parameters('mysqlPassword'), ' ', parameters('zabbixServerIPAddress'))]" } } diff --git a/website-cluster-centos/nested/redisMaster-resources.json b/website-cluster-centos/nested/redisMaster-resources.json index 9281f7937b75..04caa0bdab41 100644 --- a/website-cluster-centos/nested/redisMaster-resources.json +++ b/website-cluster-centos/nested/redisMaster-resources.json @@ -40,11 +40,17 @@ }, "zabbixServerIPAddress": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "apiVersion": "2015-06-15", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'redismaster')]", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, @@ -53,7 +59,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -62,7 +68,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -93,7 +99,7 @@ "direction": "Inbound" } }, - { + { "name": "zabbixAgent", "properties": { "description": "Allows zabbix monitoring", @@ -107,7 +113,7 @@ "direction": "Inbound" } }, - { + { "name": "zabbixAgent1", "properties": { "description": "Allows zabbix monitoring", @@ -128,7 +134,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -150,7 +156,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]" @@ -166,48 +172,48 @@ }, "storageProfile": { "imageReference": "[parameters('osSettings').imageReference]", - "dataDisks": [ - { - "name": "datadisk1", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 0, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk1.vhd')]" - }, - "createOption": "Empty", - "caching": "ReadWrite" - }, - { - "name": "datadisk2", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 1, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk2.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - }, - { - "name": "datadisk3", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 2, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk3.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - }, - { - "name": "datadisk4", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 3, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk4.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - } - ], + "dataDisks": [ + { + "name": "datadisk1", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 0, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk1.vhd')]" + }, + "createOption": "Empty", + "caching": "ReadWrite" + }, + { + "name": "datadisk2", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 1, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk2.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + }, + { + "name": "datadisk3", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 2, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk3.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + }, + { + "name": "datadisk4", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 3, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk4.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + } + ], "osDisk": { "name": "osdisk", "vhd": { @@ -230,7 +236,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/redisMasterInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], @@ -241,8 +247,8 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": "[parameters('osSettings').scripts]" - }, - "protectedSettings": { + }, + "protectedSettings": { "commandToExecute": "[concat('bash redisMaster.sh ', parameters('zabbixServerIPAddress'))]" } } diff --git a/website-cluster-centos/nested/redisSlave-resources.json b/website-cluster-centos/nested/redisSlave-resources.json index 2703f746a892..45e0d343f0a2 100644 --- a/website-cluster-centos/nested/redisSlave-resources.json +++ b/website-cluster-centos/nested/redisSlave-resources.json @@ -40,11 +40,17 @@ }, "zabbixServerIPAddress": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "apiVersion": "2015-06-15", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'redisslave')]", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, @@ -53,7 +59,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -62,7 +68,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -93,7 +99,7 @@ "direction": "Inbound" } }, - { + { "name": "zabbixAgent", "properties": { "description": "Allows zabbix monitoring", @@ -107,7 +113,7 @@ "direction": "Inbound" } }, - { + { "name": "zabbixAgent1", "properties": { "description": "Allows zabbix monitoring", @@ -128,7 +134,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -150,7 +156,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]" @@ -166,48 +172,48 @@ }, "storageProfile": { "imageReference": "[parameters('osSettings').imageReference]", - "dataDisks": [ - { - "name": "datadisk1", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 0, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk1.vhd')]" - }, - "createOption": "Empty", - "caching": "ReadWrite" - }, - { - "name": "datadisk2", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 1, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk2.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - }, - { - "name": "datadisk3", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 2, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk3.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - }, - { - "name": "datadisk4", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 3, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk4.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - } - ], + "dataDisks": [ + { + "name": "datadisk1", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 0, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk1.vhd')]" + }, + "createOption": "Empty", + "caching": "ReadWrite" + }, + { + "name": "datadisk2", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 1, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk2.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + }, + { + "name": "datadisk3", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 2, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk3.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + }, + { + "name": "datadisk4", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 3, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk4.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + } + ], "osDisk": { "name": "osdisk", "vhd": { @@ -230,7 +236,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/redisSlaveInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], @@ -241,8 +247,8 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": "[parameters('osSettings').scripts]" - }, - "protectedSettings": { + }, + "protectedSettings": { "commandToExecute": "[concat('bash redisSlave.sh ', parameters('zabbixServerIPAddress'))]" } } diff --git a/website-cluster-centos/nested/shared-resources.json b/website-cluster-centos/nested/shared-resources.json index ebc31c809615..fcc4d83dd53d 100644 --- a/website-cluster-centos/nested/shared-resources.json +++ b/website-cluster-centos/nested/shared-resources.json @@ -13,25 +13,29 @@ "metadata": { "Description": "namespace" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "apiVersion": "2015-06-15" - }, + "variables": {}, "resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/availabilitySets", "name": "[concat(parameters('namespace'), 'set')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('networkSettings').virtualNetworkName]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -67,4 +71,4 @@ } } ] -} \ No newline at end of file +} diff --git a/website-cluster-centos/nested/web-resources.json b/website-cluster-centos/nested/web-resources.json index 9a680c9682bc..ceeb83d0f3f7 100644 --- a/website-cluster-centos/nested/web-resources.json +++ b/website-cluster-centos/nested/web-resources.json @@ -43,11 +43,17 @@ }, "zabbixServerIPAddress": { "type": "string" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "subnetRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('subnet').vnet), '/subnets/', parameters('subnet').name)]", - "apiVersion": "2015-06-15", "storageAccountName": "[concat(uniquestring(resourceGroup().id), parameters('vmbasename'))]", "securityGroupName": "[concat(parameters('namespace'), parameters('vmbasename'), 'nsg')]" }, @@ -56,7 +62,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" } @@ -65,7 +71,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('securityGroupName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -96,7 +102,7 @@ "direction": "Inbound" } }, - { + { "name": "zabbixAgent", "properties": { "description": "Allows zabbix monitoring", @@ -110,7 +116,7 @@ "direction": "Inbound" } }, - { + { "name": "zabbixAgent1", "properties": { "description": "Allows zabbix monitoring", @@ -131,7 +137,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "ipConfigurations": [ { @@ -153,7 +159,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'nic')))]" @@ -169,48 +175,48 @@ }, "storageProfile": { "imageReference": "[parameters('osSettings').imageReference]", - "dataDisks": [ - { - "name": "datadisk1", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 0, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk1.vhd')]" - }, - "createOption": "Empty", - "caching": "ReadWrite" - }, - { - "name": "datadisk2", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 1, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk2.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - }, - { - "name": "datadisk3", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 2, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk3.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - }, - { - "name": "datadisk4", - "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", - "lun": 3, - "vhd": { - "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk4.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "Empty" - } - ], + "dataDisks": [ + { + "name": "datadisk1", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 0, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk1.vhd')]" + }, + "createOption": "Empty", + "caching": "ReadWrite" + }, + { + "name": "datadisk2", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 1, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk2.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + }, + { + "name": "datadisk3", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 2, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk3.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + }, + { + "name": "datadisk4", + "diskSizeGB": "[parameters('sizeOfDataDiskInGB')]", + "lun": 3, + "vhd": { + "uri": "[concat('http://', variables('storageAccountName'), parameters('serviceEndPoint'), 'datadisk4.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "Empty" + } + ], "osDisk": { "name": "osdisk", "vhd": { @@ -233,7 +239,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('namespace'), parameters('vmbasename'), 'vm', '/webInstall')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]" ], @@ -244,8 +250,8 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": "[parameters('osSettings').scripts]" - }, - "protectedSettings": { + }, + "protectedSettings": { "commandToExecute": "[concat('bash web.sh ', parameters('mysqlPassword'), ' ', parameters('adminUsername'), ' ', parameters('zabbixServerIPAddress'))]" } } diff --git a/windows-server-containers-preview/azuredeploy.json b/windows-server-containers-preview/azuredeploy.json index 39acab7db94e..3f4d46a159be 100644 --- a/windows-server-containers-preview/azuredeploy.json +++ b/windows-server-containers-preview/azuredeploy.json @@ -32,6 +32,13 @@ "metadata": { "description": "VM Size" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -59,7 +66,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSecurityGroupName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "securityRules": [ { @@ -111,7 +118,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "StorageAccount" }, @@ -123,7 +130,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "PublicIPAddress" }, @@ -138,7 +145,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" ], @@ -168,7 +175,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "NetworkInterface" }, @@ -197,7 +204,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[parameters('VMName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "tags": { "displayName": "VirtualMachine" }, @@ -242,7 +249,7 @@ { "name": "containerConfiguration", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('VMName'))]" @@ -266,4 +273,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/windows-vm-O365/azuredeploy.json b/windows-vm-O365/azuredeploy.json index 793230a5750c..9cb22b34bee5 100644 --- a/windows-vm-O365/azuredeploy.json +++ b/windows-vm-O365/azuredeploy.json @@ -2,7 +2,7 @@ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.1", "parameters": { - "storageType": { + "storageType": { "type": "string", "defaultValue": "Premium_LRS", "allowedValues": [ @@ -54,7 +54,7 @@ "dnsLabelPrefix": { "type": "string", "metadata": { - "description": "DNS Label for the Public IP. 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." + "description": "DNS Label for the Public IP. 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." } }, "officeVersion": { @@ -64,10 +64,10 @@ "Office2016", "Office2013" ], - "metadata": { + "metadata": { "description": "Which version of Office would you would like to deploy" } - }, + }, "setupOfficeScriptFileName": { "type": "string", "defaultValue": "DeployO365SilentWithVersion.ps1", @@ -80,186 +80,192 @@ "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/windows-vm-O365/scripts/", "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." - } + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - "storageName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", - "vnet01Prefix": "10.0.0.0/16", - "vnet01Subnet1Name": "Subnet-1", - "vnet01Subnet1Prefix": "10.0.0.0/24", - "vmImagePublisher": "MicrosoftVisualStudio", - "vmImageOffer": "Windows", - "vmOSDiskName": "VMOSDisk", - "vmVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'Vnet01')]", - "vmSubnetRef": "[concat(variables('VMVnetID'), '/subnets/', variables('Vnet01Subnet1Name'))]", - "vmStorageAccountContainerName": "vhds", - "vmNicName": "[concat(parameters('VMName'), 'NetworkInterface')]", - "vmIP01Name": "VMIP01" + "variables": { + "storageName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", + "vnet01Prefix": "10.0.0.0/16", + "vnet01Subnet1Name": "Subnet-1", + "vnet01Subnet1Prefix": "10.0.0.0/24", + "vmImagePublisher": "MicrosoftVisualStudio", + "vmImageOffer": "Windows", + "vmOSDiskName": "VMOSDisk", + "vmVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'Vnet01')]", + "vmSubnetRef": "[concat(variables('VMVnetID'), '/subnets/', variables('Vnet01Subnet1Name'))]", + "vmStorageAccountContainerName": "vhds", + "vmNicName": "[concat(parameters('VMName'), 'NetworkInterface')]", + "vmIP01Name": "VMIP01" + }, + "resources": [ + { + "name": "[variables('storageName')]", + "type": "Microsoft.Storage/storageAccounts", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [], + "tags": { + "displayName": "Storage01" + }, + "properties": { + "accountType": "[parameters('storageType')]" + } }, - "resources": [ - { - "name": "[variables('storageName')]", - "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ ], - "tags": { - "displayName": "Storage01" - }, - "properties": { - "accountType": "[parameters('storageType')]" - } + { + "name": "VNet01", + "type": "Microsoft.Network/virtualNetworks", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [], + "tags": { + "displayName": "VNet01" }, - { - "name": "VNet01", - "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ ], - "tags": { - "displayName": "VNet01" + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vnet01Prefix')]" + ] }, - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('vnet01Prefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('vnet01Subnet1Name')]", - "properties": { - "addressPrefix": "[variables('vnet01Subnet1Prefix')]" - } + "subnets": [ + { + "name": "[variables('vnet01Subnet1Name')]", + "properties": { + "addressPrefix": "[variables('vnet01Subnet1Prefix')]" } - ] - } + } + ] + } + }, + { + "name": "[variables('vmNicName')]", + "type": "Microsoft.Network/networkInterfaces", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', 'Vnet01')]", + "[concat('Microsoft.Network/publicIPAddresses/', variables('vmIP01Name'))]" + ], + "tags": { + "displayName": "VMNic01" }, - { - "name": "[variables('vmNicName')]", - "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', 'Vnet01')]", - "[concat('Microsoft.Network/publicIPAddresses/', variables('vmIP01Name'))]" - ], - "tags": { - "displayName": "VMNic01" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "subnet": { - "id": "[variables('vmSubnetRef')]" - }, - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmIP01Name'))]" - } + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[variables('vmSubnetRef')]" + }, + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmIP01Name'))]" } } - ] - } + } + ] + } + }, + { + "name": "[parameters('vmName')]", + "type": "Microsoft.Compute/virtualMachines", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('storageName'))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('vmNicName'))]" + ], + "tags": { + "displayName": "VM01" }, - { - "name": "[parameters('vmName')]", - "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('storageName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('vmNicName'))]" - ], - "tags": { - "displayName": "VM01" + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" }, - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" - }, - "osProfile": { - "computerName": "[parameters('vmName')]", - "adminUsername": "[parameters('vmAdminUsername')]", - "adminPassword": "[parameters('vmAdminPassword')]" + "osProfile": { + "computerName": "[parameters('vmName')]", + "adminUsername": "[parameters('vmAdminUsername')]", + "adminPassword": "[parameters('vmAdminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[variables('vmImagePublisher')]", + "offer": "[variables('vmImageOffer')]", + "sku": "[parameters('vmOSVersion')]", + "version": "latest" }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('vmImagePublisher')]", - "offer": "[variables('vmImageOffer')]", - "sku": "[parameters('vmOSVersion')]", - "version": "latest" + "osDisk": { + "name": "VMOSDisk", + "vhd": { + "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/', variables('vmOSDiskName'), '.vhd')]" }, - "osDisk": { - "name": "VMOSDisk", - "vhd": { - "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/', variables('vmOSDiskName'), '.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" - } - ] + "caching": "ReadWrite", + "createOption": "FromImage" } }, - "resources": [ - { - "name": "SetupOffice", - "type": "extensions", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" - ], - "tags": { - "displayName": "SetupOffice" - }, - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScriptExtension", - "typeHandlerVersion": "2.0", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": [ - "[concat(parameters('_artifactsLocation'), parameters('setupOfficeScriptFileName'))]", - "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/DefaultConfiguration.xml", - "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2013Setup.exe", - "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2016Setup.exe", - "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Edit-OfficeConfigurationFile.ps1", - "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Generate-ODTConfigurationXML.ps1", - "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Install-OfficeClickToRun.ps1" - ], - "commandToExecute": "[concat('powershell -ExecutionPolicy bypass -File ', parameters('setupOfficeScriptFileName'),' -OfficeVersion ', parameters('officeVersion'))]" - } + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" } - } - ] + ] + } }, - { - "name": "[variables('vmIP01Name')]", - "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", - "apiVersion": "2015-06-15", - "dependsOn": [ ], - "tags": { - "displayName": "VMIP01" - }, - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[parameters('dnsLabelPrefix')]" + "resources": [ + { + "name": "SetupOffice", + "type": "extensions", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" + ], + "tags": { + "displayName": "SetupOffice" + }, + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScriptExtension", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat(parameters('_artifactsLocation'), parameters('setupOfficeScriptFileName'))]", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/DefaultConfiguration.xml", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2013Setup.exe", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2016Setup.exe", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Edit-OfficeConfigurationFile.ps1", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Generate-ODTConfigurationXML.ps1", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Install-OfficeClickToRun.ps1" + ], + "commandToExecute": "[concat('powershell -ExecutionPolicy bypass -File ', parameters('setupOfficeScriptFileName'),' -OfficeVersion ', parameters('officeVersion'))]" + } } } + ] + }, + { + "name": "[variables('vmIP01Name')]", + "type": "Microsoft.Network/publicIPAddresses", + "location": "[parameters('location')]", + "apiVersion": "2015-06-15", + "dependsOn": [], + "tags": { + "displayName": "VMIP01" + }, + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[parameters('dnsLabelPrefix')]" + } } - ], - "outputs": { } - } - + } + ], + "outputs": {} +} diff --git a/wordpress-app-service-mysql-inapp/azuredeploy.json b/wordpress-app-service-mysql-inapp/azuredeploy.json index 13f3894ac4dd..4ee9179770b5 100644 --- a/wordpress-app-service-mysql-inapp/azuredeploy.json +++ b/wordpress-app-service-mysql-inapp/azuredeploy.json @@ -1,109 +1,116 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "sku": { - "type": "string", - "metadata": { - "description": "wordpress site name" + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "sku": { + "type": "string", + "metadata": { + "description": "wordpress site name" + }, + "allowedValues": [ + "F1", + "B1", + "S1" + ], + "defaultValue": "F1" + }, + "repoUrl": { + "type": "string", + "metadata": { + "description": "GitHub repo to deploy to App Service" + }, + "defaultValue": "https://github.com/azureappserviceoss/wordpress-azure" + }, + "branch": { + "type": "string", + "metadata": { + "description": "GitHub repo branch to deploy to App Service" + }, + "defaultValue": "master" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "hostingPlanName": "[concat(uniquestring(resourceGroup().id),'hostingplan')]", + "siteName": "[concat(uniquestring(resourceGroup().id),'website')]" + }, + "resources": [ + { + "type": "Microsoft.Web/serverfarms", + "sku": { + "name": "[parameters('sku')]", + "capacity": 1 + }, + "name": "[variables('hostingPlanName')]", + "apiVersion": "2016-09-01", + "location": "[parameters('location')]", + "properties": {} + }, + { + "type": "Microsoft.Web/sites", + "name": "[variables('siteName')]", + "apiVersion": "2016-08-01", + "location": "[parameters('location')]", + "properties": { + "name": "[variables('siteName')]", + "serverFarmId": "[variables('hostingPlanName')]", + "siteConfig": { + "localMySqlEnabled": true, + "appSettings": [ + { + "name": "WEBSITE_MYSQL_ENABLED", + "value": "1" }, - "allowedValues": [ - "F1", - "B1", - "S1" - ], - "defaultValue": "F1" - }, - "repoUrl": { - "type": "string", - "metadata": { - "description": "GitHub repo to deploy to App Service" + { + "name": "WEBSITE_MYSQL_GENERAL_LOG", + "value": "0" }, - "defaultValue": "https://github.com/azureappserviceoss/wordpress-azure" - }, - "branch": { - "type": "string", - "metadata": { - "description": "GitHub repo branch to deploy to App Service" + { + "name": "WEBSITE_MYSQL_SLOW_QUERY_LOG", + "value": "0" }, - "defaultValue": "master" + { + "name": "WEBSITE_MYSQL_ARGUMENTS", + "value": "--max_allowed_packet=16M" + } + ] } - }, - "variables": { - "hostingPlanName":"[concat(uniquestring(resourceGroup().id),'hostingplan')]", - "siteName":"[concat(uniquestring(resourceGroup().id),'website')]" - }, - "resources": [ + }, + "resources": [ { - "type": "Microsoft.Web/serverfarms", - "sku": { - "name": "[parameters('sku')]", - "capacity": 1 - }, - "name": "[variables('hostingPlanName')]", - "apiVersion": "2016-09-01", - "location": "[resourceGroup().location]", - "properties": {} + "type": "sourcecontrols", + "name": "web", + "apiVersion": "2016-08-01", + "properties": { + "RepoUrl": "[parameters('repoUrl')]", + "branch": "[parameters('branch')]", + "IsManualIntegration": true + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/Sites', variables('siteName'))]" + ] }, { - "type": "Microsoft.Web/sites", - "name": "[variables('siteName')]", - "apiVersion": "2016-08-01", - "location": "[resourceGroup().location]", - "properties": { - "name": "[variables('siteName')]", - "serverFarmId": "[variables('hostingPlanName')]", - "siteConfig": { - "localMySqlEnabled": true, - "appSettings": [ - { - "name": "WEBSITE_MYSQL_ENABLED", - "value": "1" - }, - { - "name": "WEBSITE_MYSQL_GENERAL_LOG", - "value": "0" - }, - { - "name": "WEBSITE_MYSQL_SLOW_QUERY_LOG", - "value": "0" - }, - { - "name": "WEBSITE_MYSQL_ARGUMENTS", - "value": "--max_allowed_packet=16M" - } - ] - } - }, - "resources": [ - { - "type": "sourcecontrols", - "name": "web", - "apiVersion": "2016-08-01", - "properties": { - "RepoUrl": "[parameters('repoUrl')]", - "branch": "[parameters('branch')]", - "IsManualIntegration": true - }, - "dependsOn": [ - "[resourceId('Microsoft.Web/Sites', variables('siteName'))]" - ] - }, - { - "type": "config", - "name": "web", - "apiVersion": "2016-08-01", - "properties": { - "phpVersion": "7.0" - }, - "dependsOn": [ - "[concat('Microsoft.Web/sites/', variables('siteName'))]" - ] - } - ], - "dependsOn": [ - "[concat('Microsoft.Web/serverFarms/', variables('hostingPlanName'))]" - ] + "type": "config", + "name": "web", + "apiVersion": "2016-08-01", + "properties": { + "phpVersion": "7.0" + }, + "dependsOn": [ + "[concat('Microsoft.Web/sites/', variables('siteName'))]" + ] } - ] -} \ No newline at end of file + ], + "dependsOn": [ + "[concat('Microsoft.Web/serverFarms/', variables('hostingPlanName'))]" + ] + } + ] +} diff --git a/wordpress-mysql-replication/nested/mysql-replication.json b/wordpress-mysql-replication/nested/mysql-replication.json index 10d57c03d16d..cd81d188ff90 100644 --- a/wordpress-mysql-replication/nested/mysql-replication.json +++ b/wordpress-mysql-replication/nested/mysql-replication.json @@ -204,6 +204,13 @@ "metadata": { "description": "storage account name" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -216,8 +223,6 @@ "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbName'))]", "ilbBackendAddressPoolName": "[concat(parameters('dnsName'), '-ilbBackendPool')]", "ilbBackendAddressPoolID": "[concat(variables('lbID'),'/backendAddressPools/', variables('ilbBackendAddressPoolName'))]", - "ilbRuleName": "[concat(parameters('dnsName'), '-ilbRule')]", - "ilbRuleID": "[concat(variables('lbID'),'/loadBalancingRules/',variables('ilbRuleName'))]", "sshIPConfigName": "[concat(parameters('dnsName'), '-sshIPCfg')]", "sshIPConfig": "[concat(variables('lbID'),'/frontendIPConfigurations/',variables('sshIPConfigName'))]", "nicName": "[concat(parameters('dnsName'), '-nic')]", @@ -266,7 +271,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageAccountName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -275,7 +280,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('lbPublicIPName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Static", "dnsSettings": { @@ -287,14 +292,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": {} }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "nicLoop", "count": "[variables('nodeCount')]" @@ -338,7 +343,7 @@ "name": "[concat(parameters('dnsName'), copyIndex())]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "vmLoop", "count": "[variables('nodeCount')]" @@ -409,7 +414,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('dnsName'), copyIndex(), '/setupMySQL')]", "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "extLoop", "count": "[variables('nodeCount')]" @@ -436,7 +441,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/loadBalancers", "name": "[variables('lbName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('lbPublicIPName'))]" ], @@ -543,4 +548,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/wordpress-mysql-replication/nested/vnet-existing.json b/wordpress-mysql-replication/nested/vnet-existing.json index ffa9bbf48e45..596674d31055 100644 --- a/wordpress-mysql-replication/nested/vnet-existing.json +++ b/wordpress-mysql-replication/nested/vnet-existing.json @@ -1,32 +1,39 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "virtualNetworkName": { - "type": "string" - }, - "virtualNetworkAddressPrefix": { - "type": "string" - }, - "dbSubnetName": { - "type": "string" - }, - "dbSubnetAddressPrefix": { - "type": "string" - }, - "vnetExistingResourceGroupName": { - "type": "string", - "defaultValue": "" - } + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "virtualNetworkName": { + "type": "string" }, - "variables": { - "vnetID": "[resourceId(parameters('vnetExistingResourceGroupName'),concat('Microsoft.Network','/','virtualNetworks'),parameters('virtualNetworkName'))]" + "virtualNetworkAddressPrefix": { + "type": "string" }, - "resources": [ ], - "outputs": { - "dbSubnetRef": { - "value": "[concat(variables('vnetID'), '/subnets/', parameters('dbSubnetName'))]", - "type": "string" - } + "dbSubnetName": { + "type": "string" + }, + "dbSubnetAddressPrefix": { + "type": "string" + }, + "vnetExistingResourceGroupName": { + "type": "string", + "defaultValue": "" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "vnetID": "[resourceId(parameters('vnetExistingResourceGroupName'),concat('Microsoft.Network','/','virtualNetworks'),parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "dbSubnetRef": { + "value": "[concat(variables('vnetID'), '/subnets/', parameters('dbSubnetName'))]", + "type": "string" } + } } diff --git a/wordpress-mysql-replication/nested/vnet-new.json b/wordpress-mysql-replication/nested/vnet-new.json index 08557bd09bba..8cb109058cde 100644 --- a/wordpress-mysql-replication/nested/vnet-new.json +++ b/wordpress-mysql-replication/nested/vnet-new.json @@ -17,6 +17,13 @@ "vnetExistingResourceGroupName": { "type": "string", "defaultValue": "" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -28,7 +35,7 @@ "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ diff --git a/wordpress-mysql-replication/nested/website.json b/wordpress-mysql-replication/nested/website.json index bba5fb788f69..05ec42296403 100644 --- a/wordpress-mysql-replication/nested/website.json +++ b/wordpress-mysql-replication/nested/website.json @@ -1,123 +1,130 @@ -{ - "$schema":"http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{ - "siteName":{ - "type":"string" - }, - "hostingPlanName":{ - "type":"string" - }, - "sku":{ - "type":"string", - "allowedValues":[ - "Free", - "Shared", - "Basic", - "Standard", - "Premium" - ], - "defaultValue":"Free" - }, - "workerSize":{ - "type":"string", - "allowedValues":[ - "0", - "1", - "2" - ], - "defaultValue":"0" - }, - "dbServer":{ - "type":"string" - }, - "dbName":{ - "type":"string" - }, - "dbAdminPassword":{ - "type":"securestring" +{ + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "siteName": { + "type": "string" + }, + "hostingPlanName": { + "type": "string" + }, + "sku": { + "type": "string", + "allowedValues": [ + "Free", + "Shared", + "Basic", + "Standard", + "Premium" + ], + "defaultValue": "Free" + }, + "workerSize": { + "type": "string", + "allowedValues": [ + "0", + "1", + "2" + ], + "defaultValue": "0" + }, + "dbServer": { + "type": "string" + }, + "dbName": { + "type": "string" + }, + "dbAdminPassword": { + "type": "securestring" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." } - }, - "variables":{ - "connectionString":"[concat('Database=', parameters('dbName'), ';Data Source=', parameters('dbServer'), ';User Id=admin;Password=', parameters('dbAdminPassword'))]", - "repoUrl":"https://github.com/azureappserviceoss/wordpress-azure", - "branch":"master", - "workerSize":"[parameters('workerSize')]", - "sku":"[parameters('sku')]", - "hostingPlanName":"[parameters('hostingPlanName')]" - }, - "resources":[ - { - "apiVersion":"2014-06-01", - "name":"[variables('hostingPlanName')]", - "type":"Microsoft.Web/serverfarms", - "location":"[resourceGroup().location]", - "properties":{ - "name":"[variables('hostingPlanName')]", - "sku":"[variables('sku')]", - "workerSize":"[variables('workerSize')]", - "hostingEnvironment":"", - "numberOfWorkers":0 - } + } + }, + "variables": { + "connectionString": "[concat('Database=', parameters('dbName'), ';Data Source=', parameters('dbServer'), ';User Id=admin;Password=', parameters('dbAdminPassword'))]", + "repoUrl": "https://github.com/azureappserviceoss/wordpress-azure", + "branch": "master", + "workerSize": "[parameters('workerSize')]", + "sku": "[parameters('sku')]", + "hostingPlanName": "[parameters('hostingPlanName')]" + }, + "resources": [ + { + "apiVersion": "2014-06-01", + "name": "[variables('hostingPlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('location')]", + "properties": { + "name": "[variables('hostingPlanName')]", + "sku": "[variables('sku')]", + "workerSize": "[variables('workerSize')]", + "hostingEnvironment": "", + "numberOfWorkers": 0 + } + }, + { + "apiVersion": "2016-08-01", + "name": "[parameters('siteName')]", + "type": "Microsoft.Web/sites", + "location": "[parameters('location')]", + "tags": { + "[concat('hidden-related:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('hostingPlanName'))]": "empty" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]" + ], + "properties": { + "name": "[parameters('siteName')]", + "serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('hostingPlanName'))]", + "hostingEnvironment": "" }, - { - "apiVersion":"2016-08-01", - "name":"[parameters('siteName')]", - "type":"Microsoft.Web/sites", - "location":"[resourceGroup().location]", - "tags":{ - "[concat('hidden-related:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('hostingPlanName'))]":"empty" - }, - "dependsOn":[ - "[concat('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]" - ], - "properties":{ - "name":"[parameters('siteName')]", - "serverFarmId":"[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('hostingPlanName'))]", - "hostingEnvironment":"" - }, - "resources":[ - { - "apiVersion":"2016-08-01", - "name":"connectionstrings", - "type":"config", - "dependsOn":[ - "[concat('Microsoft.Web/Sites/', parameters('siteName'))]" - ], - "properties":{ - "defaultConnection":{ - "value":"[variables('connectionString')]", - "type":"MySql" - } - } - }, - { - "apiVersion":"2016-08-01", - "name":"web", - "type":"config", - "dependsOn":[ - "[concat('Microsoft.Web/Sites/', parameters('siteName'))]" - ], - "properties":{ - "phpVersion":"5.6" - } - }, - { - "apiVersion":"2016-08-01", - "name":"web", - "type":"sourcecontrols", - "dependsOn":[ - "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]", - "[concat('Microsoft.Web/Sites/', parameters('siteName'), '/config/connectionstrings')]", - "[concat('Microsoft.Web/Sites/', parameters('siteName'), '/config/web')]" - ], - "properties":{ - "RepoUrl":"[variables('repoUrl')]", - "branch":"[variables('branch')]", - "IsManualIntegration":true - } + "resources": [ + { + "apiVersion": "2016-08-01", + "name": "connectionstrings", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', parameters('siteName'))]" + ], + "properties": { + "defaultConnection": { + "value": "[variables('connectionString')]", + "type": "MySql" } - ] - } - ] -} \ No newline at end of file + } + }, + { + "apiVersion": "2016-08-01", + "name": "web", + "type": "config", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', parameters('siteName'))]" + ], + "properties": { + "phpVersion": "5.6" + } + }, + { + "apiVersion": "2016-08-01", + "name": "web", + "type": "sourcecontrols", + "dependsOn": [ + "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]", + "[concat('Microsoft.Web/Sites/', parameters('siteName'), '/config/connectionstrings')]", + "[concat('Microsoft.Web/Sites/', parameters('siteName'), '/config/web')]" + ], + "properties": { + "RepoUrl": "[variables('repoUrl')]", + "branch": "[variables('branch')]", + "IsManualIntegration": true + } + } + ] + } + ] +} diff --git a/wordpress-single-vm-ubuntu/azuredeploy.json b/wordpress-single-vm-ubuntu/azuredeploy.json index d2bc196edc2b..4ba396d120a3 100644 --- a/wordpress-single-vm-ubuntu/azuredeploy.json +++ b/wordpress-single-vm-ubuntu/azuredeploy.json @@ -37,6 +37,13 @@ "metadata": { "description": "Size of VM" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -62,7 +69,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('newStorageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -71,7 +78,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]", "dnsSettings": { @@ -83,7 +90,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -104,7 +111,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" @@ -130,7 +137,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" @@ -173,7 +180,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('vmName'),'/newuserscript')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], diff --git a/xtremedata-dbx-cluster-centos/azuredeploy.json b/xtremedata-dbx-cluster-centos/azuredeploy.json index d7a5cc1296e0..9060f9329d85 100644 --- a/xtremedata-dbx-cluster-centos/azuredeploy.json +++ b/xtremedata-dbx-cluster-centos/azuredeploy.json @@ -44,6 +44,13 @@ "metadata": { "description": "Number of nodes for dbX cluster" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -102,7 +109,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[variables('storageAccountType')]" } @@ -111,7 +118,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetSettings').name]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "platformFaultDomainCount": "[variables('availabilitySetSettings').faultDomainCount]", "platformUpdateDomainCount": "[variables('availabilitySetSettings').updateDomainCount]" @@ -121,7 +128,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('vnetName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -142,7 +149,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat('imghlpr', variables('suffix'))]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "publicIPAllocationMethod": "Dynamic", "idleTimeoutInMinutes": 4, @@ -155,7 +162,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "nic-imghlpr", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('vnetName'))]", "[concat('Microsoft.Network/publicIPAddresses/', 'imghlpr', variables('suffix'))]" @@ -182,7 +189,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('hostName'),'-imghlpr')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', 'nic-imghlpr')]" @@ -223,7 +230,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('hostName'),'-imghlpr', '/imghlpr')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('hostName'),'-imghlpr')]" ], @@ -244,7 +251,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat('dbx-ip', variables('suffix'), copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "pIPAddrLoop", "count": "[parameters('vmCount')]" @@ -261,7 +268,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat('nic', copyindex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('vnetName'))]", "[concat('Microsoft.Network/publicIPAddresses/', 'dbx-ip', variables('suffix'), copyindex())]" @@ -292,7 +299,7 @@ "type": "Microsoft.Compute/virtualMachines", "name": "[concat(variables('hostName'),'-',copyindex())]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", "[concat('Microsoft.Network/networkInterfaces/', 'nic', copyindex())]", @@ -419,7 +426,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(variables('hostName'),'-',copyindex(), '/dbx-setup')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', variables('hostName'),'-',copyindex())]" ], diff --git a/zabbix-monitoring-cluster/azuredeploy.json b/zabbix-monitoring-cluster/azuredeploy.json index 883f2d6442f6..20612501c4eb 100644 --- a/zabbix-monitoring-cluster/azuredeploy.json +++ b/zabbix-monitoring-cluster/azuredeploy.json @@ -65,7 +65,8 @@ "description": "MySql Server type. 'Localhost' for creating a new MySQL instance on the monitor VM, 'existing' for using an existing host." }, "allowedValues": [ - "Existing", "Localhost" + "Existing", + "Localhost" ], "defaultValue": "Localhost" }, @@ -102,6 +103,13 @@ "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." }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/zabbix-monitoring-cluster" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { diff --git a/zabbix-monitoring-cluster/nested/clusterNodes.json b/zabbix-monitoring-cluster/nested/clusterNodes.json index 0dacb8d88b30..0ef0308f7f31 100644 --- a/zabbix-monitoring-cluster/nested/clusterNodes.json +++ b/zabbix-monitoring-cluster/nested/clusterNodes.json @@ -28,11 +28,18 @@ }, "defaultValue": 2, "maxValue": 20 + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { "prefix": "[parameters('resourcePrefix')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "imageReferences": [ { "publisher": "Canonical", diff --git a/zabbix-monitoring-cluster/nested/monitoringAgentByIps.json b/zabbix-monitoring-cluster/nested/monitoringAgentByIps.json index 0d21e3388b3c..11a7df494b6a 100644 --- a/zabbix-monitoring-cluster/nested/monitoringAgentByIps.json +++ b/zabbix-monitoring-cluster/nested/monitoringAgentByIps.json @@ -20,6 +20,13 @@ "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." }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/zabbix-monitoring-cluster" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -58,4 +65,4 @@ } } ] -} \ No newline at end of file +} diff --git a/zabbix-monitoring-cluster/nested/monitoringAgentByVms.json b/zabbix-monitoring-cluster/nested/monitoringAgentByVms.json index cccb5e2b0fd8..3c380742c3fa 100644 --- a/zabbix-monitoring-cluster/nested/monitoringAgentByVms.json +++ b/zabbix-monitoring-cluster/nested/monitoringAgentByVms.json @@ -20,10 +20,17 @@ "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." }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/zabbix-monitoring-cluster" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]" + "location": "[parameters('location')]" }, "resources": [ { diff --git a/zabbix-monitoring-cluster/nested/monitoringAgentByVnet.json b/zabbix-monitoring-cluster/nested/monitoringAgentByVnet.json index f34ce5f4ff20..10232babbfd1 100644 --- a/zabbix-monitoring-cluster/nested/monitoringAgentByVnet.json +++ b/zabbix-monitoring-cluster/nested/monitoringAgentByVnet.json @@ -27,12 +27,16 @@ "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." }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/zabbix-monitoring-cluster" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, - "variables": { - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('existingVirtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',parameters('existingSubnetName'))]" - }, + "variables": {}, "resources": [ { "apiVersion": "2015-01-01", @@ -58,4 +62,4 @@ } } ] -} \ No newline at end of file +} diff --git a/zabbix-monitoring-cluster/nested/monitoringServer.json b/zabbix-monitoring-cluster/nested/monitoringServer.json index 3dc21eafa2b0..1af0e45616cc 100644 --- a/zabbix-monitoring-cluster/nested/monitoringServer.json +++ b/zabbix-monitoring-cluster/nested/monitoringServer.json @@ -120,10 +120,17 @@ "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." }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/zabbix-monitoring-cluster" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "imageReference": "[parameters('vmImageReference')]", "OSDiskName": "[concat(parameters('vmName'),'disk')]", "nicName": "[concat(parameters('vmName'),'nic')]", @@ -249,4 +256,4 @@ "value": "[reference(variables('nicName')).ipConfigurations[0].properties.privateIPAddress]" } } -} \ No newline at end of file +} diff --git a/zabbix-monitoring-cluster/nested/monitoringServerDbExisting.json b/zabbix-monitoring-cluster/nested/monitoringServerDbExisting.json index dc428ca776b8..d4d70dbdeba5 100644 --- a/zabbix-monitoring-cluster/nested/monitoringServerDbExisting.json +++ b/zabbix-monitoring-cluster/nested/monitoringServerDbExisting.json @@ -14,6 +14,13 @@ "description": "Not used, leave it here to keep a uniform interface." }, "defaultValue": "zabbixuser" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [], diff --git a/zabbix-monitoring-cluster/nested/monitoringServerDbLocalhost.json b/zabbix-monitoring-cluster/nested/monitoringServerDbLocalhost.json index 34c8bf624cfd..5b810c94c36b 100644 --- a/zabbix-monitoring-cluster/nested/monitoringServerDbLocalhost.json +++ b/zabbix-monitoring-cluster/nested/monitoringServerDbLocalhost.json @@ -14,6 +14,13 @@ "description": "Not used, leave it here to keep a uniform interface." }, "defaultValue": "zabbixuser" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [], diff --git a/zabbix-monitoring-cluster/nested/monitoringServerDistroCentOS.json b/zabbix-monitoring-cluster/nested/monitoringServerDistroCentOS.json index 047db20e9915..532746cb7aec 100644 --- a/zabbix-monitoring-cluster/nested/monitoringServerDistroCentOS.json +++ b/zabbix-monitoring-cluster/nested/monitoringServerDistroCentOS.json @@ -1,7 +1,15 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": {}, + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, "resources": [], "outputs": { "imageReference": { diff --git a/zabbix-monitoring-cluster/nested/monitoringServerDistroUbuntu.json b/zabbix-monitoring-cluster/nested/monitoringServerDistroUbuntu.json index 8bdf881442b6..e92d3f74b33d 100644 --- a/zabbix-monitoring-cluster/nested/monitoringServerDistroUbuntu.json +++ b/zabbix-monitoring-cluster/nested/monitoringServerDistroUbuntu.json @@ -1,7 +1,15 @@ { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "parameters": {}, + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, "resources": [], "outputs": { "imageReference": { diff --git a/zabbix-monitoring-cluster/nested/monitoringSolution.json b/zabbix-monitoring-cluster/nested/monitoringSolution.json index ad44a72e64f4..1c6e008d0478 100644 --- a/zabbix-monitoring-cluster/nested/monitoringSolution.json +++ b/zabbix-monitoring-cluster/nested/monitoringSolution.json @@ -57,7 +57,8 @@ "description": "MySql Server type. 'Localhost' for creating a new MySQL instance on the monitor VM, 'existing' for using an existing host." }, "allowedValues": [ - "Existing", "Localhost" + "Existing", + "Localhost" ], "defaultValue": "Localhost" }, @@ -122,6 +123,13 @@ "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." }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/zabbix-monitoring-cluster" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "resources": [ @@ -258,4 +266,4 @@ "value": "[reference('configMonitoringServerVM').outputs.serverPublicEndpoint.value]" } } -} \ No newline at end of file +} diff --git a/zookeeper-cluster-ubuntu-vm/azuredeploy.json b/zookeeper-cluster-ubuntu-vm/azuredeploy.json index 7dd631cdf9ba..709bebf31ca7 100644 --- a/zookeeper-cluster-ubuntu-vm/azuredeploy.json +++ b/zookeeper-cluster-ubuntu-vm/azuredeploy.json @@ -61,6 +61,13 @@ "metadata": { "description": "Number of Zookeeper nodes to provision" } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } } }, "variables": { @@ -83,7 +90,7 @@ "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "accountType": "[parameters('storageAccountType')]" } @@ -92,14 +99,14 @@ "type": "Microsoft.Compute/availabilitySets", "name": "[variables('availabilitySetName')]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", - "properties": { } + "location": "[parameters('location')]", + "properties": {} }, { "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/publicIPAddresses", "name": "[concat('publicIP', copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "foo", "count": "[parameters('scaleNumber')]" @@ -112,7 +119,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -133,7 +140,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkInterfaces", "name": "[concat(variables('nicName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "foo", "count": "[parameters('scaleNumber')]" @@ -164,7 +171,7 @@ "apiVersion": "2015-05-01-preview", "type": "Microsoft.Compute/virtualMachines", "name": "[concat(parameters('vmName'), copyIndex())]", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "foo", "count": "[parameters('scaleNumber')]" @@ -215,7 +222,7 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('vmName'), copyIndex(),'/', variables('vmExtensionName'))]", "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "copy": { "name": "foo", "count": "[parameters('scaleNumber')]"