プライベート エンドポイントを使用すると、仮想ネットワーク内のプライベート IP アドレス経由で Elastic SAN ボリューム グループに接続できます。 プライベート エンドポイントを使用する場合、仮想ネットワークと Elastic SAN の間のトラフィックは、パブリック インターネットを通過することなく、Azure のプライベート バックボーンに完全に残ります。 プライベート エンドポイントを構成して承認すると、そのエンドポイントが存在するサブネットへのアクセスが自動的に付与されます。 この構成は、強力なネットワーク分離を提供し、運用環境またはセキュリティに依存するワークロードに最適です。
この記事では、プライベート エンドポイントを使用するように Elastic SAN ボリューム グループを構成する方法について説明します。
[前提条件]
プライベート エンドポイント接続の構成には、次の 2 つのステップが含まれています。
- エンドポイントと関連付けられている接続の作成。
- 接続の承認。
Elastic SAN ボリューム グループのプライベート エンドポイントを作成するには、Elastic SAN ボリューム グループ所有者ロールが必要です。 新しいプライベート エンドポイント接続を承認するには、Azure リソース プロバイダー操作Microsoft.ElasticSan/elasticSans/PrivateEndpointConnectionsApproval/action に対するアクセス許可が必要です。 この操作のアクセス許可は Elastic SAN ネットワーク管理者ロールに含まれていますが、カスタム Azure ロールを介して付与することもできます。
作成と承認に必要なすべてのロールとアクセス許可を持つユーザー アカウントからエンドポイントを作成する場合は、1 つの手順でこれを行うことができます。 それ以外の場合は、2 人の異なるユーザーによる 2 つの個別の手順が必要になります。
プライベート リンクを設定する場合、Elastic SAN と仮想ネットワークは、異なる Microsoft Entra テナントに属するサブスクリプションを含め、さまざまなリソース グループ、リージョン、サブスクリプションに存在する可能性があります。 これらの例では、仮想ネットワークと同じリソース グループにプライベート エンドポイントを作成しています。
ボリューム グループを作成するとき、または既存のボリューム グループを変更するときに、Azure portal でボリューム グループへのプライベート エンドポイント接続を作成できます。 プライベート エンドポイントを作成するには、既存の仮想ネットワークが必要です。
ボリューム グループを作成または変更する場合は、[ネットワーク] を選択した後、[プライベート エンドポイント接続] で [+ プライベート エンドポイントの作成] を選択します。
ポップアップ表示されるメニュー内の値を入力し、アプリケーションが接続に使用する仮想ネットワークとサブネットを選択します。 完了したら、[追加] と [保存] を選択します。
次のスクリプトでは、Elastic SAN ボリューム グループのプライベート エンドポイントを作成します。
RgName、VnetName、SubnetName、EsanName、EsanVgName、PLSvcConnectionName、EndpointName、および Location(Region) の値を独自の値に置き換え、2 つの手順に従っている場合は-ByManualRequestコメントを解除してから、スクリプトを実行します。
その後、必要なすべてのアクセス許可がなく、ネットワーク管理者が接続を承認する必要がある場合は、[ 接続の承認] でもスクリプトを実行してください。
# Set the resource group name.
$RgName = "<ResourceGroupName>"
# Set the virtual network and subnet, which is used when creating the private endpoint.
$VnetName = "<VnetName>"
$SubnetName = "<SubnetName>"
$Vnet = Get-AzVirtualNetwork -Name $VnetName -ResourceGroupName $RgName
$Subnet = $Vnet | Select -ExpandProperty subnets | Where-Object {$_.Name -eq $SubnetName}
# Set the Elastic SAN, which is used when creating the private endpoint service connection.
$EsanName = "<ElasticSanName>"
$EsanVgName = "<ElasticSanVolumeGroupName>"
$Esan = Get-AzElasticSan -Name $EsanName -ResourceGroupName $RgName
# Create the private link service connection, which is input to creating the private endpoint.
$PLSvcConnectionName = "<PrivateLinkSvcConnectionName>"
$EsanPlSvcConn = New-AzPrivateLinkServiceConnection -Name $PLSvcConnectionName -PrivateLinkServiceId $Esan.Id -GroupId $EsanVgName
# Create the private endpoint.
$EndpointName = '<PrivateEndpointName>'
$Location = '<Location>'
$PeArguments = @{
Name = $EndpointName
ResourceGroupName = $RgName
Location = $Location
Subnet = $Subnet
PrivateLinkServiceConnection = $EsanPlSvcConn
}
New-AzPrivateEndpoint @PeArguments # -ByManualRequest # (Uncomment the `-ByManualRequest` parameter if you are using the two-step process).
接続を承認する
2 ステップ プロセスを使っている場合、プライベート リンク サービス接続を承認するには、次のサンプル コードを使います。 次のように前のコード サンプルと同じ変数を使用します。
# Get the private endpoint and associated connection.
$PrivateEndpoint = Get-AzPrivateEndpoint -Name $EndpointName -ResourceGroupName $RgName
$PeConnArguments = @{
ServiceName = $EsanName
ResourceGroupName = $RgName
PrivateLinkResourceType = "Microsoft.ElasticSan/elasticSans"
}
$EndpointConnection = Get-AzPrivateEndpointConnection @PeConnArguments |
Where-Object {($_.PrivateEndpoint.Id -eq $PrivateEndpoint.Id)}
# Approve the private link service connection.
$ApprovalDesc="<ApprovalDesc>"
Approve-AzPrivateEndpointConnection @PeConnArguments -Name $EndpointConnection.Name -Description $ApprovalDesc
# Get the private endpoint connection anew and verify the connection status.
$EndpointConnection = Get-AzPrivateEndpointConnection @PeConnArguments |
Where-Object {($_.PrivateEndpoint.Id -eq $PrivateEndpoint.Id)}
$EndpointConnection.PrivateLinkServiceConnectionState
次のスクリプトでは、Elastic SAN ボリューム グループのプライベート エンドポイントを作成します。 2 ステップのプロセスを使っている場合は、--manual-request パラメーターのコメントを解除します。 すべての変数の例の値を独自の値に置き換えてから、スクリプトを実行します。
その後、必要なすべてのアクセス許可がなく、ネットワーク管理者が接続を承認する必要がある場合は、[ 接続の承認] でもスクリプトを実行してください。
# Define some variables.
# The name of the resource group where the resources are deployed.
RgName="<ResourceGroupName>"
# The name of the subnet from which access to the volume group will be configured.
VnetName="<VnetName>"
# The name of the virtual network that includes the subnet.
SubnetName="<SubnetName>"
# The name of the Elastic SAN that the volume group belongs to.
EsanName="<ElasticSanName>"
# The name of the Elastic SAN Volume Group to which a connection is to be created.
EsanVgName="<ElasticSanVolumeGroupName>"
# The name of the new private endpoint
EndpointName="<PrivateEndpointName>"
# The name of the new private link service connection to the volume group.
PLSvcConnectionName="<PrivateLinkSvcConnectionName>"
# The region where the new private endpoint will be created.
Location="<Location>"
# The description provided for the approval of the private endpoint connection.
ApprovalDesc="<ApprovalDesc>"
# Get the id of the Elastic SAN.
id=$(az elastic-san show \
--elastic-san-name $EsanName \
--resource-group $RgName \
--query 'id' \
--output tsv)
# Create the private endpoint.
az network private-endpoint create \
--connection-name $PLSvcConnectionName \
--name $EndpointName \
--private-connection-resource-id $id \
--resource-group $RgName \
--vnet-name $VnetName \
--subnet $SubnetName \
--location $Location \
--group-id $EsanVgName # --manual-request
# Verify the status of the private endpoint connection.
PLConnectionName=$(az network private-endpoint-connection list \
--name $EsanName \
--resource-group $RgName \
--type Microsoft.ElasticSan/elasticSans \
--query "[?properties.groupIds[0]=='$EsanVgName'].name" -o tsv)
az network private-endpoint-connection show \
--resource-name $EsanName \
--resource-group $RgName \
--type Microsoft.ElasticSan/elasticSans \
--name $PLConnectionName
接続を承認する
2 ステップ プロセスを使っている場合、プライベート リンク サービス接続を承認するには、次のサンプル コードを使います。 次のように前のコード サンプルと同じ変数を使用します。
az network private-endpoint-connection approve \
--resource-name $EsanName \
--resource-group $RgName \
--name $PLConnectionName \
--type Microsoft.ElasticSan/elasticSans \
--description $ApprovalDesc
注
Elastic SAN とプライベート エンドポイントが異なるサブスクリプションにある場合は、プライベート エンドポイントを含むサブスクリプションに Microsoft.ElasticSan リソース プロバイダーを登録します。
この 記事 の手順に従って、プライベート エンドポイントを承認および登録します。
省略可能 - ネットワーク ポリシー
仮想ネットワーク規則は、プライベート エンドポイントには適用されません。 そのため、アクセス規則を調整し、プライベート エンドポイント経由でトラフィックを制御する必要がある場合は、ネットワーク ポリシーを使用します。 既定では、仮想ネットワーク内のサブネットに対してネットワーク ポリシーは無効になっています。 ユーザー定義ルートやネットワーク セキュリティ グループのサポートなどのネットワーク ポリシーを使用するには、サブネットのネットワーク ポリシーのサポートを有効にします。 この設定は、サブネット内のプライベート エンドポイントにのみ適用され、サブネット内のすべてのプライベート エンドポイントに影響します。 サブネット内の他のリソースについては、ネットワーク セキュリティ グループのセキュリティ規則に基づいてアクセスが制御されます。 詳細については、「 ネットワーク ポリシー」を参照してください。
目的のエンドポイントを有効にしたら、適切な Elastic SAN ボリュームに接続するようにクライアントを構成する準備が整います。
仮想マシン (VM) と Elastic SAN ボリュームの間の接続が失われた場合、接続は終了するまで 90 秒間再試行されます。 Elastic SAN ボリュームへの接続が失われると、VM は再起動されません。
次のステップ