azure logo
Azure Classic v5.43.0, May 6 23

azure.network.VirtualHubIp

Explore with Pulumi AI

Manages a Virtual Hub IP. This resource is also known as a Route Server.

NOTE Virtual Hub IP only supports Standard Virtual Hub without Virtual Wan.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleVirtualHub = new Azure.Network.VirtualHub("exampleVirtualHub", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        Sku = "Standard",
    });

    var examplePublicIp = new Azure.Network.PublicIp("examplePublicIp", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        AllocationMethod = "Static",
        Sku = "Standard",
    });

    var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new()
    {
        AddressSpaces = new[]
        {
            "10.5.0.0/16",
        },
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
    });

    var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        VirtualNetworkName = exampleVirtualNetwork.Name,
        AddressPrefixes = new[]
        {
            "10.5.1.0/24",
        },
    });

    var exampleVirtualHubIp = new Azure.Network.VirtualHubIp("exampleVirtualHubIp", new()
    {
        VirtualHubId = exampleVirtualHub.Id,
        PrivateIpAddress = "10.5.1.18",
        PrivateIpAllocationMethod = "Static",
        PublicIpAddressId = examplePublicIp.Id,
        SubnetId = exampleSubnet.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
	"github.com/pulumi/pulumi/sdk/v3/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
		}
		exampleVirtualHub, err := network.NewVirtualHub(ctx, "exampleVirtualHub", &network.VirtualHubArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			Location:          exampleResourceGroup.Location,
			Sku:               pulumi.String("Standard"),
		})
		if err != nil {
			return err
		}
		examplePublicIp, err := network.NewPublicIp(ctx, "examplePublicIp", &network.PublicIpArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			AllocationMethod:  pulumi.String("Static"),
			Sku:               pulumi.String("Standard"),
		})
		if err != nil {
			return err
		}
		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
			AddressSpaces: pulumi.StringArray{
				pulumi.String("10.5.0.0/16"),
			},
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
		})
		if err != nil {
			return err
		}
		exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
			ResourceGroupName:  exampleResourceGroup.Name,
			VirtualNetworkName: exampleVirtualNetwork.Name,
			AddressPrefixes: pulumi.StringArray{
				pulumi.String("10.5.1.0/24"),
			},
		})
		if err != nil {
			return err
		}
		_, err = network.NewVirtualHubIp(ctx, "exampleVirtualHubIp", &network.VirtualHubIpArgs{
			VirtualHubId:              exampleVirtualHub.ID(),
			PrivateIpAddress:          pulumi.String("10.5.1.18"),
			PrivateIpAllocationMethod: pulumi.String("Static"),
			PublicIpAddressId:         examplePublicIp.ID(),
			SubnetId:                  exampleSubnet.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.VirtualHub;
import com.pulumi.azure.network.VirtualHubArgs;
import com.pulumi.azure.network.PublicIp;
import com.pulumi.azure.network.PublicIpArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.network.VirtualHubIp;
import com.pulumi.azure.network.VirtualHubIpArgs;
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) {
        var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleVirtualHub = new VirtualHub("exampleVirtualHub", VirtualHubArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .sku("Standard")
            .build());

        var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .allocationMethod("Static")
            .sku("Standard")
            .build());

        var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()        
            .addressSpaces("10.5.0.0/16")
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .build());

        var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .virtualNetworkName(exampleVirtualNetwork.name())
            .addressPrefixes("10.5.1.0/24")
            .build());

        var exampleVirtualHubIp = new VirtualHubIp("exampleVirtualHubIp", VirtualHubIpArgs.builder()        
            .virtualHubId(exampleVirtualHub.id())
            .privateIpAddress("10.5.1.18")
            .privateIpAllocationMethod("Static")
            .publicIpAddressId(examplePublicIp.id())
            .subnetId(exampleSubnet.id())
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_virtual_hub = azure.network.VirtualHub("exampleVirtualHub",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    sku="Standard")
example_public_ip = azure.network.PublicIp("examplePublicIp",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    allocation_method="Static",
    sku="Standard")
example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
    address_spaces=["10.5.0.0/16"],
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name)
example_subnet = azure.network.Subnet("exampleSubnet",
    resource_group_name=example_resource_group.name,
    virtual_network_name=example_virtual_network.name,
    address_prefixes=["10.5.1.0/24"])
example_virtual_hub_ip = azure.network.VirtualHubIp("exampleVirtualHubIp",
    virtual_hub_id=example_virtual_hub.id,
    private_ip_address="10.5.1.18",
    private_ip_allocation_method="Static",
    public_ip_address_id=example_public_ip.id,
    subnet_id=example_subnet.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleVirtualHub = new azure.network.VirtualHub("exampleVirtualHub", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    sku: "Standard",
});
const examplePublicIp = new azure.network.PublicIp("examplePublicIp", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    allocationMethod: "Static",
    sku: "Standard",
});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
    addressSpaces: ["10.5.0.0/16"],
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
});
const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
    resourceGroupName: exampleResourceGroup.name,
    virtualNetworkName: exampleVirtualNetwork.name,
    addressPrefixes: ["10.5.1.0/24"],
});
const exampleVirtualHubIp = new azure.network.VirtualHubIp("exampleVirtualHubIp", {
    virtualHubId: exampleVirtualHub.id,
    privateIpAddress: "10.5.1.18",
    privateIpAllocationMethod: "Static",
    publicIpAddressId: examplePublicIp.id,
    subnetId: exampleSubnet.id,
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleVirtualHub:
    type: azure:network:VirtualHub
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      sku: Standard
  examplePublicIp:
    type: azure:network:PublicIp
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      allocationMethod: Static
      sku: Standard
  exampleVirtualNetwork:
    type: azure:network:VirtualNetwork
    properties:
      addressSpaces:
        - 10.5.0.0/16
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
  exampleSubnet:
    type: azure:network:Subnet
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      virtualNetworkName: ${exampleVirtualNetwork.name}
      addressPrefixes:
        - 10.5.1.0/24
  exampleVirtualHubIp:
    type: azure:network:VirtualHubIp
    properties:
      virtualHubId: ${exampleVirtualHub.id}
      privateIpAddress: 10.5.1.18
      privateIpAllocationMethod: Static
      publicIpAddressId: ${examplePublicIp.id}
      subnetId: ${exampleSubnet.id}

Create VirtualHubIp Resource

new VirtualHubIp(name: string, args: VirtualHubIpArgs, opts?: CustomResourceOptions);
@overload
def VirtualHubIp(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 name: Optional[str] = None,
                 private_ip_address: Optional[str] = None,
                 private_ip_allocation_method: Optional[str] = None,
                 public_ip_address_id: Optional[str] = None,
                 subnet_id: Optional[str] = None,
                 virtual_hub_id: Optional[str] = None)
@overload
def VirtualHubIp(resource_name: str,
                 args: VirtualHubIpArgs,
                 opts: Optional[ResourceOptions] = None)
func NewVirtualHubIp(ctx *Context, name string, args VirtualHubIpArgs, opts ...ResourceOption) (*VirtualHubIp, error)
public VirtualHubIp(string name, VirtualHubIpArgs args, CustomResourceOptions? opts = null)
public VirtualHubIp(String name, VirtualHubIpArgs args)
public VirtualHubIp(String name, VirtualHubIpArgs args, CustomResourceOptions options)
type: azure:network:VirtualHubIp
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args VirtualHubIpArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args VirtualHubIpArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VirtualHubIpArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VirtualHubIpArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args VirtualHubIpArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

VirtualHubIp Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The VirtualHubIp resource accepts the following input properties:

PublicIpAddressId string

The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.

SubnetId string

The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created.

VirtualHubId string

The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created.

Name string

The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created.

PrivateIpAddress string

The private IP address of the IP configuration.

PrivateIpAllocationMethod string

The private IP address allocation method. Possible values are Static and Dynamic is allowed. Defaults to Dynamic.

PublicIpAddressId string

The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.

SubnetId string

The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created.

VirtualHubId string

The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created.

Name string

The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created.

PrivateIpAddress string

The private IP address of the IP configuration.

PrivateIpAllocationMethod string

The private IP address allocation method. Possible values are Static and Dynamic is allowed. Defaults to Dynamic.

publicIpAddressId String

The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.

subnetId String

The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created.

virtualHubId String

The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created.

name String

The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created.

privateIpAddress String

The private IP address of the IP configuration.

privateIpAllocationMethod String

The private IP address allocation method. Possible values are Static and Dynamic is allowed. Defaults to Dynamic.

publicIpAddressId string

The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.

subnetId string

The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created.

virtualHubId string

The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created.

name string

The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created.

privateIpAddress string

The private IP address of the IP configuration.

privateIpAllocationMethod string

The private IP address allocation method. Possible values are Static and Dynamic is allowed. Defaults to Dynamic.

public_ip_address_id str

The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.

subnet_id str

The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created.

virtual_hub_id str

The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created.

name str

The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created.

private_ip_address str

The private IP address of the IP configuration.

private_ip_allocation_method str

The private IP address allocation method. Possible values are Static and Dynamic is allowed. Defaults to Dynamic.

publicIpAddressId String

The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.

subnetId String

The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created.

virtualHubId String

The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created.

name String

The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created.

privateIpAddress String

The private IP address of the IP configuration.

privateIpAllocationMethod String

The private IP address allocation method. Possible values are Static and Dynamic is allowed. Defaults to Dynamic.

Outputs

All input properties are implicitly available as output properties. Additionally, the VirtualHubIp resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing VirtualHubIp Resource

Get an existing VirtualHubIp 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?: VirtualHubIpState, opts?: CustomResourceOptions): VirtualHubIp
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        name: Optional[str] = None,
        private_ip_address: Optional[str] = None,
        private_ip_allocation_method: Optional[str] = None,
        public_ip_address_id: Optional[str] = None,
        subnet_id: Optional[str] = None,
        virtual_hub_id: Optional[str] = None) -> VirtualHubIp
func GetVirtualHubIp(ctx *Context, name string, id IDInput, state *VirtualHubIpState, opts ...ResourceOption) (*VirtualHubIp, error)
public static VirtualHubIp Get(string name, Input<string> id, VirtualHubIpState? state, CustomResourceOptions? opts = null)
public static VirtualHubIp get(String name, Output<String> id, VirtualHubIpState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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:
Name string

The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created.

PrivateIpAddress string

The private IP address of the IP configuration.

PrivateIpAllocationMethod string

The private IP address allocation method. Possible values are Static and Dynamic is allowed. Defaults to Dynamic.

PublicIpAddressId string

The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.

SubnetId string

The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created.

VirtualHubId string

The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created.

Name string

The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created.

PrivateIpAddress string

The private IP address of the IP configuration.

PrivateIpAllocationMethod string

The private IP address allocation method. Possible values are Static and Dynamic is allowed. Defaults to Dynamic.

PublicIpAddressId string

The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.

SubnetId string

The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created.

VirtualHubId string

The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created.

name String

The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created.

privateIpAddress String

The private IP address of the IP configuration.

privateIpAllocationMethod String

The private IP address allocation method. Possible values are Static and Dynamic is allowed. Defaults to Dynamic.

publicIpAddressId String

The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.

subnetId String

The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created.

virtualHubId String

The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created.

name string

The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created.

privateIpAddress string

The private IP address of the IP configuration.

privateIpAllocationMethod string

The private IP address allocation method. Possible values are Static and Dynamic is allowed. Defaults to Dynamic.

publicIpAddressId string

The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.

subnetId string

The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created.

virtualHubId string

The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created.

name str

The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created.

private_ip_address str

The private IP address of the IP configuration.

private_ip_allocation_method str

The private IP address allocation method. Possible values are Static and Dynamic is allowed. Defaults to Dynamic.

public_ip_address_id str

The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.

subnet_id str

The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created.

virtual_hub_id str

The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created.

name String

The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created.

privateIpAddress String

The private IP address of the IP configuration.

privateIpAllocationMethod String

The private IP address allocation method. Possible values are Static and Dynamic is allowed. Defaults to Dynamic.

publicIpAddressId String

The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.

subnetId String

The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created.

virtualHubId String

The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created.

Import

Virtual Hub IPs can be imported using the resource id, e.g.

 $ pulumi import azure:network/virtualHubIp:VirtualHubIp example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/virtualHub1/ipConfigurations/ipConfig1

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.