Removes the vnet gateway since we're no longer going to use Azure VPN services
This commit is contained in:
@@ -72,45 +72,3 @@ resource "azurerm_route" "route" {
|
||||
address_prefix = "0.0.0.0/0"
|
||||
next_hop_type = each.value
|
||||
}
|
||||
|
||||
# Required for the gateway
|
||||
resource "azurerm_subnet" "gateway" {
|
||||
name = "GatewaySubnet"
|
||||
resource_group_name = azurerm_resource_group.vpc.name
|
||||
virtual_network_name = azurerm_virtual_network.vpc.name
|
||||
address_prefix = var.gateway_subnet
|
||||
}
|
||||
|
||||
|
||||
resource "azurerm_public_ip" "vpn_ip" {
|
||||
name = "${var.name}-${var.environment}-vpn-ip"
|
||||
location = azurerm_resource_group.vpc.location
|
||||
resource_group_name = azurerm_resource_group.vpc.name
|
||||
|
||||
allocation_method = "Dynamic"
|
||||
}
|
||||
|
||||
resource "azurerm_virtual_network_gateway" "vnet_gateway" {
|
||||
name = "${var.name}-${var.environment}-gateway"
|
||||
location = azurerm_resource_group.vpc.location
|
||||
resource_group_name = azurerm_resource_group.vpc.name
|
||||
|
||||
type = "Vpn"
|
||||
vpn_type = "RouteBased"
|
||||
|
||||
active_active = false
|
||||
enable_bgp = false
|
||||
sku = "Standard"
|
||||
|
||||
ip_configuration {
|
||||
name = "vnetGatewayConfig"
|
||||
public_ip_address_id = azurerm_public_ip.vpn_ip.id
|
||||
private_ip_address_allocation = "Dynamic"
|
||||
subnet_id = azurerm_subnet.gateway.id
|
||||
}
|
||||
|
||||
vpn_client_configuration {
|
||||
address_space = var.vpn_client_cidr
|
||||
vpn_client_protocols = ["OpenVPN"]
|
||||
}
|
||||
}
|
@@ -34,7 +34,6 @@ variable "networks" {
|
||||
variable "dns_servers" {
|
||||
description = "DNS Server IPs for internal and public DNS lookups (must be on a defined subnet)"
|
||||
type = list
|
||||
|
||||
}
|
||||
|
||||
variable "route_tables" {
|
||||
@@ -42,19 +41,8 @@ variable "route_tables" {
|
||||
description = "A map with the route tables to create"
|
||||
}
|
||||
|
||||
variable "gateway_subnet" {
|
||||
type = string
|
||||
description = "The Subnet CIDR that we'll use for the virtual_network_gateway 'GatewaySubnet'"
|
||||
}
|
||||
|
||||
variable "service_endpoints" {
|
||||
type = map
|
||||
description = "A map of the service endpoints and its mapping to subnets"
|
||||
|
||||
}
|
||||
|
||||
variable "vpn_client_cidr" {
|
||||
type = list
|
||||
description = "The CIDR range used for clients on the VPN"
|
||||
default = ["172.16.0.0/16"]
|
||||
}
|
||||
|
Reference in New Issue
Block a user