This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi
azure-native.network.getVirtualNetworkPeering
Explore with Pulumi AI
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi
Gets the specified virtual network peering. Azure REST API version: 2023-02-01.
Other available API versions: 2019-06-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-05-01.
Using getVirtualNetworkPeering
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getVirtualNetworkPeering(args: GetVirtualNetworkPeeringArgs, opts?: InvokeOptions): Promise<GetVirtualNetworkPeeringResult>
function getVirtualNetworkPeeringOutput(args: GetVirtualNetworkPeeringOutputArgs, opts?: InvokeOptions): Output<GetVirtualNetworkPeeringResult>def get_virtual_network_peering(resource_group_name: Optional[str] = None,
                                virtual_network_name: Optional[str] = None,
                                virtual_network_peering_name: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetVirtualNetworkPeeringResult
def get_virtual_network_peering_output(resource_group_name: Optional[pulumi.Input[str]] = None,
                                virtual_network_name: Optional[pulumi.Input[str]] = None,
                                virtual_network_peering_name: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetVirtualNetworkPeeringResult]func LookupVirtualNetworkPeering(ctx *Context, args *LookupVirtualNetworkPeeringArgs, opts ...InvokeOption) (*LookupVirtualNetworkPeeringResult, error)
func LookupVirtualNetworkPeeringOutput(ctx *Context, args *LookupVirtualNetworkPeeringOutputArgs, opts ...InvokeOption) LookupVirtualNetworkPeeringResultOutput> Note: This function is named LookupVirtualNetworkPeering in the Go SDK.
public static class GetVirtualNetworkPeering 
{
    public static Task<GetVirtualNetworkPeeringResult> InvokeAsync(GetVirtualNetworkPeeringArgs args, InvokeOptions? opts = null)
    public static Output<GetVirtualNetworkPeeringResult> Invoke(GetVirtualNetworkPeeringInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVirtualNetworkPeeringResult> getVirtualNetworkPeering(GetVirtualNetworkPeeringArgs args, InvokeOptions options)
public static Output<GetVirtualNetworkPeeringResult> getVirtualNetworkPeering(GetVirtualNetworkPeeringArgs args, InvokeOptions options)
fn::invoke:
  function: azure-native:network:getVirtualNetworkPeering
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ResourceGroup stringName 
- The name of the resource group.
- VirtualNetwork stringName 
- The name of the virtual network.
- VirtualNetwork stringPeering Name 
- The name of the virtual network peering.
- ResourceGroup stringName 
- The name of the resource group.
- VirtualNetwork stringName 
- The name of the virtual network.
- VirtualNetwork stringPeering Name 
- The name of the virtual network peering.
- resourceGroup StringName 
- The name of the resource group.
- virtualNetwork StringName 
- The name of the virtual network.
- virtualNetwork StringPeering Name 
- The name of the virtual network peering.
- resourceGroup stringName 
- The name of the resource group.
- virtualNetwork stringName 
- The name of the virtual network.
- virtualNetwork stringPeering Name 
- The name of the virtual network peering.
- resource_group_ strname 
- The name of the resource group.
- virtual_network_ strname 
- The name of the virtual network.
- virtual_network_ strpeering_ name 
- The name of the virtual network peering.
- resourceGroup StringName 
- The name of the resource group.
- virtualNetwork StringName 
- The name of the virtual network.
- virtualNetwork StringPeering Name 
- The name of the virtual network peering.
getVirtualNetworkPeering Result
The following output properties are available:
- Etag string
- A unique read-only string that changes whenever the resource is updated.
- ProvisioningState string
- The provisioning state of the virtual network peering resource.
- RemoteVirtual Pulumi.Network Encryption Azure Native. Network. Outputs. Virtual Network Encryption Response 
- The reference to the remote virtual network's encryption
- ResourceGuid string
- The resourceGuid property of the Virtual Network peering resource.
- AllowForwarded boolTraffic 
- Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
- AllowGateway boolTransit 
- If gateway links can be used in remote virtual networking to link to this virtual network.
- AllowVirtual boolNetwork Access 
- Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
- DoNot boolVerify Remote Gateways 
- If we need to verify the provisioning state of the remote gateway.
- Id string
- Resource ID.
- Name string
- The name of the resource that is unique within a resource group. This name can be used to access the resource.
- PeeringState string
- The status of the virtual network peering.
- PeeringSync stringLevel 
- The peering sync status of the virtual network peering.
- RemoteAddress Pulumi.Space Azure Native. Network. Outputs. Address Space Response 
- The reference to the address space peered with the remote virtual network.
- RemoteBgp Pulumi.Communities Azure Native. Network. Outputs. Virtual Network Bgp Communities Response 
- The reference to the remote virtual network's Bgp Communities.
- RemoteVirtual Pulumi.Network Azure Native. Network. Outputs. Sub Resource Response 
- The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
- RemoteVirtual Pulumi.Network Address Space Azure Native. Network. Outputs. Address Space Response 
- The reference to the current address space of the remote virtual network.
- Type string
- Resource type.
- UseRemote boolGateways 
- If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
- Etag string
- A unique read-only string that changes whenever the resource is updated.
- ProvisioningState string
- The provisioning state of the virtual network peering resource.
- RemoteVirtual VirtualNetwork Encryption Network Encryption Response 
- The reference to the remote virtual network's encryption
- ResourceGuid string
- The resourceGuid property of the Virtual Network peering resource.
- AllowForwarded boolTraffic 
- Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
- AllowGateway boolTransit 
- If gateway links can be used in remote virtual networking to link to this virtual network.
- AllowVirtual boolNetwork Access 
- Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
- DoNot boolVerify Remote Gateways 
- If we need to verify the provisioning state of the remote gateway.
- Id string
- Resource ID.
- Name string
- The name of the resource that is unique within a resource group. This name can be used to access the resource.
- PeeringState string
- The status of the virtual network peering.
- PeeringSync stringLevel 
- The peering sync status of the virtual network peering.
- RemoteAddress AddressSpace Space Response 
- The reference to the address space peered with the remote virtual network.
- RemoteBgp VirtualCommunities Network Bgp Communities Response 
- The reference to the remote virtual network's Bgp Communities.
- RemoteVirtual SubNetwork Resource Response 
- The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
- RemoteVirtual AddressNetwork Address Space Space Response 
- The reference to the current address space of the remote virtual network.
- Type string
- Resource type.
- UseRemote boolGateways 
- If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
- etag String
- A unique read-only string that changes whenever the resource is updated.
- provisioningState String
- The provisioning state of the virtual network peering resource.
- remoteVirtual VirtualNetwork Encryption Network Encryption Response 
- The reference to the remote virtual network's encryption
- resourceGuid String
- The resourceGuid property of the Virtual Network peering resource.
- allowForwarded BooleanTraffic 
- Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
- allowGateway BooleanTransit 
- If gateway links can be used in remote virtual networking to link to this virtual network.
- allowVirtual BooleanNetwork Access 
- Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
- doNot BooleanVerify Remote Gateways 
- If we need to verify the provisioning state of the remote gateway.
- id String
- Resource ID.
- name String
- The name of the resource that is unique within a resource group. This name can be used to access the resource.
- peeringState String
- The status of the virtual network peering.
- peeringSync StringLevel 
- The peering sync status of the virtual network peering.
- remoteAddress AddressSpace Space Response 
- The reference to the address space peered with the remote virtual network.
- remoteBgp VirtualCommunities Network Bgp Communities Response 
- The reference to the remote virtual network's Bgp Communities.
- remoteVirtual SubNetwork Resource Response 
- The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
- remoteVirtual AddressNetwork Address Space Space Response 
- The reference to the current address space of the remote virtual network.
- type String
- Resource type.
- useRemote BooleanGateways 
- If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
- etag string
- A unique read-only string that changes whenever the resource is updated.
- provisioningState string
- The provisioning state of the virtual network peering resource.
- remoteVirtual VirtualNetwork Encryption Network Encryption Response 
- The reference to the remote virtual network's encryption
- resourceGuid string
- The resourceGuid property of the Virtual Network peering resource.
- allowForwarded booleanTraffic 
- Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
- allowGateway booleanTransit 
- If gateway links can be used in remote virtual networking to link to this virtual network.
- allowVirtual booleanNetwork Access 
- Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
- doNot booleanVerify Remote Gateways 
- If we need to verify the provisioning state of the remote gateway.
- id string
- Resource ID.
- name string
- The name of the resource that is unique within a resource group. This name can be used to access the resource.
- peeringState string
- The status of the virtual network peering.
- peeringSync stringLevel 
- The peering sync status of the virtual network peering.
- remoteAddress AddressSpace Space Response 
- The reference to the address space peered with the remote virtual network.
- remoteBgp VirtualCommunities Network Bgp Communities Response 
- The reference to the remote virtual network's Bgp Communities.
- remoteVirtual SubNetwork Resource Response 
- The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
- remoteVirtual AddressNetwork Address Space Space Response 
- The reference to the current address space of the remote virtual network.
- type string
- Resource type.
- useRemote booleanGateways 
- If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
- etag str
- A unique read-only string that changes whenever the resource is updated.
- provisioning_state str
- The provisioning state of the virtual network peering resource.
- remote_virtual_ Virtualnetwork_ encryption Network Encryption Response 
- The reference to the remote virtual network's encryption
- resource_guid str
- The resourceGuid property of the Virtual Network peering resource.
- allow_forwarded_ booltraffic 
- Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
- allow_gateway_ booltransit 
- If gateway links can be used in remote virtual networking to link to this virtual network.
- allow_virtual_ boolnetwork_ access 
- Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
- do_not_ boolverify_ remote_ gateways 
- If we need to verify the provisioning state of the remote gateway.
- id str
- Resource ID.
- name str
- The name of the resource that is unique within a resource group. This name can be used to access the resource.
- peering_state str
- The status of the virtual network peering.
- peering_sync_ strlevel 
- The peering sync status of the virtual network peering.
- remote_address_ Addressspace Space Response 
- The reference to the address space peered with the remote virtual network.
- remote_bgp_ Virtualcommunities Network Bgp Communities Response 
- The reference to the remote virtual network's Bgp Communities.
- remote_virtual_ Subnetwork Resource Response 
- The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
- remote_virtual_ Addressnetwork_ address_ space Space Response 
- The reference to the current address space of the remote virtual network.
- type str
- Resource type.
- use_remote_ boolgateways 
- If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
- etag String
- A unique read-only string that changes whenever the resource is updated.
- provisioningState String
- The provisioning state of the virtual network peering resource.
- remoteVirtual Property MapNetwork Encryption 
- The reference to the remote virtual network's encryption
- resourceGuid String
- The resourceGuid property of the Virtual Network peering resource.
- allowForwarded BooleanTraffic 
- Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
- allowGateway BooleanTransit 
- If gateway links can be used in remote virtual networking to link to this virtual network.
- allowVirtual BooleanNetwork Access 
- Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
- doNot BooleanVerify Remote Gateways 
- If we need to verify the provisioning state of the remote gateway.
- id String
- Resource ID.
- name String
- The name of the resource that is unique within a resource group. This name can be used to access the resource.
- peeringState String
- The status of the virtual network peering.
- peeringSync StringLevel 
- The peering sync status of the virtual network peering.
- remoteAddress Property MapSpace 
- The reference to the address space peered with the remote virtual network.
- remoteBgp Property MapCommunities 
- The reference to the remote virtual network's Bgp Communities.
- remoteVirtual Property MapNetwork 
- The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
- remoteVirtual Property MapNetwork Address Space 
- The reference to the current address space of the remote virtual network.
- type String
- Resource type.
- useRemote BooleanGateways 
- If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
Supporting Types
AddressSpaceResponse  
- AddressPrefixes List<string>
- A list of address blocks reserved for this virtual network in CIDR notation.
- AddressPrefixes []string
- A list of address blocks reserved for this virtual network in CIDR notation.
- addressPrefixes List<String>
- A list of address blocks reserved for this virtual network in CIDR notation.
- addressPrefixes string[]
- A list of address blocks reserved for this virtual network in CIDR notation.
- address_prefixes Sequence[str]
- A list of address blocks reserved for this virtual network in CIDR notation.
- addressPrefixes List<String>
- A list of address blocks reserved for this virtual network in CIDR notation.
SubResourceResponse  
- Id string
- Resource ID.
- Id string
- Resource ID.
- id String
- Resource ID.
- id string
- Resource ID.
- id str
- Resource ID.
- id String
- Resource ID.
VirtualNetworkBgpCommunitiesResponse    
- RegionalCommunity string
- The BGP community associated with the region of the virtual network.
- VirtualNetwork stringCommunity 
- The BGP community associated with the virtual network.
- RegionalCommunity string
- The BGP community associated with the region of the virtual network.
- VirtualNetwork stringCommunity 
- The BGP community associated with the virtual network.
- regionalCommunity String
- The BGP community associated with the region of the virtual network.
- virtualNetwork StringCommunity 
- The BGP community associated with the virtual network.
- regionalCommunity string
- The BGP community associated with the region of the virtual network.
- virtualNetwork stringCommunity 
- The BGP community associated with the virtual network.
- regional_community str
- The BGP community associated with the region of the virtual network.
- virtual_network_ strcommunity 
- The BGP community associated with the virtual network.
- regionalCommunity String
- The BGP community associated with the region of the virtual network.
- virtualNetwork StringCommunity 
- The BGP community associated with the virtual network.
VirtualNetworkEncryptionResponse   
- Enabled bool
- Indicates if encryption is enabled on the virtual network.
- Enforcement string
- If the encrypted VNet allows VM that does not support encryption
- Enabled bool
- Indicates if encryption is enabled on the virtual network.
- Enforcement string
- If the encrypted VNet allows VM that does not support encryption
- enabled Boolean
- Indicates if encryption is enabled on the virtual network.
- enforcement String
- If the encrypted VNet allows VM that does not support encryption
- enabled boolean
- Indicates if encryption is enabled on the virtual network.
- enforcement string
- If the encrypted VNet allows VM that does not support encryption
- enabled bool
- Indicates if encryption is enabled on the virtual network.
- enforcement str
- If the encrypted VNet allows VM that does not support encryption
- enabled Boolean
- Indicates if encryption is enabled on the virtual network.
- enforcement String
- If the encrypted VNet allows VM that does not support encryption
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi