title | description | ms.topic | service | ms.service | ms.date | ms.custom |
---|---|---|---|---|---|---|
Create on-premises virtual network in Azure using Terraform |
Learn how to implement an on-premises virtual network (VNet) in Azure that houses local resources. |
how-to |
virtual-network |
azure-virtual-network |
10/26/2023 |
devx-track-terraform |
[!INCLUDE Terraform abstract]
This article shows how to implement an on-premises network in Azure. You can replace the sample network with a private virtual network. To do so, modify the subnet IP addresses to suit your environment.
In this article, you learn how to:
[!div class="checklist"]
- Implement an on-premises VNet in hub-spoke topology
- Create hub network appliance resources
- Create on-premises virtual machine
- Create on-premises virtual private network gateway
[!INCLUDE open-source-devops-prereqs-azure-subscription.md]
[!INCLUDE configure-terraform.md]
-
Make the example directory created in the first article of this series the current directory.
-
Create a file named
on-prem.tf
and insert the following code:[!code-terraformmaster]
Troubleshoot common problems when using Terraform on Azure
[!div class="nextstepaction"] Create a hub virtual network with Terraform in Azure