Microsoft.Network expressRouteCircuits/對等互連/連線 2024-10-01

Bicep 資源定義

expressRouteCircuits/對等互連/連線資源類型可以使用以下列為目標的作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

使用範例

Bicep 範例

部署 Express Route 線路連線的基本範例。

param resourceName string = 'acctest0001'
param location string = 'westeurope'
@secure()
@description('The shared key for the Express Route circuit peering connections')
param expressRouteConnectionSharedKey string

resource expressRoutePort 'Microsoft.Network/ExpressRoutePorts@2022-07-01' = {
  name: resourceName
  location: location
  properties: {
    bandwidthInGbps: 10
    encapsulation: 'Dot1Q'
    peeringLocation: 'Airtel-Chennai2-CLS'
  }
}

resource expressRoutePort2 'Microsoft.Network/ExpressRoutePorts@2022-07-01' = {
  name: resourceName
  location: location
  properties: {
    bandwidthInGbps: 10
    encapsulation: 'Dot1Q'
    peeringLocation: 'CDC-Canberra'
  }
}

resource expressRouteCircuit 'Microsoft.Network/expressRouteCircuits@2022-07-01' = {
  name: resourceName
  location: location
  sku: {
    family: 'MeteredData'
    name: 'Standard_MeteredData'
    tier: 'Standard'
  }
  properties: {
    authorizationKey: ''
    bandwidthInGbps: 5
    expressRoutePort: {
      id: expressRoutePort.id
    }
  }
}

resource expressRouteCircuit2 'Microsoft.Network/expressRouteCircuits@2022-07-01' = {
  name: resourceName
  location: location
  sku: {
    family: 'MeteredData'
    name: 'Standard_MeteredData'
    tier: 'Standard'
  }
  properties: {
    authorizationKey: ''
    bandwidthInGbps: 5
    expressRoutePort: {
      id: expressRoutePort2.id
    }
  }
}

resource peering 'Microsoft.Network/expressRouteCircuits/peerings@2022-07-01' = {
  name: 'AzurePrivatePeering'
  parent: expressRouteCircuit
  properties: {
    azureASN: 12076
    gatewayManagerEtag: ''
    peerASN: 100
    peeringType: 'AzurePrivatePeering'
    primaryPeerAddressPrefix: '192.168.1.0/30'
    secondaryPeerAddressPrefix: '192.168.1.0/30'
    sharedKey: expressRouteConnectionSharedKey
    state: 'Enabled'
    vlanId: 100
  }
}

resource peering2 'Microsoft.Network/expressRouteCircuits/peerings@2022-07-01' = {
  name: 'AzurePrivatePeering'
  parent: expressRouteCircuit2
  properties: {
    azureASN: 12076
    gatewayManagerEtag: ''
    peerASN: 100
    peeringType: 'AzurePrivatePeering'
    primaryPeerAddressPrefix: '192.168.1.0/30'
    secondaryPeerAddressPrefix: '192.168.1.0/30'
    sharedKey: expressRouteConnectionSharedKey
    state: 'Enabled'
    vlanId: 100
  }
}

resource connection 'Microsoft.Network/expressRouteCircuits/peerings/connections@2022-07-01' = {
  name: resourceName
  parent: peering
  properties: {
    addressPrefix: '192.169.8.0/29'
    expressRouteCircuitPeering: {
      id: peering.id
    }
    peerExpressRouteCircuitPeering: {
      id: peering2.id
    }
  }
}

資源格式

若要建立 Microsoft.Network/expressRouteCircuits/peerings/connections 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.Network/expressRouteCircuits/peerings/connections@2024-10-01' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    addressPrefix: 'string'
    authorizationKey: 'string'
    expressRouteCircuitPeering: {
      id: 'string'
    }
    ipv6CircuitConnectionConfig: {
      addressPrefix: 'string'
    }
    peerExpressRouteCircuitPeering: {
      id: 'string'
    }
  }
}

屬性值

Microsoft.Network/expressRouteCircuits/peerings/connections

名稱 Description 價值觀
名稱 資源名稱 字串 (必要)
父代 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源。
類型資源的符號名稱: expressRouteCircuits/peerings
properties 快速路線電路連線的屬性。 ExpressRouteCircuitConnectionProperties格式

ExpressRouteCircuitConnectionProperties格式

名稱 Description 價值觀
addressPrefix 的 /29 IP 位址空間,以分割通道的客戶位址。 字串
authorizationKey 授權金鑰。 字串
expressRouteCircuitPeering 參考線路起始連線的 Express Route 線路私人對等互連資源。 SubResource
ipv6CircuitConnectionConfig IPv6 位址前置詞快速路由線路連線的屬性。 IPv6電路連線配置
peerExpressRouteCircuitPeering 對等互連線路的 Express Route 線路私人對等互連資源的參考。 SubResource

IPv6電路連線配置

名稱 Description 價值觀
addressPrefix 的 /125 IP 位址空間,以開闢客戶位址以實現全球覆蓋。 字串

子資源

名稱 Description 價值觀
識別碼 資源標識碼。 字串

ARM 樣本資源定義

expressRouteCircuits/對等互連/連線資源類型可以使用以下列為目標的作業來部署:

使用範例

資源格式

若要建立 Microsoft.Network/expressRouteCircuits/peerings/connections 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.Network/expressRouteCircuits/peerings/connections",
  "apiVersion": "2024-10-01",
  "name": "string",
  "properties": {
    "addressPrefix": "string",
    "authorizationKey": "string",
    "expressRouteCircuitPeering": {
      "id": "string"
    },
    "ipv6CircuitConnectionConfig": {
      "addressPrefix": "string"
    },
    "peerExpressRouteCircuitPeering": {
      "id": "string"
    }
  }
}

屬性值

Microsoft.Network/expressRouteCircuits/peerings/connections

名稱 Description 價值觀
apiVersion API 版本 '2024-10-01'
名稱 資源名稱 字串 (必要)
properties 快速路線電路連線的屬性。 ExpressRouteCircuitConnectionProperties格式
型別 資源類型 'Microsoft.Network/expressRouteCircuits/peerings/connections'

ExpressRouteCircuitConnectionProperties格式

名稱 Description 價值觀
addressPrefix 的 /29 IP 位址空間,以分割通道的客戶位址。 字串
authorizationKey 授權金鑰。 字串
expressRouteCircuitPeering 參考線路起始連線的 Express Route 線路私人對等互連資源。 SubResource
ipv6CircuitConnectionConfig IPv6 位址前置詞快速路由線路連線的屬性。 IPv6電路連線配置
peerExpressRouteCircuitPeering 對等互連線路的 Express Route 線路私人對等互連資源的參考。 SubResource

IPv6電路連線配置

名稱 Description 價值觀
addressPrefix 的 /125 IP 位址空間,以開闢客戶位址以實現全球覆蓋。 字串

子資源

名稱 Description 價值觀
識別碼 資源標識碼。 字串

Terraform (AzAPI 提供者) 資源定義

expressRouteCircuits/對等互連/連線資源類型可以使用以下列為目標的作業來部署:

  • 資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。

使用範例

Terraform 範例

部署 Express Route 線路連線的基本範例。

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"
}

variable "express_route_connection_shared_key" {
  type        = string
  description = "The shared key for the Express Route circuit peering connections"
  sensitive   = true
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "ExpressRoutePort" {
  type      = "Microsoft.Network/ExpressRoutePorts@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      bandwidthInGbps = 10
      encapsulation   = "Dot1Q"
      peeringLocation = "Airtel-Chennai2-CLS"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "ExpressRoutePort2" {
  type      = "Microsoft.Network/ExpressRoutePorts@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      bandwidthInGbps = 10
      encapsulation   = "Dot1Q"
      peeringLocation = "CDC-Canberra"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "expressRouteCircuit" {
  type      = "Microsoft.Network/expressRouteCircuits@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      authorizationKey = ""
      bandwidthInGbps  = 5
      expressRoutePort = {
        id = azapi_resource.ExpressRoutePort.id
      }
    }
    sku = {
      family = "MeteredData"
      name   = "Standard_MeteredData"
      tier   = "Standard"
    }
  }
  ignore_casing             = true
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "expressRouteCircuit2" {
  type      = "Microsoft.Network/expressRouteCircuits@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      authorizationKey = ""
      bandwidthInGbps  = 5
      expressRoutePort = {
        id = azapi_resource.ExpressRoutePort2.id
      }
    }
    sku = {
      family = "MeteredData"
      name   = "Standard_MeteredData"
      tier   = "Standard"
    }
  }
  ignore_casing             = true
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "peering" {
  type      = "Microsoft.Network/expressRouteCircuits/peerings@2022-07-01"
  parent_id = azapi_resource.expressRouteCircuit.id
  name      = "AzurePrivatePeering"
  body = {
    properties = {
      azureASN                   = 12076
      gatewayManagerEtag         = ""
      peerASN                    = 100
      peeringType                = "AzurePrivatePeering"
      primaryPeerAddressPrefix   = "192.168.1.0/30"
      secondaryPeerAddressPrefix = "192.168.1.0/30"
      sharedKey                  = var.express_route_connection_shared_key
      state                      = "Enabled"
      vlanId                     = 100
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "peering2" {
  type      = "Microsoft.Network/expressRouteCircuits/peerings@2022-07-01"
  parent_id = azapi_resource.expressRouteCircuit2.id
  name      = "AzurePrivatePeering"
  body = {
    properties = {
      azureASN                   = 12076
      gatewayManagerEtag         = ""
      peerASN                    = 100
      peeringType                = "AzurePrivatePeering"
      primaryPeerAddressPrefix   = "192.168.1.0/30"
      secondaryPeerAddressPrefix = "192.168.1.0/30"
      sharedKey                  = var.express_route_connection_shared_key
      state                      = "Enabled"
      vlanId                     = 100
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "connection" {
  type      = "Microsoft.Network/expressRouteCircuits/peerings/connections@2022-07-01"
  parent_id = azapi_resource.peering.id
  name      = var.resource_name
  body = {
    properties = {
      addressPrefix = "192.169.8.0/29"
      expressRouteCircuitPeering = {
        id = azapi_resource.peering.id
      }
      peerExpressRouteCircuitPeering = {
        id = azapi_resource.peering2.id
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

資源格式

若要建立 Microsoft.Network/expressRouteCircuits/peerings/connections 資源,請將下列 Terraform 新增至您的範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/expressRouteCircuits/peerings/connections@2024-10-01"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      addressPrefix = "string"
      authorizationKey = "string"
      expressRouteCircuitPeering = {
        id = "string"
      }
      ipv6CircuitConnectionConfig = {
        addressPrefix = "string"
      }
      peerExpressRouteCircuitPeering = {
        id = "string"
      }
    }
  }
}

屬性值

Microsoft.Network/expressRouteCircuits/peerings/connections

名稱 Description 價值觀
名稱 資源名稱 字串 (必要)
parent_id 此資源為父系之資源的標識碼。 類型為 expressRouteCircuits/peerings 的資源識別碼
properties 快速路線電路連線的屬性。 ExpressRouteCircuitConnectionProperties格式
型別 資源類型 「Microsoft.Network/expressRouteCircuits/peerings/connections@2024-10-01」

ExpressRouteCircuitConnectionProperties格式

名稱 Description 價值觀
addressPrefix 的 /29 IP 位址空間,以分割通道的客戶位址。 字串
authorizationKey 授權金鑰。 字串
expressRouteCircuitPeering 參考線路起始連線的 Express Route 線路私人對等互連資源。 SubResource
ipv6CircuitConnectionConfig IPv6 位址前置詞快速路由線路連線的屬性。 IPv6電路連線配置
peerExpressRouteCircuitPeering 對等互連線路的 Express Route 線路私人對等互連資源的參考。 SubResource

IPv6電路連線配置

名稱 Description 價值觀
addressPrefix 的 /125 IP 位址空間,以開闢客戶位址以實現全球覆蓋。 字串

子資源

名稱 Description 價值觀
識別碼 資源標識碼。 字串