We recommend using Azure Native.
Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi
azure.network.getVirtualHubConnection
Explore with Pulumi AI
Uses this data source to access information about an existing Virtual Hub Connection.
Virtual Hub Connection Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.network.getVirtualHubConnection({
name: "example-connection",
resourceGroupName: "example-resources",
virtualHubName: "example-hub-name",
});
export const virtualHubConnectionId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.network.get_virtual_hub_connection(name="example-connection",
resource_group_name="example-resources",
virtual_hub_name="example-hub-name")
pulumi.export("virtualHubConnectionId", example.id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := network.LookupVirtualHubConnection(ctx, &network.LookupVirtualHubConnectionArgs{
Name: "example-connection",
ResourceGroupName: "example-resources",
VirtualHubName: "example-hub-name",
}, nil)
if err != nil {
return err
}
ctx.Export("virtualHubConnectionId", example.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Network.GetVirtualHubConnection.Invoke(new()
{
Name = "example-connection",
ResourceGroupName = "example-resources",
VirtualHubName = "example-hub-name",
});
return new Dictionary<string, object?>
{
["virtualHubConnectionId"] = example.Apply(getVirtualHubConnectionResult => getVirtualHubConnectionResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetVirtualHubConnectionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = NetworkFunctions.getVirtualHubConnection(GetVirtualHubConnectionArgs.builder()
.name("example-connection")
.resourceGroupName("example-resources")
.virtualHubName("example-hub-name")
.build());
ctx.export("virtualHubConnectionId", example.applyValue(getVirtualHubConnectionResult -> getVirtualHubConnectionResult.id()));
}
}
variables:
example:
fn::invoke:
function: azure:network:getVirtualHubConnection
arguments:
name: example-connection
resourceGroupName: example-resources
virtualHubName: example-hub-name
outputs:
virtualHubConnectionId: ${example.id}
Using getVirtualHubConnection
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 getVirtualHubConnection(args: GetVirtualHubConnectionArgs, opts?: InvokeOptions): Promise<GetVirtualHubConnectionResult>
function getVirtualHubConnectionOutput(args: GetVirtualHubConnectionOutputArgs, opts?: InvokeOptions): Output<GetVirtualHubConnectionResult>
def get_virtual_hub_connection(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
virtual_hub_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVirtualHubConnectionResult
def get_virtual_hub_connection_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
virtual_hub_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVirtualHubConnectionResult]
func LookupVirtualHubConnection(ctx *Context, args *LookupVirtualHubConnectionArgs, opts ...InvokeOption) (*LookupVirtualHubConnectionResult, error)
func LookupVirtualHubConnectionOutput(ctx *Context, args *LookupVirtualHubConnectionOutputArgs, opts ...InvokeOption) LookupVirtualHubConnectionResultOutput
> Note: This function is named LookupVirtualHubConnection
in the Go SDK.
public static class GetVirtualHubConnection
{
public static Task<GetVirtualHubConnectionResult> InvokeAsync(GetVirtualHubConnectionArgs args, InvokeOptions? opts = null)
public static Output<GetVirtualHubConnectionResult> Invoke(GetVirtualHubConnectionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVirtualHubConnectionResult> getVirtualHubConnection(GetVirtualHubConnectionArgs args, InvokeOptions options)
public static Output<GetVirtualHubConnectionResult> getVirtualHubConnection(GetVirtualHubConnectionArgs args, InvokeOptions options)
fn::invoke:
function: azure:network/getVirtualHubConnection:getVirtualHubConnection
arguments:
# arguments dictionary
The following arguments are supported:
- Name
This property is required. string - The name of the Connection which should be retrieved.
- Resource
Group Name This property is required. string - The Name of the Resource Group where the Virtual Hub Connection exists.
- Virtual
Hub Name This property is required. string - The name of the Virtual Hub where this Connection exists.
- Name
This property is required. string - The name of the Connection which should be retrieved.
- Resource
Group Name This property is required. string - The Name of the Resource Group where the Virtual Hub Connection exists.
- Virtual
Hub Name This property is required. string - The name of the Virtual Hub where this Connection exists.
- name
This property is required. String - The name of the Connection which should be retrieved.
- resource
Group Name This property is required. String - The Name of the Resource Group where the Virtual Hub Connection exists.
- virtual
Hub Name This property is required. String - The name of the Virtual Hub where this Connection exists.
- name
This property is required. string - The name of the Connection which should be retrieved.
- resource
Group Name This property is required. string - The Name of the Resource Group where the Virtual Hub Connection exists.
- virtual
Hub Name This property is required. string - The name of the Virtual Hub where this Connection exists.
- name
This property is required. str - The name of the Connection which should be retrieved.
- resource_
group_ name This property is required. str - The Name of the Resource Group where the Virtual Hub Connection exists.
- virtual_
hub_ name This property is required. str - The name of the Virtual Hub where this Connection exists.
- name
This property is required. String - The name of the Connection which should be retrieved.
- resource
Group Name This property is required. String - The Name of the Resource Group where the Virtual Hub Connection exists.
- virtual
Hub Name This property is required. String - The name of the Virtual Hub where this Connection exists.
getVirtualHubConnection Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Internet
Security boolEnabled - Whether Internet Security is enabled to secure internet traffic on this connection
- Name string
- The name which is used for this Static Route.
- Remote
Virtual stringNetwork Id - The ID of the Virtual Network which the Virtual Hub is connected
- Resource
Group stringName - Routings
List<Get
Virtual Hub Connection Routing> - A
routing
block as defined below. - Virtual
Hub stringId - The ID of the Virtual Hub within which this connection is created
- Virtual
Hub stringName
- Id string
- The provider-assigned unique ID for this managed resource.
- Internet
Security boolEnabled - Whether Internet Security is enabled to secure internet traffic on this connection
- Name string
- The name which is used for this Static Route.
- Remote
Virtual stringNetwork Id - The ID of the Virtual Network which the Virtual Hub is connected
- Resource
Group stringName - Routings
[]Get
Virtual Hub Connection Routing - A
routing
block as defined below. - Virtual
Hub stringId - The ID of the Virtual Hub within which this connection is created
- Virtual
Hub stringName
- id String
- The provider-assigned unique ID for this managed resource.
- internet
Security BooleanEnabled - Whether Internet Security is enabled to secure internet traffic on this connection
- name String
- The name which is used for this Static Route.
- remote
Virtual StringNetwork Id - The ID of the Virtual Network which the Virtual Hub is connected
- resource
Group StringName - routings
List<Get
Virtual Hub Connection Routing> - A
routing
block as defined below. - virtual
Hub StringId - The ID of the Virtual Hub within which this connection is created
- virtual
Hub StringName
- id string
- The provider-assigned unique ID for this managed resource.
- internet
Security booleanEnabled - Whether Internet Security is enabled to secure internet traffic on this connection
- name string
- The name which is used for this Static Route.
- remote
Virtual stringNetwork Id - The ID of the Virtual Network which the Virtual Hub is connected
- resource
Group stringName - routings
Get
Virtual Hub Connection Routing[] - A
routing
block as defined below. - virtual
Hub stringId - The ID of the Virtual Hub within which this connection is created
- virtual
Hub stringName
- id str
- The provider-assigned unique ID for this managed resource.
- internet_
security_ boolenabled - Whether Internet Security is enabled to secure internet traffic on this connection
- name str
- The name which is used for this Static Route.
- remote_
virtual_ strnetwork_ id - The ID of the Virtual Network which the Virtual Hub is connected
- resource_
group_ strname - routings
Sequence[Get
Virtual Hub Connection Routing] - A
routing
block as defined below. - virtual_
hub_ strid - The ID of the Virtual Hub within which this connection is created
- virtual_
hub_ strname
- id String
- The provider-assigned unique ID for this managed resource.
- internet
Security BooleanEnabled - Whether Internet Security is enabled to secure internet traffic on this connection
- name String
- The name which is used for this Static Route.
- remote
Virtual StringNetwork Id - The ID of the Virtual Network which the Virtual Hub is connected
- resource
Group StringName - routings List<Property Map>
- A
routing
block as defined below. - virtual
Hub StringId - The ID of the Virtual Hub within which this connection is created
- virtual
Hub StringName
Supporting Types
GetVirtualHubConnectionRouting
- Associated
Route Table Id This property is required. string - The ID of the route table associated with this Virtual Hub connection.
- Inbound
Route Map Id This property is required. string - The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
- Outbound
Route Map Id This property is required. string - The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
- Propagated
Route Tables This property is required. List<GetVirtual Hub Connection Routing Propagated Route Table> - A
propagated_route_table
block as defined below. - Static
Vnet Local Route Override Criteria This property is required. string - The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet.
- Static
Vnet Propagate Static Routes Enabled This property is required. bool - Whether the static routes should be propagated to the Virtual Hub or not.
- Static
Vnet Routes This property is required. List<GetVirtual Hub Connection Routing Static Vnet Route> - A
static_vnet_route
block as defined below.
- Associated
Route Table Id This property is required. string - The ID of the route table associated with this Virtual Hub connection.
- Inbound
Route Map Id This property is required. string - The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
- Outbound
Route Map Id This property is required. string - The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
- Propagated
Route Tables This property is required. []GetVirtual Hub Connection Routing Propagated Route Table - A
propagated_route_table
block as defined below. - Static
Vnet Local Route Override Criteria This property is required. string - The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet.
- Static
Vnet Propagate Static Routes Enabled This property is required. bool - Whether the static routes should be propagated to the Virtual Hub or not.
- Static
Vnet Routes This property is required. []GetVirtual Hub Connection Routing Static Vnet Route - A
static_vnet_route
block as defined below.
- associated
Route Table Id This property is required. String - The ID of the route table associated with this Virtual Hub connection.
- inbound
Route Map Id This property is required. String - The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
- outbound
Route Map Id This property is required. String - The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
- propagated
Route Tables This property is required. List<GetVirtual Hub Connection Routing Propagated Route Table> - A
propagated_route_table
block as defined below. - static
Vnet Local Route Override Criteria This property is required. String - The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet.
- static
Vnet Propagate Static Routes Enabled This property is required. Boolean - Whether the static routes should be propagated to the Virtual Hub or not.
- static
Vnet Routes This property is required. List<GetVirtual Hub Connection Routing Static Vnet Route> - A
static_vnet_route
block as defined below.
- associated
Route Table Id This property is required. string - The ID of the route table associated with this Virtual Hub connection.
- inbound
Route Map Id This property is required. string - The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
- outbound
Route Map Id This property is required. string - The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
- propagated
Route Tables This property is required. GetVirtual Hub Connection Routing Propagated Route Table[] - A
propagated_route_table
block as defined below. - static
Vnet Local Route Override Criteria This property is required. string - The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet.
- static
Vnet Propagate Static Routes Enabled This property is required. boolean - Whether the static routes should be propagated to the Virtual Hub or not.
- static
Vnet Routes This property is required. GetVirtual Hub Connection Routing Static Vnet Route[] - A
static_vnet_route
block as defined below.
- associated_
route_ table_ id This property is required. str - The ID of the route table associated with this Virtual Hub connection.
- inbound_
route_ map_ id This property is required. str - The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
- outbound_
route_ map_ id This property is required. str - The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
- propagated_
route_ tables This property is required. Sequence[GetVirtual Hub Connection Routing Propagated Route Table] - A
propagated_route_table
block as defined below. - static_
vnet_ local_ route_ override_ criteria This property is required. str - The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet.
- static_
vnet_ propagate_ static_ routes_ enabled This property is required. bool - Whether the static routes should be propagated to the Virtual Hub or not.
- static_
vnet_ routes This property is required. Sequence[GetVirtual Hub Connection Routing Static Vnet Route] - A
static_vnet_route
block as defined below.
- associated
Route Table Id This property is required. String - The ID of the route table associated with this Virtual Hub connection.
- inbound
Route Map Id This property is required. String - The ID of the Route Map associated with this Routing Configuration for inbound learned routes.
- outbound
Route Map Id This property is required. String - The ID of the Route Map associated with this Routing Configuration for outbound advertised routes.
- propagated
Route Tables This property is required. List<Property Map> - A
propagated_route_table
block as defined below. - static
Vnet Local Route Override Criteria This property is required. String - The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet.
- static
Vnet Propagate Static Routes Enabled This property is required. Boolean - Whether the static routes should be propagated to the Virtual Hub or not.
- static
Vnet Routes This property is required. List<Property Map> - A
static_vnet_route
block as defined below.
GetVirtualHubConnectionRoutingPropagatedRouteTable
- Labels
This property is required. List<string> - The list of labels assigned to this route table.
- Route
Table Ids This property is required. List<string> - A list of Route Table IDs associated with this Virtual Hub Connection.
- Labels
This property is required. []string - The list of labels assigned to this route table.
- Route
Table Ids This property is required. []string - A list of Route Table IDs associated with this Virtual Hub Connection.
- labels
This property is required. List<String> - The list of labels assigned to this route table.
- route
Table Ids This property is required. List<String> - A list of Route Table IDs associated with this Virtual Hub Connection.
- labels
This property is required. string[] - The list of labels assigned to this route table.
- route
Table Ids This property is required. string[] - A list of Route Table IDs associated with this Virtual Hub Connection.
- labels
This property is required. Sequence[str] - The list of labels assigned to this route table.
- route_
table_ ids This property is required. Sequence[str] - A list of Route Table IDs associated with this Virtual Hub Connection.
- labels
This property is required. List<String> - The list of labels assigned to this route table.
- route
Table Ids This property is required. List<String> - A list of Route Table IDs associated with this Virtual Hub Connection.
GetVirtualHubConnectionRoutingStaticVnetRoute
- Address
Prefixes This property is required. List<string> - A list of CIDR Ranges which is used as Address Prefixes.
- Name
This property is required. string - The name of the Connection which should be retrieved.
- Next
Hop Ip Address This property is required. string - The IP Address which is used for the Next Hop.
- Address
Prefixes This property is required. []string - A list of CIDR Ranges which is used as Address Prefixes.
- Name
This property is required. string - The name of the Connection which should be retrieved.
- Next
Hop Ip Address This property is required. string - The IP Address which is used for the Next Hop.
- address
Prefixes This property is required. List<String> - A list of CIDR Ranges which is used as Address Prefixes.
- name
This property is required. String - The name of the Connection which should be retrieved.
- next
Hop Ip Address This property is required. String - The IP Address which is used for the Next Hop.
- address
Prefixes This property is required. string[] - A list of CIDR Ranges which is used as Address Prefixes.
- name
This property is required. string - The name of the Connection which should be retrieved.
- next
Hop Ip Address This property is required. string - The IP Address which is used for the Next Hop.
- address_
prefixes This property is required. Sequence[str] - A list of CIDR Ranges which is used as Address Prefixes.
- name
This property is required. str - The name of the Connection which should be retrieved.
- next_
hop_ ip_ address This property is required. str - The IP Address which is used for the Next Hop.
- address
Prefixes This property is required. List<String> - A list of CIDR Ranges which is used as Address Prefixes.
- name
This property is required. String - The name of the Connection which should be retrieved.
- next
Hop Ip Address This property is required. String - The IP Address which is used for the Next Hop.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.