Skip to content

Instantly share code, notes, and snippets.

@cwoolum
Last active Jan 6, 2019
Embed
What would you like to do?
AKS-Deploy Part 2
resourceGroupName="rg-$envName"
echo "Creating Resource Group"
az group create -l westus -n $resourceGroupName
echo "Creating VNet"
az network vnet create \
--resource-group $resourceGroupName \
--name vnet-api-$envName \
--address-prefixes 10.0.0.0/8 \
--subnet-name subnet-api-$envName \
--subnet-prefix 10.240.0.0/16
echo "Creating Virtual Node Subnet"
az network vnet subnet create \
--resource-group $resourceGroupName \
--vnet-name vnet-api-$envName \
--name subnet-api-$envName-vnodes \
--address-prefix 10.241.0.0/16
vNetResourceId="$(az network vnet show --resource-group $resourceGroupName --name vnet-api-$envName --query id -o tsv)"
subnetResourceId="$(az network vnet subnet show --resource-group $resourceGroupName --vnet-name vnet-api-$envName --name subnet-api-$envName --query id -o tsv)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment