Bicep resource definition
The localNetworkGateways resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Network/localNetworkGateways resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Network/localNetworkGateways@2015-06-15' = {
etag: 'string'
location: 'string'
name: 'string'
properties: {
bgpSettings: {
asn: int
bgpPeeringAddress: 'string'
peerWeight: int
}
gatewayIpAddress: 'string'
localNetworkAddressSpace: {
addressPrefixes: [
'string'
]
}
provisioningState: 'string'
resourceGuid: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Network/localNetworkGateways
| Name |
Description |
Value |
| etag |
Gets a unique read-only string that changes whenever the resource is updated |
string |
| location |
Resource location. |
string |
| name |
The resource name |
string (required) |
| properties |
LocalNetworkGateway properties |
LocalNetworkGatewayPropertiesFormat |
| tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
AddressSpace
| Name |
Description |
Value |
| addressPrefixes |
A list of address blocks reserved for this virtual network in CIDR notation. |
string[] |
BgpSettings
| Name |
Description |
Value |
| asn |
Gets or sets this BGP speaker's ASN |
int |
| bgpPeeringAddress |
Gets or sets the BGP peering address and BGP identifier of this BGP speaker |
string |
| peerWeight |
Gets or sets the weight added to routes learned from this BGP speaker |
int |
| Name |
Description |
Value |
| bgpSettings |
Local network gateway's BGP speaker settings. |
BgpSettings |
| gatewayIpAddress |
IP address of local network gateway. |
string |
| localNetworkAddressSpace |
Local network site address space. |
AddressSpace |
| provisioningState |
Gets or sets Provisioning state of the LocalNetworkGateway resource Updating/Deleting/Failed |
string |
| resourceGuid |
The resource GUID property of the LocalNetworkGateway resource. |
string |
Usage Examples
Bicep Samples
A basic example of deploying local network gateway connection over which specific connections can be configured.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource localNetworkGateway 'Microsoft.Network/localNetworkGateways@2022-07-01' = {
name: resourceName
location: location
properties: {
gatewayIpAddress: '168.62.225.23'
localNetworkAddressSpace: {
addressPrefixes: [
'10.1.1.0/24'
]
}
}
}
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
| Bicep File |
Description |
| Site-to-Site VPN with active-active VPN Gateways with BGP |
This template allows you to deploy a site-to-site VPN between two VNets with VPN Gateways in configuration active-active with BGP. Each Azure VPN Gateway resolves the FQDN of the remote peers to determine the public IP of the remote VPN Gateway. Template runs as expected in Azure regions with availability zones. |
ARM template resource definition
The localNetworkGateways resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Network/localNetworkGateways resource, add the following JSON to your template.
{
"type": "Microsoft.Network/localNetworkGateways",
"apiVersion": "2015-06-15",
"name": "string",
"etag": "string",
"location": "string",
"properties": {
"bgpSettings": {
"asn": "int",
"bgpPeeringAddress": "string",
"peerWeight": "int"
},
"gatewayIpAddress": "string",
"localNetworkAddressSpace": {
"addressPrefixes": [ "string" ]
},
"provisioningState": "string",
"resourceGuid": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Network/localNetworkGateways
| Name |
Description |
Value |
| apiVersion |
The api version |
'2015-06-15' |
| etag |
Gets a unique read-only string that changes whenever the resource is updated |
string |
| location |
Resource location. |
string |
| name |
The resource name |
string (required) |
| properties |
LocalNetworkGateway properties |
LocalNetworkGatewayPropertiesFormat |
| tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
| type |
The resource type |
'Microsoft.Network/localNetworkGateways' |
AddressSpace
| Name |
Description |
Value |
| addressPrefixes |
A list of address blocks reserved for this virtual network in CIDR notation. |
string[] |
BgpSettings
| Name |
Description |
Value |
| asn |
Gets or sets this BGP speaker's ASN |
int |
| bgpPeeringAddress |
Gets or sets the BGP peering address and BGP identifier of this BGP speaker |
string |
| peerWeight |
Gets or sets the weight added to routes learned from this BGP speaker |
int |
| Name |
Description |
Value |
| bgpSettings |
Local network gateway's BGP speaker settings. |
BgpSettings |
| gatewayIpAddress |
IP address of local network gateway. |
string |
| localNetworkAddressSpace |
Local network site address space. |
AddressSpace |
| provisioningState |
Gets or sets Provisioning state of the LocalNetworkGateway resource Updating/Deleting/Failed |
string |
| resourceGuid |
The resource GUID property of the LocalNetworkGateway resource. |
string |
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
The localNetworkGateways resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Network/localNetworkGateways resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Network/localNetworkGateways@2015-06-15"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
etag = "string"
properties = {
bgpSettings = {
asn = int
bgpPeeringAddress = "string"
peerWeight = int
}
gatewayIpAddress = "string"
localNetworkAddressSpace = {
addressPrefixes = [
"string"
]
}
provisioningState = "string"
resourceGuid = "string"
}
}
}
Property Values
Microsoft.Network/localNetworkGateways
| Name |
Description |
Value |
| etag |
Gets a unique read-only string that changes whenever the resource is updated |
string |
| location |
Resource location. |
string |
| name |
The resource name |
string (required) |
| properties |
LocalNetworkGateway properties |
LocalNetworkGatewayPropertiesFormat |
| tags |
Resource tags |
Dictionary of tag names and values. |
| type |
The resource type |
"Microsoft.Network/localNetworkGateways@2015-06-15" |
AddressSpace
| Name |
Description |
Value |
| addressPrefixes |
A list of address blocks reserved for this virtual network in CIDR notation. |
string[] |
BgpSettings
| Name |
Description |
Value |
| asn |
Gets or sets this BGP speaker's ASN |
int |
| bgpPeeringAddress |
Gets or sets the BGP peering address and BGP identifier of this BGP speaker |
string |
| peerWeight |
Gets or sets the weight added to routes learned from this BGP speaker |
int |
| Name |
Description |
Value |
| bgpSettings |
Local network gateway's BGP speaker settings. |
BgpSettings |
| gatewayIpAddress |
IP address of local network gateway. |
string |
| localNetworkAddressSpace |
Local network site address space. |
AddressSpace |
| provisioningState |
Gets or sets Provisioning state of the LocalNetworkGateway resource Updating/Deleting/Failed |
string |
| resourceGuid |
The resource GUID property of the LocalNetworkGateway resource. |
string |
Usage Examples
A basic example of deploying local network gateway connection over which specific connections can be configured.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "localNetworkGateway" {
type = "Microsoft.Network/localNetworkGateways@2022-07-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
gatewayIpAddress = "168.62.225.23"
localNetworkAddressSpace = {
addressPrefixes = [
"10.1.1.0/24",
]
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.