Skip to content

networking/virtual_network

Overview

This page documents the Terraform module implementation, key configuration surfaces, and how it integrates with CAF.

Dependency diagram (Mermaid)

graph TD azurecaf_name.caf_name_vnet["azurecaf_name.caf_name_vnet"] azurerm_subnet_network_security_group_association.nsg_vnet_association["azurerm_subnet_network_security_group_association.nsg_vnet_association"] azurerm_subnet_network_security_group_association.nsg_vnet_association_version["azurerm_subnet_network_security_group_association.nsg_vnet_association_version"] azurerm_subnet_route_table_association.rt["azurerm_subnet_route_table_association.rt"] azurerm_virtual_network.vnet["azurerm_virtual_network.vnet"] module.diagnostics["module.diagnostics"] module.nsg["module.nsg"] module.special_subnets["module.special_subnets"] module.subnets["module.subnets"] azurerm_subnet_network_security_group_association.nsg_vnet_association --> module.nsg azurerm_subnet_network_security_group_association.nsg_vnet_association --> module.subnets azurerm_subnet_network_security_group_association.nsg_vnet_association_version --> module.subnets azurerm_subnet_route_table_association.rt --> module.special_subnets azurerm_subnet_route_table_association.rt --> module.subnets azurerm_virtual_network.vnet --> azurecaf_name.caf_name_vnet module.diagnostics --> azurerm_virtual_network.vnet module.nsg --> azurerm_virtual_network.vnet module.special_subnets --> azurerm_virtual_network.vnet module.subnets --> azurerm_virtual_network.vnet

Module Reference

Category: networking
Path: modules/networking/virtual_network
Azure Resources: azurecaf_name, azurerm_subnet_network_security_group_association, azurerm_subnet_route_table_association, azurerm_virtual_network

Inputs

Name Description Type Required Default Validation
client_config Client configuration object (see module README.md). any yes - -
tags (Required) map of tags for the deployment any yes - -
diagnostics (Required) Diagnostics object with the definitions and destination services any yes - -
settings (Required) configuration object describing the networking configuration, as described in README any yes - -
application_security_groups any no {} -
network_security_group_definition any yes - -
netwatcher (Optional) is a map with two attributes: name, rg who describes the name and rg where the netwatcher was already depl... any no {} -
ddos_id (Optional) ID of the DDoS protection plan if exists any no - -
route_tables any no {} -
global_settings Global settings object (see module README.md) any yes - -
network_watchers any no {} -
network_security_groups Network Security Group cretaed with different Resource Group any no {} -
remote_dns any no {} -
location location of the resource if different from the resource group. string no - -
resource_group_name Resource group object to deploy the Azure resource string no - -
resource_group Resource group object to deploy the Azure resource any yes - -
base_tags Base tags for the resource to be inherited from the resource group. bool yes - -

Outputs

Name Description Sensitive Value
id Virutal Network id - azurerm_virtual_network.vnet.id
name Virutal Network name - azurerm_virtual_network.vnet.name
address_space Virutal Network address_space - azurerm_virtual_network.vnet.address_space
dns_servers Virutal Network dns_servers - azurerm_virtual_network.vnet.dns_servers
resource_group_name Virutal Network resource_group_name - azurerm_virtual_network.vnet.resource_group_name
location Azure region of the virtual network - local.location
subnets Returns all the subnets objects in the Virtual Network. As a map of keys, ID - merge(module.special_subnets, module.subnets)

Sources

  • modules/networking/virtual_network/diagnostics.tf
  • modules/networking/virtual_network/locals.tf
  • modules/networking/virtual_network/main.tf
  • modules/networking/virtual_network/module.tf
  • modules/networking/virtual_network/outputs.tf
  • modules/networking/virtual_network/variables.tf