|
| 1 | +{ |
| 2 | + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", |
| 3 | + "contentVersion": "1.0.0.0", |
| 4 | + "parameters": { |
| 5 | + "vmName": { |
| 6 | + "type": "string", |
| 7 | + "metadata": { |
| 8 | + "description": "The name of Nexus virtual machine" |
| 9 | + } |
| 10 | + }, |
| 11 | + "location": { |
| 12 | + "type": "string", |
| 13 | + "metadata": { |
| 14 | + "description": "The Azure region where the VM is to be deployed" |
| 15 | + }, |
| 16 | + "defaultValue": "[resourceGroup().location]" |
| 17 | + }, |
| 18 | + "extendedLocation": { |
| 19 | + "type": "string", |
| 20 | + "metadata": { |
| 21 | + "description": "The custom location of the Nexus instance" |
| 22 | + } |
| 23 | + }, |
| 24 | + "tags": { |
| 25 | + "type": "object", |
| 26 | + "metadata": { |
| 27 | + "description": "The metadata tags to be associated with the cluster resource" |
| 28 | + }, |
| 29 | + "defaultValue": {} |
| 30 | + }, |
| 31 | + "adminUsername": { |
| 32 | + "type": "string", |
| 33 | + "defaultValue": "azureuser", |
| 34 | + "maxLength": 32, |
| 35 | + "minLength": 1, |
| 36 | + "metadata": { |
| 37 | + "description": "The name of the administrator to which the ssh public keys will be added into the authorized keys." |
| 38 | + } |
| 39 | + }, |
| 40 | + "bootMethod": { |
| 41 | + "type": "string", |
| 42 | + "defaultValue": "UEFI", |
| 43 | + "allowedValues": ["UEFI", "BIOS"], |
| 44 | + "metadata": { |
| 45 | + "description": "Selects the boot method for the virtual machine." |
| 46 | + } |
| 47 | + }, |
| 48 | + "cloudServicesNetworkId": { |
| 49 | + "type": "string", |
| 50 | + "metadata": { |
| 51 | + "description": "The Cloud Services Network attachment ARM ID to attach to virtual machine." |
| 52 | + } |
| 53 | + }, |
| 54 | + "cpuCores": { |
| 55 | + "type": "int", |
| 56 | + "defaultValue": 2, |
| 57 | + "metadata": { |
| 58 | + "description": "Number of CPU cores for the virtual machine. Choose a value between 2 and 46." |
| 59 | + } |
| 60 | + }, |
| 61 | + "memorySizeGB": { |
| 62 | + "type": "int", |
| 63 | + "defaultValue": 4, |
| 64 | + "metadata": { |
| 65 | + "description": "The memory size of the virtual machine in GB (max 224 GB)" |
| 66 | + } |
| 67 | + }, |
| 68 | + "networkAttachments": { |
| 69 | + "type": "array", |
| 70 | + "metadata": { |
| 71 | + "description": "The list of network attachments to the virtual machine." |
| 72 | + } |
| 73 | + /* |
| 74 | + { |
| 75 | + "attachedNetworkId": "string", |
| 76 | + "defaultGateway": "True"/"False", |
| 77 | + "ipAllocationMethod": "Dynamic"/"Static"/"Disabled", |
| 78 | + "ipv4Address": "string", |
| 79 | + "ipv6Address": "string", |
| 80 | + "networkAttachmentName": "string" |
| 81 | + } |
| 82 | + */ |
| 83 | + }, |
| 84 | + "networkData": { |
| 85 | + "type": "string", |
| 86 | + "metadata": { |
| 87 | + "description": "The Base64 encoded cloud-init network data." |
| 88 | + }, |
| 89 | + "defaultValue": "" |
| 90 | + }, |
| 91 | + "placementHints": { |
| 92 | + "type": "array", |
| 93 | + "metadata": { |
| 94 | + "description": "The placement hints for the virtual machine." |
| 95 | + }, |
| 96 | + "defaultValue": [] |
| 97 | + /* |
| 98 | + { |
| 99 | + "hintType": "Affinity", |
| 100 | + "resourceId": "string", |
| 101 | + "schedulingExecution": "Hard", |
| 102 | + "scope": "Rack" |
| 103 | + } |
| 104 | + */ |
| 105 | + }, |
| 106 | + "sshPublicKeys": { |
| 107 | + "type": "array", |
| 108 | + "metadata": { |
| 109 | + "description": "The list of SSH public keys for the virtual machine." |
| 110 | + } |
| 111 | + /* |
| 112 | + { |
| 113 | + "keyData": "string" |
| 114 | + } |
| 115 | + */ |
| 116 | + }, |
| 117 | + "storageProfile": { |
| 118 | + "type": "object", |
| 119 | + "metadata": { |
| 120 | + "description": "StorageProfile represents information about a disk." |
| 121 | + }, |
| 122 | + "defaultValue": { |
| 123 | + "osDisk": { |
| 124 | + "createOption": "Ephemeral", |
| 125 | + "deleteOption": "Delete", |
| 126 | + "diskSizeGB": 64 |
| 127 | + } |
| 128 | + } |
| 129 | + }, |
| 130 | + "userData": { |
| 131 | + "type": "string", |
| 132 | + "metadata": { |
| 133 | + "description": "The Base64 encoded cloud-init user data." |
| 134 | + }, |
| 135 | + "defaultValue": "" |
| 136 | + }, |
| 137 | + "vmDeviceModel": { |
| 138 | + "type": "string", |
| 139 | + "defaultValue": "T2", |
| 140 | + "allowedValues": ["T1", "T2"], |
| 141 | + "metadata": { |
| 142 | + "description": "The type of the device model to use." |
| 143 | + } |
| 144 | + }, |
| 145 | + "vmImage": { |
| 146 | + "type": "string", |
| 147 | + "metadata": { |
| 148 | + "description": "The virtual machine image that is currently provisioned to the OS disk, using the full URL and tag notation used to pull the image." |
| 149 | + } |
| 150 | + }, |
| 151 | + "vmImageRepositoryCredentials": { |
| 152 | + "type": "object", |
| 153 | + "metadata": { |
| 154 | + "description": "Credentials used to login to the image repository." |
| 155 | + } |
| 156 | + /* |
| 157 | + "password": "string", |
| 158 | + "registryUrl": "string", |
| 159 | + "username": "string" |
| 160 | + */ |
| 161 | + } |
| 162 | + }, |
| 163 | + "resources": [ |
| 164 | + { |
| 165 | + "type": "Microsoft.NetworkCloud/virtualMachines", |
| 166 | + "apiVersion": "2023-07-01", |
| 167 | + "name": "[parameters('vmName')]", |
| 168 | + "location": "[parameters('location')]", |
| 169 | + "extendedLocation": { |
| 170 | + "type": "CustomLocation", |
| 171 | + "name": "[parameters('extendedLocation')]" |
| 172 | + }, |
| 173 | + "tags": "[parameters('tags')]", |
| 174 | + "properties": { |
| 175 | + "adminUsername": "[if(empty(parameters('adminUsername')), json('null'), parameters('adminUsername'))]", |
| 176 | + "bootMethod": "[if(empty(parameters('bootMethod')), json('null'), parameters('bootMethod'))]", |
| 177 | + "cloudServicesNetworkAttachment": { |
| 178 | + "attachedNetworkId": "[parameters('cloudServicesNetworkId')]", |
| 179 | + "defaultGateway": "False", |
| 180 | + "ipAllocationMethod": "Dynamic" |
| 181 | + }, |
| 182 | + "cpuCores": "[parameters('cpuCores')]", |
| 183 | + "memorySizeGB": "[parameters('memorySizeGB')]", |
| 184 | + "networkData": "[if(empty(parameters('networkData')), json('null'), parameters('networkData'))]", |
| 185 | + "networkAttachments": "[if(empty(parameters('networkAttachments')), json('null'), parameters('networkAttachments'))]", |
| 186 | + "placementHints": "[if(empty(parameters('placementHints')), json('null'), parameters('placementHints'))]", |
| 187 | + "sshPublicKeys": "[if(empty(parameters('sshPublicKeys')), json('null'), parameters('sshPublicKeys'))]", |
| 188 | + "storageProfile": "[if(empty(parameters('storageProfile')), json('null'), parameters('storageProfile'))]", |
| 189 | + "userData": "[if(empty(parameters('userData')), json('null'), parameters('userData'))]", |
| 190 | + "vmDeviceModel": "[if(empty(parameters('vmDeviceModel')), json('null'), parameters('vmDeviceModel'))]", |
| 191 | + "vmImage": "[if(empty(parameters('vmImage')), json('null'), parameters('vmImage'))]", |
| 192 | + "vmImageRepositoryCredentials": "[if(empty(parameters('vmImageRepositoryCredentials')), json('null'), parameters('vmImageRepositoryCredentials'))]" |
| 193 | + } |
| 194 | + } |
| 195 | + ] |
| 196 | + } |
0 commit comments