graphrag-accelerator/infra/core/vnet/vnet-peering.bicep
2024-06-26 15:45:06 -04:00

30 lines
793 B
Bicep

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
param name string
param vnetName string
param remoteVnetId string
param allowVirtualNetworkAccess bool = true
param allowForwardedTraffic bool = false
param allowGatewayTransit bool = false
param useRemoteGateways bool = false
resource vnet 'Microsoft.Network/virtualNetworks@2023-06-01' existing = {
name: vnetName
}
resource vnetPeering 'Microsoft.Network/virtualNetworks/virtualNetworkPeerings@2023-06-01' = {
name: name
parent: vnet
properties: {
remoteVirtualNetwork: {
id: remoteVnetId
}
allowVirtualNetworkAccess: allowVirtualNetworkAccess
allowForwardedTraffic: allowForwardedTraffic
allowGatewayTransit: allowGatewayTransit
useRemoteGateways: useRemoteGateways
}
}