diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..db93381 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,141 @@ +# Virtual Network Gateway creation example + +Terraform module to create a Virtual Network Gateway to send encrypted traffic between an Azure virtual network and an on-premises location over the public Internet. Supports both VPN and ExpressRoute gateway types. VPN configuration supports ExpressRoute (private connection), Site-to-Site and Multi-Site (IPsec/IKE VPN tunnel). Optional active-active mode and point-to-site supported as well. + +## Module Usage + +### ExpressRoute VPN Gateway (private connection) + +```hcl +module "vpn-gateway" { + source = "kumarvna/vpn-gateway/azurerm" + version = "1.0.0" + + # Resource Group, location, VNet and Subnet details + resource_group_name = "rg-shared-westeurope-01" + virtual_network_name = "vnet-shared-hub-westeurope-001" + vpn_gateway_name = "shared-vpn-gw01" + gateway_type = "ExpressRoute" + vpn_gw_generation = "None" + + # ExpressRoute parameters i.e. when type is ExpressRoute + # The Express Route Circuit can be in the same or in a different subscription + gateway_connection_type = "ExpressRoute" + express_route_circuit_id = var.express_route_circuit_id + + # Adding TAG's to your Azure resources (Required) + tags = { + ProjectName = "demo-internal" + Env = "dev" + Owner = "user@example.com" + BusinessUnit = "CORP" + ServiceClass = "Gold" + } +} +``` + +### Site-to-Site VPN Gateway (IPsec/IKE VPN tunnel) + +```hcl +module "vpn-gateway" { + source = "kumarvna/vpn-gateway/azurerm" + version = "1.0.0" + + # Resource Group, location, VNet and Subnet details + # IPSec Site-to-Site connection configuration requirements + resource_group_name = "rg-shared-westeurope-01" + virtual_network_name = "vnet-shared-hub-westeurope-001" + vpn_gateway_name = "shared-vpn-gw01" + gateway_type = "Vpn" + + # local network gateway connection + local_networks = [ + { + local_gw_name = "onpremise" + local_gateway_address = "8.8.8.8" + local_address_space = ["10.1.0.0/24"] + shared_key = "xpCGkHTBQmDvZK9HnLr7DAvH" + }, + ] + + # Adding TAG's to your Azure resources (Required) + tags = { + ProjectName = "demo-internal" + Env = "dev" + Owner = "user@example.com" + BusinessUnit = "CORP" + ServiceClass = "Gold" + } +} +``` + +### Point-to-Site VPN Gateway + +```hcl +module "vpn-gateway" { + source = "kumarvna/vpn-gateway/azurerm" + version = "1.0.0" + + # Resource Group, location, VNet and Subnet details + resource_group_name = "rg-shared-westeurope-01" + virtual_network_name = "vnet-shared-hub-westeurope-001" + vpn_gateway_name = "shared-vpn-gw01" + + # client configuration for Point-to-Site VPN Gateway connections + vpn_client_configuration = { + address_space = "10.1.0.0/24" + vpn_client_protocols = ["SSTP", "IkeV2"] + certificate = <