Skip to content

Terraform module to create Virtual Network resource on Azure . Virtual Network (VNet) is the fundamental building block for creating a private network within the Azure cloud.

License

Notifications You must be signed in to change notification settings

terraform-az-modules/terraform-azure-vnet

Terraform Azure Module Template

With our comprehensive DevOps toolkit - streamline operations, automate workflows, enhance collaboration and, most importantly, deploy with confidence.

Terraform Licence Changelog


We are a group of DevOps engineers and architects collaborating to build standardized, scalable, and secure infrastructure in today's ever-evolving digital landscape. Rooted in a strong belief in automation and modular design—much like microservices—we focus on decomposing infrastructure into smaller, reusable components such as databases, clusters, and more. These components are built to follow industry best practices and are easy to manage, scale, and secure.

This repository is part of the terraform-az-modules organization and provides open-source, reusable Terraform modules. It includes practical examples and workflows to help users quickly understand, implement, and improve their infrastructure with minimal configuration and high maintainability.

Prerequisites and Providers

This table contains both Prerequisites and Providers:

Description Name Version
Prerequisite Terraform >= 1.6.6
Provider azure >= 3.90.0

Examples

IMPORTANT: Since the master branch used in source varies based on new modifications, we recommend using the release versions.

📌 For additional usage examples, check the complete list under examples/ directory.

Here is the Inputs and Outputs section for your VNet module in clean and consistent README format, based on the inputs and outputs you've provided:

Inputs and Outputs

Inputs

Name Description Type Default Required
name Name of the Virtual Network. string n/a yes
environment Environment name (e.g., dev, prod). string n/a yes
label_order Label order used in naming resources. list(any)
["name", "environment", "location"]
no
resource_group_name Name of the resource group where the Virtual Network will be deployed. string n/a yes
location Azure region where the Virtual Network will be deployed. string n/a yes
address_spaces List of address spaces to be used for the Virtual Network. list(string) n/a yes
resource_position_prefix If true, adds resource type prefix (e.g., vnet-) to resource name; else appends it. bool true no
enable_ddos_pp Set to true to create a new DDoS Protection Plan. bool false no
existing_ddos_pp ID of an existing DDoS Protection Plan to associate with the Virtual Network. string null no
enable_network_watcher Set to true to enable deployment of Network Watcher. bool false no

Outputs

Name Description
vnet_id The ID of the newly created Virtual Network.
vnet_name The name of the newly created Virtual Network.
vnet_location The location of the newly created Virtual Network.
vnet_address_space The address space of the newly created Virtual Network.
vnet_guid The GUID of the Virtual Network.
vnet_rg_name The name of the resource group containing the Virtual Network.
ddos_protection_plan_id The ID of the newly created DDoS Protection Plan (if created).
ddos_existing_plan_id The ID of the DDoS Protection Plan associated with the Virtual Network (if using existing one).
network_watcher_id The ID of the Network Watcher (if deployed).
network_watcher_name The name of the Network Watcher (if deployed).

Module Dependencies

This module has dependencies on:

  • Labels Module: Provides resource tagging.
  • Resource Group Module: Responsible for creating and managing Azure Resource Groups to organize and group related resources consistently across environments.

📑 Changelog

Refer here.

✨ Contributors

Big thanks to our contributors for elevating our project with their dedication and expertise! But, we do not wish to stop there, would like to invite contributions from the community in improving these projects and making them more versatile for better reach. Remember, every bit of contribution is immensely valuable, as, together, we are moving in only 1 direction, i.e. forward.



If you're considering contributing to our project, here are a few quick guidelines that we have been following (Got a suggestion? We are all ears!):

  • Fork the Repository: Create a new branch for your feature or bug fix.
  • Coding Standards: You know the drill.
  • Clear Commit Messages: Write clear and concise commit messages to facilitate understanding.
  • Thorough Testing: Test your changes thoroughly before submitting a pull request.
  • Documentation Updates: Include relevant documentation updates if your changes impact it.

Feedback

Spot a bug or have thoughts to share with us? Let's squash it together! Log it in our issue tracker, feel free to drop us an email at [email protected]).

Show some love with a ★ on our GitHub! if our work has brightened your day! – your feedback fuels our journey!

🚀 Our Accomplishment

We have 50+ Azure Terraform modules 🙌. You could consider them finished, but, with enthusiasts like yourself, we are able to ever improve them, so we call our status - improvement in progress.

Tap into our capabilities

We provide a platform for organizations to engage with experienced, top-tier DevOps and Cloud professionals. Tap into our pool of certified engineers and architects to elevate your DevOps and Cloud solutions.

At Azure Terraform Modules Organisation, we have extensive experience in designing, building, and migrating environments; securing infrastructure; consulting; monitoring; optimizing; automating; and maintaining complex, large-scale modern systems. With a strong client presence across American and European regions, our certified experts deliver robust and scalable cloud solutions.

Write to us at [email protected].

We are The Cloud Experts!


We ❤️ Open Source and you can check out our other modules to get help with your new Cloud ideas.

About

Terraform module to create Virtual Network resource on Azure . Virtual Network (VNet) is the fundamental building block for creating a private network within the Azure cloud.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages