Create VNet, Subnet, and NSG

The A10-vThunder-VNET-SUBNET-NSG template is used to create a new virtual network (VNET), three new subnets, and two new network security group (NSGs) in the specified resource group. This template is deployed using Azure CLI.

It is not mandatory to create new resources, the existing resources can be used in deployment and configuration.

Before deploying this template, it is recommended to review the Prerequisites.

 

To deploy the A10-vThunder-VNET-SUBNET-NSG template using Azure CLI commands, perform the following steps:

  1. Download A10-vThunder-VNET-SUBNET-NSG template.

    NOTE: This template contains pre-populated default values that can be modified as required and it does not create new virtual network, network security group, subnets, and Public IP.
  2. From Windows Explorer, navigate to the folder where you have downloaded the PowerShell template.
  3. Open the PS_TMPL_VNET_SUBNET_NSG_PARAM.json with a text editor.
  4. Configure the following parameters depending upon your requirements:

    Table 15 : JSON Parameters

    Resource Name

    Description

    Virtual Network

    Specify the virtual network name for virtual machines.

            "Virtual_Network_CIDR": {
                "value": [
                    "10.0.0.0/16"
                ]
            },

    Virtual Network CIDR

    Specify the CIDR range for the virtual network.

            "Virtual_Network": {
                "value": "vth-vnet"
            },

    Subnets

    Specify the subnet name for inbound management traffic, inbound data traffic, and outbound data traffic.

            "SubnetManagement": {
                "value": "subnet-mgmt"
            },
            
            "SubnetDataIn": {
                "value": "subnet-data-in"
            },
            
            "SubnetDataOut": {
                "value": "subnet-data-out"
    

    Subnets CIDR

    Specify the CIDR range for management, datain, and datout subnets.

    
            "Subnet_Mgmt_CIDR": {
                "value": "10.0.1.0/24"
            },
            "Subnet_DataIn_CIDR": {
                "value": "10.0.2.0/24"
            },
            "Subnet_DataOut_CIDR": {
                "value": "10.0.3.0/24"
            },

    Network Security Group

    Specify the network security group name for all the NICs.

    
            "Network_Security_Group_VM1": {
                "value": "vth-inst1-nsg"
            },
            "Network_Security_Group_VM2": {
                "value": "vth-inst2-nsg"
            }
    NOTE: The Virtual Network (VN), Subnets, Network Security Group (NSG), and Public IP Address should be deployed in the same resource group.
  5. Verify if all the configurations in the PS_TMPL_VNET_SUBNET_NSG_PARAM.json file are correct and then save the changes.
  6. From the Start menu, open PowerShell and navigate to the folder where you have downloaded the PowerShell template.
  7. Run the following command to create an Azure resource group:

    PS C:\Users\TestUser\Templates> az group create --name <resource_group_name> --location "<location_name>"

    Example:

    PS C:\Users\TestUser\Templates> az group create --name vth-rg1 --location "south central us"
     {
        "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/vth-rg1",
        "location": "southcentralus",
        "managedBy": null,
        "name": "vth-rg1",
        "properties": {
          "provisioningState": "Succeeded"
        },
        "tags": null,
        "type": "Microsoft.Resources/resourceGroups"
      }
  8. Run the following command to create an Azure deployment group.

    PS C:\Users\TestUser\Templates> az deployment group create -g <resource_group_name> --template-file <template_name> --parameters <param_template_name>

    Example:

    PS C:\Users\TestUser\Templates> az deployment group create -g vth-rg1 --template-file PS_TMPL_VNET_SUBNET_NSG.json--parameters PS_TMPL_VNET_SUBNET_NSG_PARAM.json

    Here, vth-rg1 resource group is used.

  9. Verify if the VNET and NSG resources are created under Home > Azure services > Resource Groups > <resource_group_name>.

    Figure 181 : Resource listing under Resource Group

  10. Verify if the Subnet resources are created under Home > Azure services > Resource Groups > <resource_group_name> > <virtual_network_name>.

    Figure 182 : Resource listing under Virtual Network

COMPANY INFORMATION: Copyright © 2023 A10 Networks, Inc. All Rights Reserved. Legal Notice