VirtualHubConnection
Manages a Connection for a Virtual Hub.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new Azure.Network.VirtualNetworkArgs
{
AddressSpaces =
{
"172.0.0.0/16",
},
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
});
var test = new Azure.Network.VirtualWan("test", new Azure.Network.VirtualWanArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
});
var exampleVirtualHub = new Azure.Network.VirtualHub("exampleVirtualHub", new Azure.Network.VirtualHubArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
VirtualWanId = azurerm_virtual_wan.Example.Id,
AddressPrefix = "10.0.1.0/24",
});
var exampleVirtualHubConnection = new Azure.Network.VirtualHubConnection("exampleVirtualHubConnection", new Azure.Network.VirtualHubConnectionArgs
{
VirtualHubId = exampleVirtualHub.Id,
RemoteVirtualNetworkId = exampleVirtualNetwork.Id,
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
AddressSpaces: pulumi.StringArray{
pulumi.String("172.0.0.0/16"),
},
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
})
if err != nil {
return err
}
_, err = network.NewVirtualWan(ctx, "test", &network.VirtualWanArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
})
if err != nil {
return err
}
exampleVirtualHub, err := network.NewVirtualHub(ctx, "exampleVirtualHub", &network.VirtualHubArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
VirtualWanId: pulumi.String(azurerm_virtual_wan.Example.Id),
AddressPrefix: pulumi.String("10.0.1.0/24"),
})
if err != nil {
return err
}
_, err = network.NewVirtualHubConnection(ctx, "exampleVirtualHubConnection", &network.VirtualHubConnectionArgs{
VirtualHubId: exampleVirtualHub.ID(),
RemoteVirtualNetworkId: exampleVirtualNetwork.ID(),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
address_spaces=["172.0.0.0/16"],
location=example_resource_group.location,
resource_group_name=example_resource_group.name)
test = azure.network.VirtualWan("test",
resource_group_name=example_resource_group.name,
location=example_resource_group.location)
example_virtual_hub = azure.network.VirtualHub("exampleVirtualHub",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
virtual_wan_id=azurerm_virtual_wan["example"]["id"],
address_prefix="10.0.1.0/24")
example_virtual_hub_connection = azure.network.VirtualHubConnection("exampleVirtualHubConnection",
virtual_hub_id=example_virtual_hub.id,
remote_virtual_network_id=example_virtual_network.id)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
addressSpaces: ["172.0.0.0/16"],
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
});
const test = new azure.network.VirtualWan("test", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
});
const exampleVirtualHub = new azure.network.VirtualHub("exampleVirtualHub", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
virtualWanId: azurerm_virtual_wan.example.id,
addressPrefix: "10.0.1.0/24",
});
const exampleVirtualHubConnection = new azure.network.VirtualHubConnection("exampleVirtualHubConnection", {
virtualHubId: exampleVirtualHub.id,
remoteVirtualNetworkId: exampleVirtualNetwork.id,
});Create a VirtualHubConnection Resource
new VirtualHubConnection(name: string, args: VirtualHubConnectionArgs, opts?: CustomResourceOptions);def VirtualHubConnection(resource_name, opts=None, hub_to_vitual_network_traffic_allowed=None, internet_security_enabled=None, name=None, remote_virtual_network_id=None, virtual_hub_id=None, vitual_network_to_hub_gateways_traffic_allowed=None, __props__=None);func NewVirtualHubConnection(ctx *Context, name string, args VirtualHubConnectionArgs, opts ...ResourceOption) (*VirtualHubConnection, error)public VirtualHubConnection(string name, VirtualHubConnectionArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args VirtualHubConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VirtualHubConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VirtualHubConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
VirtualHubConnection Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The VirtualHubConnection resource accepts the following input properties:
- Remote
Virtual stringNetwork Id The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created.
- Virtual
Hub stringId The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created.
- Hub
To boolVitual Network Traffic Allowed Is the Virtual Hub traffic allowed to transit via the Remote Virtual Network? Changing this forces a new resource to be created.
- Internet
Security boolEnabled Should Internet Security be enabled to secure internet traffic? Changing this forces a new resource to be created.
- Name string
The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created.
- Vitual
Network boolTo Hub Gateways Traffic Allowed Is Remote Virtual Network traffic allowed to transit the Hub’s Virtual Network Gateway’s? Changing this forces a new resource to be created.
- Remote
Virtual stringNetwork Id The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created.
- Virtual
Hub stringId The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created.
- Hub
To boolVitual Network Traffic Allowed Is the Virtual Hub traffic allowed to transit via the Remote Virtual Network? Changing this forces a new resource to be created.
- Internet
Security boolEnabled Should Internet Security be enabled to secure internet traffic? Changing this forces a new resource to be created.
- Name string
The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created.
- Vitual
Network boolTo Hub Gateways Traffic Allowed Is Remote Virtual Network traffic allowed to transit the Hub’s Virtual Network Gateway’s? Changing this forces a new resource to be created.
- remote
Virtual stringNetwork Id The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created.
- virtual
Hub stringId The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created.
- hub
To booleanVitual Network Traffic Allowed Is the Virtual Hub traffic allowed to transit via the Remote Virtual Network? Changing this forces a new resource to be created.
- internet
Security booleanEnabled Should Internet Security be enabled to secure internet traffic? Changing this forces a new resource to be created.
- name string
The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created.
- vitual
Network booleanTo Hub Gateways Traffic Allowed Is Remote Virtual Network traffic allowed to transit the Hub’s Virtual Network Gateway’s? Changing this forces a new resource to be created.
- remote_
virtual_ strnetwork_ id The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created.
- virtual_
hub_ strid The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created.
- hub_
to_ boolvitual_ network_ traffic_ allowed Is the Virtual Hub traffic allowed to transit via the Remote Virtual Network? Changing this forces a new resource to be created.
- internet_
security_ boolenabled Should Internet Security be enabled to secure internet traffic? Changing this forces a new resource to be created.
- name str
The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created.
- vitual_
network_ boolto_ hub_ gateways_ traffic_ allowed Is Remote Virtual Network traffic allowed to transit the Hub’s Virtual Network Gateway’s? Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the VirtualHubConnection resource produces the following output properties:
Look up an Existing VirtualHubConnection Resource
Get an existing VirtualHubConnection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VirtualHubConnectionState, opts?: CustomResourceOptions): VirtualHubConnectionstatic get(resource_name, id, opts=None, hub_to_vitual_network_traffic_allowed=None, internet_security_enabled=None, name=None, remote_virtual_network_id=None, virtual_hub_id=None, vitual_network_to_hub_gateways_traffic_allowed=None, __props__=None);func GetVirtualHubConnection(ctx *Context, name string, id IDInput, state *VirtualHubConnectionState, opts ...ResourceOption) (*VirtualHubConnection, error)public static VirtualHubConnection Get(string name, Input<string> id, VirtualHubConnectionState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Hub
To boolVitual Network Traffic Allowed Is the Virtual Hub traffic allowed to transit via the Remote Virtual Network? Changing this forces a new resource to be created.
- Internet
Security boolEnabled Should Internet Security be enabled to secure internet traffic? Changing this forces a new resource to be created.
- Name string
The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created.
- Remote
Virtual stringNetwork Id The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created.
- Virtual
Hub stringId The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created.
- Vitual
Network boolTo Hub Gateways Traffic Allowed Is Remote Virtual Network traffic allowed to transit the Hub’s Virtual Network Gateway’s? Changing this forces a new resource to be created.
- Hub
To boolVitual Network Traffic Allowed Is the Virtual Hub traffic allowed to transit via the Remote Virtual Network? Changing this forces a new resource to be created.
- Internet
Security boolEnabled Should Internet Security be enabled to secure internet traffic? Changing this forces a new resource to be created.
- Name string
The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created.
- Remote
Virtual stringNetwork Id The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created.
- Virtual
Hub stringId The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created.
- Vitual
Network boolTo Hub Gateways Traffic Allowed Is Remote Virtual Network traffic allowed to transit the Hub’s Virtual Network Gateway’s? Changing this forces a new resource to be created.
- hub
To booleanVitual Network Traffic Allowed Is the Virtual Hub traffic allowed to transit via the Remote Virtual Network? Changing this forces a new resource to be created.
- internet
Security booleanEnabled Should Internet Security be enabled to secure internet traffic? Changing this forces a new resource to be created.
- name string
The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created.
- remote
Virtual stringNetwork Id The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created.
- virtual
Hub stringId The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created.
- vitual
Network booleanTo Hub Gateways Traffic Allowed Is Remote Virtual Network traffic allowed to transit the Hub’s Virtual Network Gateway’s? Changing this forces a new resource to be created.
- hub_
to_ boolvitual_ network_ traffic_ allowed Is the Virtual Hub traffic allowed to transit via the Remote Virtual Network? Changing this forces a new resource to be created.
- internet_
security_ boolenabled Should Internet Security be enabled to secure internet traffic? Changing this forces a new resource to be created.
- name str
The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created.
- remote_
virtual_ strnetwork_ id The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created.
- virtual_
hub_ strid The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created.
- vitual_
network_ boolto_ hub_ gateways_ traffic_ allowed Is Remote Virtual Network traffic allowed to transit the Hub’s Virtual Network Gateway’s? Changing this forces a new resource to be created.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.