azurermVirtualHubIp
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
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-resources",
}
);
const azurermVirtualHubExample = new azurerm.virtualHub.VirtualHub(
this,
"example_1",
{
location: azurermResourceGroupExample.location,
name: "example-vhub",
resource_group_name: azurermResourceGroupExample.name,
sku: "Standard",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermVirtualHubExample.overrideLogicalId("example");
const azurermVirtualNetworkExample = new azurerm.virtualNetwork.VirtualNetwork(
this,
"example_2",
{
address_space: ["10.5.0.0/16"],
location: azurermResourceGroupExample.location,
name: "example-vnet",
resource_group_name: azurermResourceGroupExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermVirtualNetworkExample.overrideLogicalId("example");
const azurermPublicIpExample = new azurerm.publicIp.PublicIp(
this,
"example_3",
{
allocation_method: "Static",
location: azurermResourceGroupExample.location,
name: "example-pip",
resource_group_name: azurermResourceGroupExample.name,
sku: "Standard",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermPublicIpExample.overrideLogicalId("example");
const azurermSubnetExample = new azurerm.subnet.Subnet(this, "example_4", {
address_prefixes: ["10.5.1.0/24"],
name: "RouteServerSubnet",
resource_group_name: azurermResourceGroupExample.name,
virtual_network_name: azurermVirtualNetworkExample.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSubnetExample.overrideLogicalId("example");
const azurermVirtualHubIpExample = new azurerm.virtualHubIp.VirtualHubIp(
this,
"example_5",
{
name: "example-vhubipconfig",
private_ip_address: "10.5.1.18",
private_ip_allocation_method: "Static",
public_ip_address_id: azurermPublicIpExample.id,
subnet_id: azurermSubnetExample.id,
virtual_hub_id: azurermVirtualHubExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermVirtualHubIpExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created. -
virtualHubId
- (Required) The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created. -
subnetId
- (Required) The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created. -
privateIpAddress
- (Optional) The private IP address of the IP configuration. -
privateIpAllocationMethod
- (Optional) The private IP address allocation method. Possible values arestatic
anddynamic
is allowed. Defaults todynamic
. -
publicIpAddressId
- (Required) The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.
Attributes Reference
The following attributes are exported:
id
- The ID of the Virtual Hub IP.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 60 minutes) Used when creating the Virtual Hub IP.read
- (Defaults to 5 minutes) Used when retrieving the Virtual Hub IP.update
- (Defaults to 60 minutes) Used when updating the Virtual Hub IP.delete
- (Defaults to 60 minutes) Used when deleting the Virtual Hub IP.
Import
Virtual Hub IPs can be imported using the resourceId
, e.g.