Where does the number in AKS resources comes from?

8/5/2018

I need to do some operation on internal resources inside AKS ResourceGroup over API. I need to know how is the "23093...." number defined. How can I find it? I need to find aks-vnet-23093... resource by it's name via terraform data structure so I need to know how to generate this number.

scr1

-- Mateusz
azure
azure-kubernetes

1 Answer

8/6/2018

It seems the number is created randomly by Azure, of curse, the Vnet type is Basic. If you want to create a Vnet with a specific name using Terraform. You can use an advance Vnet. For more details, you can read the document here.

If you use the type Basic Vnet. When you create the AKS cluster, there will be output and you can find like this: enter image description here

Then you can use the command az resource list --resource-group nodeResourceGroup -o table and you will find like this: enter image description here

The Vnet name will be the same as it except the number after and the number is created randomly. So you cannot know the number before creating it by Azure.

-- Charles Xu
Source: StackOverflow