modules/vnet_gateway/main.tf (27 lines of code) (raw):
resource "azurerm_public_ip" "vnet_gateway_pip" {
name = "vnet-gateway-pip"
location = var.location
resource_group_name = var.resource_group_name
sku = "Standard"
allocation_method = "Static"
ip_tags = {}
zones = ["1", "2", "3"]
tags = var.tags
}
resource "azurerm_virtual_network_gateway" "vnet_gateway" {
name = "vnet-gateway"
location = var.location
resource_group_name = var.resource_group_name
type = "Vpn"
vpn_type = "RouteBased"
active_active = false
enable_bgp = false
sku = "VpnGw1AZ"
tags = var.tags
ip_configuration {
name = "vnetGatewayConfig"
public_ip_address_id = azurerm_public_ip.vnet_gateway_pip.id
private_ip_address_allocation = "Dynamic"
subnet_id = var.subnet_id
}
}