次の方法で共有


Azure Resource Manager テンプレートを使用して ExpressRoute 回線を作成する

Azure PowerShell を使用して、Azure Resource Manager テンプレートをデプロイすることで、ExpressRoute 回線を作成する方法について説明します。 Resource Manager テンプレートの開発に関する詳細については、Resource Manager ドキュメントテンプレート リファレンスをご覧ください。

開始する前に

  • 構成を開始する前に、前提条件ワークフローを確認してください。
  • 新しいネットワーク リソースを作成するアクセス許可があることを確認します。 適切なアクセス許可がない場合は、アカウント管理者に連絡してください。
  • 手順をより理解するため、開始する前にビデオを確認できます。

ExpressRoute 回線の作成とプロビジョニング

Azure クイックスタート テンプレートには、Resource Manager テンプレートの適切なコレクションが含まれます。 既存のテンプレートのいずれかを使用して、ExpressRoute 回線を作成できます。

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "metadata": {
    "_generator": {
      "name": "bicep",
      "version": "0.5.6.12127",
      "templateHash": "14062891962288443864"
    }
  },
  "parameters": {
    "circuitName": {
      "type": "string",
      "metadata": {
        "description": "This is the name of the ExpressRoute circuit"
      }
    },
    "serviceProviderName": {
      "type": "string",
      "metadata": {
        "description": "This is the name of the ExpressRoute Service Provider. It must exactly match one of the Service Providers from List ExpressRoute Service Providers API call."
      }
    },
    "peeringLocation": {
      "type": "string",
      "metadata": {
        "description": "This is the name of the peering location and not the ARM resource location. It must exactly match one of the available peering locations from List ExpressRoute Service Providers API call."
      }
    },
    "bandwidthInMbps": {
      "type": "int",
      "metadata": {
        "description": "This is the bandwidth in Mbps of the circuit being created. It must exactly match one of the available bandwidth offers List ExpressRoute Service Providers API call."
      }
    },
    "skuTier": {
      "type": "string",
      "defaultValue": "Standard",
      "allowedValues": [
        "Standard",
        "Premium"
      ],
      "metadata": {
        "description": "Chosen SKU Tier of ExpressRoute circuit. Choose from Premium or Standard SKU tiers."
      }
    },
    "skuFamily": {
      "type": "string",
      "defaultValue": "MeteredData",
      "allowedValues": [
        "MeteredData",
        "UnlimitedData"
      ],
      "metadata": {
        "description": "Chosen SKU family of ExpressRoute circuit. Choose from MeteredData or UnlimitedData SKU families."
      }
    },
    "location": {
      "type": "string",
      "defaultValue": "[resourceGroup().location]",
      "metadata": {
        "description": "Location for all resources."
      }
    }
  },
  "resources": [
    {
      "type": "Microsoft.Network/expressRouteCircuits",
      "apiVersion": "2021-02-01",
      "name": "[parameters('circuitName')]",
      "location": "[parameters('location')]",
      "sku": {
        "name": "[format('{0}_{1}', parameters('skuTier'), parameters('skuFamily'))]",
        "tier": "[parameters('skuTier')]",
        "family": "[parameters('skuFamily')]"
      },
      "properties": {
        "serviceProviderProperties": {
          "serviceProviderName": "[parameters('serviceProviderName')]",
          "peeringLocation": "[parameters('peeringLocation')]",
          "bandwidthInMbps": "[parameters('bandwidthInMbps')]"
        }
      }
    }
  ]
}

その他の関連するテンプレートを確認する場合は、こちらを選択してください。

テンプレートをデプロイすることで、ExpressRoute 回線を作成するには:

  1. 次のコード ブロックの [使ってみる] を選択し、指示に従って Azure Cloud Shell にサインインします。

    $circuitName = Read-Host -Prompt "Enter a circuit name"
    $location = Read-Host -Prompt "Enter the location (i.e. centralus)"
    $resourceGroupName = "${circuitName}rg"
    $templateUri = "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.network/expressroute-circuit-create/azuredeploy.json"
    $serviceProviderName = "Equinix"
    $peeringLocation = "Silicon Valley"
    $bandwidthInMbps = 500
    $sku_tier = "Premium"
    $sku_family = "MeteredData"
    
    New-AzResourceGroup -Name $resourceGroupName -Location $location
    New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri $templateUri -circuitName $circuitName -serviceProviderName $serviceProviderName -peeringLocation $peeringLocation -bandwidthInMbps $bandwidthInMbps -sku_tier $sku_tier -sku_family $sku_family
    
    Write-Host "Press [ENTER] to continue ..."
    
    • SKU レベルによって、ExpressRoute 回線が Local、Standard、Premium のどれであるかが決まります。 Local、*Standard、または Premium を指定できます。

    • SKU ファミリによって、課金の種類が決まります。 従量制課金データ プランの場合は Metereddata、無制限データ プランの場合は Unlimiteddata を指定できます。 課金の種類は Metereddata から Unlimiteddata に変更できますが、Unlimiteddata から Metereddata に変更することはできません。 "Local" 回線は "Unlimiteddata" のみです。

    • ピアリングの場所とは、Microsoft とピアリングしている物理的な場所です。

      重要

      ピアリングの場所は、Microsoft とピアリングしている物理的な場所を示します。 この場所は "Location" プロパティにリンクされていません。それは、Azure Network Resource Provider が配置されている地理的な場所を参照します。 それらは関連付けられていませんが、回路のピアリングの場所と地理的に近い場所にある Network Resource Provider を選択することをお勧めします。

    リソース グループ名は、rg が追加された Service Bus 名前空間名です。

  2. [コピー] を選択し、PowerShell スクリプトがコピーされます。

  3. シェル コンソールを右クリックし、 [貼り付け] を選択します。

イベント ハブが作成されるまでしばらく時間がかかります。

このチュートリアルでは、テンプレートをデプロイするために Azure PowerShell を使用します。 テンプレートのその他のデプロイ方法については、以下をご覧ください。

ExpressRoute 回線のプロビジョニング解除と削除

[削除] アイコンを選択し、ExpressRoute 回線を削除できます。 次の情報をメモしておきます。

  • ExpressRoute 回線からすべての仮想ネットワークのリンクを解除する必要があります。 この操作が失敗した場合は、回線にリンクされている仮想ネットワークがないか確認してください。
  • ExpressRoute 回線サービス プロバイダーのプロビジョニング状態がプロビジョニング中またはプロビジョニング済みの場合、サービス プロバイダー側の回線のプロビジョニングを解除するには、サービス プロバイダーに連絡する必要があります。 Microsoft は、サービス プロバイダーが回線のプロビジョニング解除を完了し、通知するまで、リソースの予約と課金を続行します。
  • サービス プロバイダーが回線のプロビジョニングを解除済み (サービス プロバイダーのプロビジョニング状態が未プロビジョニングに設定されている) の場合、回線を削除することができます。 これによって回線の課金が停止されます。

ExpressRoute 回線は、次の PowerShell コマンドを実行して削除できます。

$circuitName = Read-Host -Prompt "Enter the same circuit name that you used earlier"
$resourceGroupName = "${circuitName}rg"

Remove-AzExpressRouteCircuit -ResourceGroupName $resourceGroupName -Name $circuitName

次のステップ

回線を作成したら、次の手順に移ります。