2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Azure ExpressRoute Gateway の Public IP なしのデプロイ

Posted at

Azure ExpressRoute Gateway の Hosted-On-Behalf-Of (HOBO) Public IP という機能が GA となりました。これを使うことで、Microsoft がパブリック IP を内部的に管理するようになるため、ER Gateway 用のパブリック IP をリソースとして作成する必要がなくなります。
現状、ポータルからは作成できず Powershell から作成する必要があります。デプロイ手順をこちらに簡単にまとめておりますので、ご利用の際の参考になれば幸いです。

利点

  • パブリック IP が内部管理になるため、セキュリティのリスクを減らせる
  • パブリック IP を管理する必要がなくなる
  • デプロイ手順の簡略化

手順

前提

  • あらかじめ仮想ネットワークと GatewaySubnet を作成済みであること
  • Azure Powershell 最新版を導入済みであること (この手順では Az 14.2.0 利用) ※ Azure CLI 2.75.0 ではうまく作成できなかったため、Powershell を使っています。

ER Gateway の作成

Azure Powreshell でログインします。

Connect-AzAccount

Azure のサブスクリプションを指定します。

Set-AzContext -Subscription d8ce2f85-xxxx-xxxx-xxxx-94eba5afa598

仮想ネットワークの情報を取得します。

$vnet = Get-AzVirtualNetwork -Name vnet-001 -ResourceGroupName rg-er-001

GatewaySubnet の情報を取得します。

$subnet = Get-AzVirtualNetworkSubnetConfig -Name 'GatewaySubnet' -VirtualNetwork vnet-001

仮想ネットワークゲートウェイ用の IpConfig の名前を設定します。※-PublicIpAddress のパラメーターは省略します。

$ipconf = New-AzVirtualNetworkGatewayIpConfig -Name gwip01 -Subnet $subnet

仮想ネットワークゲートウェイをデプロイします。45 分ほどかかります。

New-AzVirtualNetworkGateway -Name ERGW1 -ResourceGroupName rg-er-001 -Location JapanEast -IpConfigurations $ipconf -GatewayType Expressroute -GatewaySku ErGW1AZ

デプロイ後、Get-AzVirtualNetworkGateway の結果を見てみましたが、Public IP のパラメーターは見当たりません。

IpConfigurations                : [
                                    {
                                      "PrivateIpAllocationMethod": "Dynamic",
                                      "Subnet": {
                                        "Id":
                                  "/subscriptions/d8ce2f85-xxxx-xxxx-xxxx-94eba5afa598/resourceGroups/rg-er-001/providers/Microsoft.Network/virtualNetworks/vnet-001/subnets/GatewaySubnet"
                                      },
                                      "Name": "gwip",
                                      "Etag": "W/\"71b1eaba-4e31-4065-bdd0-8f4bc9cc017a\"",
                                      "Id":
                                  "/subscriptions/d8ce2f85-xxxx-xxxx-xxxx-94eba5afa598/resourceGroups/rg-er-001/providers/Microsoft.Network/virtualNetworkGateways/ERGW1/ipConfigurations/gwip01"
                                    }
                                  ]

以上、参考になれば幸いです。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?