asp
asp

Reputation: 855

What is argument name required to add tunnel type to azure vpn in Terrafrom

Objective: Creating vpn (point to site) gateway with Terraform in Azure

Code that I am using:

resource "azurerm_virtual_network_gateway" "vpn-gw" {
  name = "test"
  location = azurerm_resource_group.rg[0].location
  resource_group_name = azurerm_resource_group.rg[0].name
  type = "Vpn"
  vpn_type = "RouteBased"
  active_active = true
  enable_bgp = false
  sku = "VpnGw1AZ"
  ip_configuration {
    name = "vnetGatewayConfig"
    public_ip_address_id = azurerm_public_ip.vpn-gateway-ip.id    
    private_ip_address_allocation = "Dynamic"
    subnet_id = data.azurerm_subnet.gatewaysubnetdata.id
  }
  ip_configuration {
    name = "vnetGatewayConfig1"
    public_ip_address_id = azurerm_public_ip.vpn-gateway-ip-secondary.id
    private_ip_address_allocation = "Dynamic"
    subnet_id = data.azurerm_subnet.gatewaysubnetdata.id
  }
  ip_configuration {
    name = "vnetGatewayConfig2"
    public_ip_address_id = azurerm_public_ip.vpn-gateway-ip-vpn.id
    private_ip_address_allocation = "Dynamic"
    subnet_id = data.azurerm_subnet.gatewaysubnetdata.id
  }
  vpn_client_configuration {
    address_space = ["xx.xxx.x.x/xx"]
    vpn_auth_types = ["AAD"]
    aad_tenant = "https://login.microsoftonline.com/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    aad_audience = "41b23e61-6c1e-4545-b367-cd054e0ed4b4"
    aad_issuer = "https://sts.windows.net/xxxxxxxxxxxxxxxxxxxxxxxx/"
  }
}

This creates, vpn gateway, but I need tunnel type as Open SSL, refereed to terraform documentation I dont find which is argument I need to pass for this

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/vpn_gateway

Upvotes: 0

Views: 104

Answers (2)

asp
asp

Reputation: 855

I had to use as 3.21.1 version of Azurerm in azurerm_virtual_network_gateway

vpn_client_protocols = ["OpenVPN"]

Upvotes: 0

Related Questions