Nätverk expressRouteCircuits/peerings/anslutningar 2020-08-01

Bicep-resursdefinition

Resurstypen expressRouteCircuits/peerings/connections kan distribueras med åtgärder som mål:

En lista över ändrade egenskaper i varje API-version finns i ändringsloggen.

Användningsexempel

Bicep-exempel

Ett grundläggande exempel på hur du distribuerar Express Route Circuit Connection.

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

Resursformat

Om du vill skapa en Microsoft.Network/expressRouteCircuits/peerings/connections-resurs lägger du till följande Bicep i mallen.

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

Egenskapsvärden

Microsoft.Network/expressRouteCircuits/peerings/connections

Namn Beskrivning Värde
Namn Resursnamnet sträng (krävs)
förälder I Bicep kan du ange den överordnade resursen för en underordnad resurs. Du behöver bara lägga till den här egenskapen när den underordnade resursen deklareras utanför den överordnade resursen.

Mer information finns i Underordnad resurs utanför den överordnade resursen.
Symboliskt namn för resurs av typen: expressRouteCircuits/peerings
Egenskaper Egenskaper för expressvägskretsens anslutning. ExpressRouteCircuitConnectionPropertiesFormat

ExpressRouteCircuitConnectionPropertiesFormat

Namn Beskrivning Värde
addressPrefix /29 IP-adressutrymme för att skapa kundadresser för tunnlar. sträng
authorizationKey Auktoriseringsnyckeln. sträng
expressRouteCircuitPeering Referens till Express Route Circuit Private Peering Resource för kretsen som initierar anslutningen. Underresurs
ipv6CircuitConnectionConfig IPv6-adressprefixEgenskaper för expressvägskretsens anslutning. Ipv6CircuitConnectionConfig
peerExpressRouteCircuitPeering Referens till den peerkopplade kretsens privata peeringresurs för Express Route Circuit. Underresurs

Ipv6CircuitConnectionConfig

Namn Beskrivning Värde
addressPrefix /125 IP-adressutrymme för att skapa kundadresser för global räckvidd. sträng

Underresurs

Namn Beskrivning Värde
Id Resurs-ID. sträng

Resursdefinition för ARM-mall

Resurstypen expressRouteCircuits/peerings/connections kan distribueras med åtgärder som mål:

Användningsexempel

Resursformat

Om du vill skapa en Resurs för Microsoft.Network/expressRouteCircuits/peerings/connections lägger du till följande JSON i mallen.

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

Egenskapsvärden

Microsoft.Network/expressRouteCircuits/peerings/connections

Namn Beskrivning Värde
apiVersion API-versionen '2020-08-01'
Namn Resursnamnet sträng (krävs)
Egenskaper Egenskaper för expressvägskretsens anslutning. ExpressRouteCircuitConnectionPropertiesFormat
typ Resurstypen "Microsoft.Network/expressRouteCircuits/peerings/connections"

ExpressRouteCircuitConnectionPropertiesFormat

Namn Beskrivning Värde
addressPrefix /29 IP-adressutrymme för att skapa kundadresser för tunnlar. sträng
authorizationKey Auktoriseringsnyckeln. sträng
expressRouteCircuitPeering Referens till Express Route Circuit Private Peering Resource för kretsen som initierar anslutningen. Underresurs
ipv6CircuitConnectionConfig IPv6-adressprefixEgenskaper för expressvägskretsens anslutning. Ipv6CircuitConnectionConfig
peerExpressRouteCircuitPeering Referens till den peerkopplade kretsens privata peeringresurs för Express Route Circuit. Underresurs

Ipv6CircuitConnectionConfig

Namn Beskrivning Värde
addressPrefix /125 IP-adressutrymme för att skapa kundadresser för global räckvidd. sträng

Underresurs

Namn Beskrivning Värde
Id Resurs-ID. sträng

Resursdefinition för Terraform (AzAPI-provider)

Resurstypen expressRouteCircuits/peerings/connections kan distribueras med åtgärder som mål:

  • Resursgrupper För en lista över ändrade egenskaper i varje API-version, se ändringslogg.

Användningsexempel

Terraform-exempel

Ett grundläggande exempel på hur du distribuerar Express Route Circuit Connection.

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    = ["*"]
}

Resursformat

Om du vill skapa en Resurs för Microsoft.Network/expressRouteCircuits/peerings/connections lägger du till följande Terraform i mallen.

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

Egenskapsvärden

Microsoft.Network/expressRouteCircuits/peerings/connections

Namn Beskrivning Värde
Namn Resursnamnet sträng (krävs)
föräldra_id ID för resursen som är överordnad för den här resursen. ID för resurs av typen: expressRouteCircuits/peerings
Egenskaper Egenskaper för expressvägskretsens anslutning. ExpressRouteCircuitConnectionPropertiesFormat
typ Resurstypen "Microsoft.Network/expressRouteCircuits/peerings/connections@2020-08-01"

ExpressRouteCircuitConnectionPropertiesFormat

Namn Beskrivning Värde
addressPrefix /29 IP-adressutrymme för att skapa kundadresser för tunnlar. sträng
authorizationKey Auktoriseringsnyckeln. sträng
expressRouteCircuitPeering Referens till Express Route Circuit Private Peering Resource för kretsen som initierar anslutningen. Underresurs
ipv6CircuitConnectionConfig IPv6-adressprefixEgenskaper för expressvägskretsens anslutning. Ipv6CircuitConnectionConfig
peerExpressRouteCircuitPeering Referens till den peerkopplade kretsens privata peeringresurs för Express Route Circuit. Underresurs

Ipv6CircuitConnectionConfig

Namn Beskrivning Värde
addressPrefix /125 IP-adressutrymme för att skapa kundadresser för global räckvidd. sträng

Underresurs

Namn Beskrivning Värde
Id Resurs-ID. sträng