Microsoft.Network virtualRouters 2021-03-01

Bicep resource definition

The virtualRouters resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Network/virtualRouters resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Network/virtualRouters@2021-03-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    hostedGateway: {
      id: 'string'
    }
    hostedSubnet: {
      id: 'string'
    }
    virtualRouterAsn: int
    virtualRouterIps: [
      'string'
    ]
  }
}

Property values

virtualRouters

Name Description Value
name The resource name string (required)
location Resource location. string
tags Resource tags. Dictionary of tag names and values. See Tags in templates
properties Properties of the Virtual Router. VirtualRouterPropertiesFormat

VirtualRouterPropertiesFormat

Name Description Value
hostedGateway The Gateway on which VirtualRouter is hosted. SubResource
hostedSubnet The Subnet on which VirtualRouter is hosted. SubResource
virtualRouterAsn VirtualRouter ASN. int
virtualRouterIps VirtualRouter IPs. string[]

SubResource

Name Description Value
id Resource ID. string

ARM template resource definition

The virtualRouters resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Network/virtualRouters resource, add the following JSON to your template.

{
  "type": "Microsoft.Network/virtualRouters",
  "apiVersion": "2021-03-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "hostedGateway": {
      "id": "string"
    },
    "hostedSubnet": {
      "id": "string"
    },
    "virtualRouterAsn": "int",
    "virtualRouterIps": [ "string" ]
  }
}

Property values

virtualRouters

Name Description Value
type The resource type 'Microsoft.Network/virtualRouters'
apiVersion The resource api version '2021-03-01'
name The resource name string (required)
location Resource location. string
tags Resource tags. Dictionary of tag names and values. See Tags in templates
properties Properties of the Virtual Router. VirtualRouterPropertiesFormat

VirtualRouterPropertiesFormat

Name Description Value
hostedGateway The Gateway on which VirtualRouter is hosted. SubResource
hostedSubnet The Subnet on which VirtualRouter is hosted. SubResource
virtualRouterAsn VirtualRouter ASN. int
virtualRouterIps VirtualRouter IPs. string[]

SubResource

Name Description Value
id Resource ID. string

Terraform (AzAPI provider) resource definition

The virtualRouters resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Network/virtualRouters resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/virtualRouters@2021-03-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      hostedGateway = {
        id = "string"
      }
      hostedSubnet = {
        id = "string"
      }
      virtualRouterAsn = int
      virtualRouterIps = [
        "string"
      ]
    }
  })
}

Property values

virtualRouters

Name Description Value
type The resource type "Microsoft.Network/virtualRouters@2021-03-01"
name The resource name string (required)
location Resource location. string
parent_id To deploy to a resource group, use the ID of that resource group. string (required)
tags Resource tags. Dictionary of tag names and values.
properties Properties of the Virtual Router. VirtualRouterPropertiesFormat

VirtualRouterPropertiesFormat

Name Description Value
hostedGateway The Gateway on which VirtualRouter is hosted. SubResource
hostedSubnet The Subnet on which VirtualRouter is hosted. SubResource
virtualRouterAsn VirtualRouter ASN. int
virtualRouterIps VirtualRouter IPs. string[]

SubResource

Name Description Value
id Resource ID. string