virtual-network-hub

avinor/virtual-network-hub/azurerm

Terraform Module HCL AZURERM

A Terraform module to create a hub virtual network according to Microsoft Best Practice of deploying Hub-Spoke

Install
module "virtual-network-hub" {
source = "avinor/virtual-network-hub/azurerm"
version = "3.3.0"
}
plain text: /constructs/tfmod-avinor-virtual-network-hub-azurerm/install.txt
⭐ Source on GitHub 📦 Registry page
README

Hub network This module deploys a hub network using the Microsoft recommended Hub-Spoke network topology . Generally there should only be one hub in each region with multiple spokes, where each of them can also be in separate subscriptions. Currently, it does not support setting up peering between hub's in different regions, but that could be added as a feature later. The virtual network will be created with 4 subnets, AzureFirewallSubnet, GatewaySubnet, Management and DMZ. AzureFirewallSubnet and GatewaySubnet will not contain any UDR (User Defined Route) or NSG (Network Security Group) since that is not possible with resources deployed in those subnets. Management and DMZ will route all outgoing traffic through firewall instance. !hub topology Source: In diagram hub network is connected

Inputs (23)
NameTypeDescriptionDefault
resource_group_namestringName of resource group to deploy resources in. required
address_spacestringThe full address space that is used the virtual network. Requires at least a /24 required
locationstringThe Azure Region in which to create resource. required
public_ip_nameslist(string)Public ips is a list of ip names that are connected to the firewall. At least on required
namestringName of hub network. required
dmz_nsg_ruleslist(any)Network security rules to add to dmz subnet. See README for details on how to se[]
firewall_zoneslist(string)A collection of availability zones to spread the Firewall over.null
firewall_nat_ruleslist(object({ name List of nat rules to apply to firewall.[]
create_ddos_planboolCreate a DDos protection plan and attach to vnet.false
private_dns_zonestringName of private dns zone to create and associate with virtual network. This is tnull
enable_advanced_threat_protectionboolBoolean flag which controls if advanced threat protection is enabled.true
storage_account_resource_group_createboolProperty for supporting terraform state created by older version of this module.false
public_ip_prefix_lengthnumberSpecifies the number of bits of the prefix. The value can be set between 24 (25630
peering_assignmentlist(string)List of principal ids that should have access to peer to this Hub network. All s[]
resolvable_private_dns_zoneslist(string)List of resolvable private dns zones to create and associate with virtual networ[]
service_endpointslist(string)Service endpoints to add to the firewall subnet.[ "Microsoft.AzureActiveDirectory",
management_nsg_ruleslist(any)Network security rules to add to management subnet. See README for details on ho[]
tagsmap(string)Tags to apply to all resources created.{}
diagnosticsobject({ destination = sDiagnostic settings for those resources that support it. See README.md for detainull
firewall_application_ruleslist(object({ name List of application rules to apply to firewall.[]
firewall_network_ruleslist(object({ name List of network rules to apply to firewall.[]
netwatcherobject({ resource_group_loProperties for creating network watcher. If set it will create Network Watcher rnull
threat_intel_modestringThe operation mode for threat intelligence-based filtering. Possible values are:"Deny"
Outputs (8)
private_dns — Private dns settings if configured. Id and name of private dns.
resolvable_private_dns_zones — Map of resolvable private dns zones settings if configured. The key is the private zone name where d
public_ip_prefix — Public ip prefix of firewall.
vnet_id — Virtual network id.
vnet_resource_group_name — Virtual network resource group name.
vnet_name — Virtual network name.
subnets — Map with subnets created and their id. Used for network rules etc.
firewall_private_ip — Private ip of firewall.
Resources (23)
azurerm_firewallazurerm_firewall_application_rule_collectionazurerm_firewall_nat_rule_collectionazurerm_firewall_network_rule_collectionazurerm_monitor_diagnostic_settingazurerm_network_ddos_protection_planazurerm_network_security_groupazurerm_network_security_ruleazurerm_network_watcherazurerm_network_watcher_flow_logazurerm_private_dns_zoneazurerm_private_dns_zone_virtual_network_linkazurerm_public_ipazurerm_public_ip_prefixazurerm_resource_groupazurerm_role_assignmentazurerm_routeazurerm_route_tableazurerm_subnetazurerm_subnet_network_security_group_associationazurerm_subnet_route_table_associationazurerm_virtual_networkrandom_string
Details
FrameworkTerraform Module
LanguageHCL
Version3.3.0
Cloud AZURERM
★ Stars10
Forks15
Total downloads6.3k
Inputs23
Outputs8
Resources23
Examples4
LicenseApache-2.0
Namespaceavinor
Updated