Skip to content

Commit

Permalink
Updating for deploying to new RG and default subnet
Browse files Browse the repository at this point in the history
  • Loading branch information
singhkays committed Nov 11, 2016
1 parent 795ce4c commit 99af30d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
14 changes: 11 additions & 3 deletions 101-vm-from-user-image/azuredeploy.json
Expand Up @@ -70,9 +70,14 @@
},
"newOrExistingSubnetName": {
"type": "string",
"defaultValue": "Subnet1",
"metadata": {
"description": "Subnet Name"
"description": "New or Existing subnet Name"
}
},
"existingVnetResourceGroupName": {
"type": "string",
"metadata": {
"description": "Resource group of the existing VNET"
}
}
},
Expand All @@ -82,7 +87,7 @@
"nicName": "[concat(parameters('customVmName'),'Nic')]",
"publicIPAddressType": "Dynamic",
"apiVersion": "2015-06-15",
"templatelink": "[concat('https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/101-vm-from-user-image/',parameters('newOrExistingVnet'),'vnet.json')]"
"templatelink": "[concat('https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-from-user-image/',parameters('newOrExistingVnet'),'vnet.json')]"
},
"resources": [
{
Expand All @@ -101,6 +106,9 @@
},
"subnetName": {
"value": "[parameters('newOrExistingSubnetName')]"
},
"existingVnetResourceGroupName": {
"value": "[parameters('existingVnetResourceGroupName')]"
}
}
}
Expand Down
14 changes: 10 additions & 4 deletions 101-vm-from-user-image/existingvnet.json
Expand Up @@ -7,14 +7,20 @@
},
"subnetName": {
"type": "string"
},
"existingVnetResourceGroupName": {
"type": "string",
"metadata": {
"description": "Subnet Name"
}
}
},
"variables": { },
"resources": [ ],
"variables": {},
"resources": [],
"outputs": {
"subnet1Ref": {
"value": "[concat(resourceId('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName')), '/subnets/',parameters('subnetName'))]",
"value": "[concat(resourceId(parameters('existingVnetResourceGroupName'), 'Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName')), '/subnets/',parameters('subnetName'))]",
"type": "string"
}
}
}
}
9 changes: 6 additions & 3 deletions 101-vm-from-user-image/newvnet.json
Expand Up @@ -13,12 +13,15 @@
"metadata": {
"description": "Subnet 1 Name"
}
},
"existingVnetResourceGroupName": {
"type": "string",
"metadata": {
"description": "Subnet Name"
}
}
},
"variables": {
"apiVersion": "2015-06-15",
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]",
"subnet1": "[concat(variables('vnetID'),'/subnets/',parameters('SubnetName'))]"
},
"resources": [
{
Expand Down

0 comments on commit 99af30d

Please sign in to comment.