Terraform in Azure: Simple VNET

Terraform in Azure: Simple VNET


1 min read

End State

Terraform Code: https://github.com/asher-lab/asherl/tree/main/terraform/azure/Sample1-BasicVnet


  • 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 with no nsg attached

      • subnet2 (with with nsg attached to ASHERL-US-DEV-nsg.

      • subnet3 (with 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.