# Terraform in Azure: Simple VNET

# End State

![](https://tribe-s3-production.imgix.net/uANAPBp5sVoIZrc0ZuAwr?w=1000&auto=compress,format&dl align="left")

## **Terraform Code:** [https://github.com/asher-lab/asherl/tree/main/terraform/azure/Sample1-BasicVnet](https://github.com/asher-lab/asherl/tree/main/terraform/azure/Sample1-BasicVnet)

## **Description**

* Under resource group named: ASHERL-US-DEV-rg
    
* Utilizes concept of **module** and **reusable variables.**
    
* This terraform code created the following resources under the **ASHERL-US-DEV-rg** resource group.
    
    * Virtual Network
        
    * Subnets
        
        * subnet1 (with 10.0.1.0/24) with no nsg attached
            
        * subnet2 (with 10.0.2.0/24) with nsg attached to **ASHERL-US-DEV-nsg.**
            
        * subnet3 (with 10.0.3.0/24) with nsg attched to **ASHERL-US-DEV-nsg.**
            
* NSG is used to filter traffic to and from Azure resources. A NSG can be attached to Network Interface and Subnets and can be referenced by other resources.
