Creating a Virtual Network (Azure Fundamentals - Series)
This article has not been completed yet. However, it may already contain helpful Information and therefore it has been published at this stage.
Introduction / Theory:
"Azure Virtual Network is the fundamental building block for your private network in Azure. A virtual network enables many types of Azure resources, such as Azure Virtual Machines (VM), to securely communicate with each other, the internet, and on-premises networks. A virtual network is similar to a traditional network that you'd operate in your own data center. An Azure Virtual Network brings with it extra benefits of Azure's infrastructure such as scale, availability, and isolation."
Microsoft
Example: Azure virtual network
Create Virtual Network via Portal:
Create Virtual Network via PowerShell:
# Ressource Group Creation
$rg = @{
Name = 'rg-avd-test'
Location = 'WestEurope'
}
New-AzResourceGroup @rg
# VNet Creation
$vnet = @{
Name = 'avdtestvnet01'
ResourceGroupName = 'rg-avd-test'
Location = 'WestEurope'
AddressPrefix = '10.0.0.0/16'
}
$virtualNetwork = New-AzVirtualNetwork @vnet
# Subnet Creation
$subnet = @{
Name = 'default'
VirtualNetwork = $virtualNetwork
AddressPrefix = '10.0.0.0/24'
}
$subnetConfig = Add-AzVirtualNetworkSubnetConfig @subnet
# Write the subnet configuration to the virtual network
$virtualNetwork | Set-AzVirtualNetwork
Via Azure CLI:
# Ressource Group Creation
az group create \
--name rg-avd-test \
--location westeurope
# VNet- and Subnet - Creation
az network vnet create \
--name avdtestvnet01 \
--resource-group rg-avd-test \
--subnet-name default