Microsoft。ネットワークexpressRouteGateways/expressRouteConnections 2018-12-01

Bicep リソース定義

expressRouteGateways/expressRouteConnections リソースの種類は、次をターゲットとする操作と共にデプロイできます。

  • リソース グループの - リソース グループのデプロイ コマンド 参照

各 API バージョンで変更されたプロパティの一覧については、変更ログの参照してください。

使用例

Bicep サンプル

Express Route Connection のデプロイの基本的な例。

@secure()
@description('The shared key for the ExpressRoute connection')
param sharedKey string
param resourceName string = 'acctest0001'
param location string = 'westeurope'

resource virtualWan 'Microsoft.Network/virtualWans@2022-07-01' = {
  name: resourceName
  location: location
  properties: {
    allowBranchToBranchTraffic: true
    disableVpnEncryption: false
    office365LocalBreakoutCategory: 'None'
    type: 'Standard'
  }
}

resource expressRouteGateway 'Microsoft.Network/expressRouteGateways@2022-07-01' = {
  name: resourceName
  location: location
  properties: {
    allowNonVirtualWanTraffic: false
    autoScaleConfiguration: {
      bounds: {
        min: 1
      }
    }
    virtualHub: {
      id: virtualHub.id
    }
  }
}

resource expressRouteConnection 'Microsoft.Network/expressRouteGateways/expressRouteConnections@2022-07-01' = {
  name: resourceName
  parent: expressRouteGateway
  properties: {
    enableInternetSecurity: false
    expressRouteCircuitPeering: {
      id: peering.id
    }
    expressRouteGatewayBypass: false
    routingConfiguration: {}
    routingWeight: 0
  }
}

resource expressRouteCircuit 'Microsoft.Network/expressRouteCircuits@2022-07-01' = {
  name: resourceName
  location: location
  sku: {
    family: 'MeteredData'
    name: 'Premium_MeteredData'
    tier: 'Premium'
  }
  properties: {
    authorizationKey: ''
    bandwidthInGbps: 5
    expressRoutePort: {
      id: expressRoutePort.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.2.0/30'
    sharedKey: sharedKey
    state: 'Enabled'
    vlanId: 100
  }
}

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

resource virtualHub 'Microsoft.Network/virtualHubs@2022-07-01' = {
  name: resourceName
  location: location
  properties: {
    addressPrefix: '10.0.1.0/24'
    hubRoutingPreference: 'ExpressRoute'
    virtualRouterAutoScaleConfiguration: {
      minCapacity: 2
    }
    virtualWan: {
      id: virtualWan.id
    }
  }
}

リソースの形式

Microsoft.Network/expressRouteGateways/expressRouteConnections リソースを作成するには、次の Bicep をテンプレートに追加します。

resource symbolicname 'Microsoft.Network/expressRouteGateways/expressRouteConnections@2018-12-01' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    authorizationKey: 'string'
    expressRouteCircuitPeering: {
      id: 'string'
    }
    routingWeight: int
  }
}

プロパティ値

Microsoft.Network/expressRouteGateways/expressRouteConnections

名前 形容 価値
名前 リソース名 string (必須)
親 Bicep では、子リソースの親リソースを指定できます。 このプロパティを追加する必要があるのは、子リソースが親リソースの外部で宣言されている場合のみです。

詳細については、「親リソースの外部 子リソース」を参照してください。
種類のリソースのシンボリック名: expressRouteGateways
プロパティ ExpressRouteConnection サブリソースのプロパティ。 ExpressRouteConnectionProperties の

ExpressRouteCircuitPeeringId

名前 形容 価値
身分証明書 ExpressRoute 回線ピアリングの ID。 文字列

ExpressRouteConnectionプロパティ

名前 形容 価値
authorizationキー 接続を確立するための承認キー。 文字列
expressRouteCircuitPeering (英語) ExpressRoute 回線ピアリング。 ExpressRouteCircuitPeeringId (必須)
ルーティングウェイト 接続に関連付けられているルーティングの重み。 整数 (int)

ARM テンプレート リソース定義

expressRouteGateways/expressRouteConnections リソースの種類は、次をターゲットとする操作と共にデプロイできます。

使用例

リソースの形式

Microsoft.Network/expressRouteGateways/expressRouteConnections リソースを作成するには、テンプレートに次の JSON を追加します。

{
  "type": "Microsoft.Network/expressRouteGateways/expressRouteConnections",
  "apiVersion": "2018-12-01",
  "name": "string",
  "properties": {
    "authorizationKey": "string",
    "expressRouteCircuitPeering": {
      "id": "string"
    },
    "routingWeight": "int"
  }
}

プロパティ値

Microsoft.Network/expressRouteGateways/expressRouteConnections

名前 形容 価値
apiVersion (英語) API のバージョン '2018-12-01'
名前 リソース名 string (必須)
プロパティ ExpressRouteConnection サブリソースのプロパティ。 ExpressRouteConnectionProperties の
型 リソースの種類 'Microsoft.Network/expressRouteGateways/expressRouteConnections'

ExpressRouteCircuitPeeringId

名前 形容 価値
身分証明書 ExpressRoute 回線ピアリングの ID。 文字列

ExpressRouteConnectionプロパティ

名前 形容 価値
authorizationキー 接続を確立するための承認キー。 文字列
expressRouteCircuitPeering (英語) ExpressRoute 回線ピアリング。 ExpressRouteCircuitPeeringId (必須)
ルーティングウェイト 接続に関連付けられているルーティングの重み。 整数 (int)

Terraform (AzAPI プロバイダー) リソース定義

expressRouteGateways/expressRouteConnections リソースの種類は、次をターゲットとする操作と共にデプロイできます。

  • リソースグループ 各APIバージョンの変更プロパティ一覧については、 変更ログをご覧ください。

使用例

Terraformサンプル

Express Route 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 "shared_key" {
  type        = string
  description = "The shared key for the ExpressRoute connection"
  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 = "CDC-Canberra"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "virtualWan" {
  type      = "Microsoft.Network/virtualWans@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      allowBranchToBranchTraffic     = true
      disableVpnEncryption           = false
      office365LocalBreakoutCategory = "None"
      type                           = "Standard"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "virtualHub" {
  type      = "Microsoft.Network/virtualHubs@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      addressPrefix        = "10.0.1.0/24"
      hubRoutingPreference = "ExpressRoute"
      virtualRouterAutoScaleConfiguration = {
        minCapacity = 2
      }
      virtualWan = {
        id = azapi_resource.virtualWan.id
      }
    }
  }
  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   = "Premium_MeteredData"
      tier   = "Premium"
    }
  }
  schema_validation_enabled = false
  ignore_casing             = true
  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.2.0/30"
      sharedKey                  = var.shared_key
      state                      = "Enabled"
      vlanId                     = 100
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "expressRouteGateway" {
  type      = "Microsoft.Network/expressRouteGateways@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      allowNonVirtualWanTraffic = false
      autoScaleConfiguration = {
        bounds = {
          min = 1
        }
      }
      virtualHub = {
        id = azapi_resource.virtualHub.id
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "expressRouteConnection" {
  type      = "Microsoft.Network/expressRouteGateways/expressRouteConnections@2022-07-01"
  parent_id = azapi_resource.expressRouteGateway.id
  name      = var.resource_name
  body = {
    properties = {
      enableInternetSecurity = false
      expressRouteCircuitPeering = {
        id = azapi_resource.peering.id
      }
      expressRouteGatewayBypass = false
      routingConfiguration = {
      }
      routingWeight = 0
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

リソースの形式

Microsoft.Network/expressRouteGateways/expressRouteConnections リソースを作成するには、次の Terraform をテンプレートに追加します。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/expressRouteGateways/expressRouteConnections@2018-12-01"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      authorizationKey = "string"
      expressRouteCircuitPeering = {
        id = "string"
      }
      routingWeight = int
    }
  }
}

プロパティ値

Microsoft.Network/expressRouteGateways/expressRouteConnections

名前 形容 価値
名前 リソース名 string (必須)
parent_id このリソースの親であるリソースの ID。 種類のリソースの ID: expressRouteGateways
プロパティ ExpressRouteConnection サブリソースのプロパティ。 ExpressRouteConnectionProperties の
型 リソースの種類 "Microsoft.Network/expressRouteGateways/expressRouteConnections@2018-12-01" (英語)

ExpressRouteCircuitPeeringId

名前 形容 価値
身分証明書 ExpressRoute 回線ピアリングの ID。 文字列

ExpressRouteConnectionプロパティ

名前 形容 価値
authorizationキー 接続を確立するための承認キー。 文字列
expressRouteCircuitPeering (英語) ExpressRoute 回線ピアリング。 ExpressRouteCircuitPeeringId (必須)
ルーティングウェイト 接続に関連付けられているルーティングの重み。 整数 (int)