title: Cannot create a classic route based VPN tunnel with Terraform in GCP
body: <p><strong>What I want to accomplish:</strong> </p>
  
  <p>I want Terraform to create a Classic route based VPN tunnel in GCP.</p>
  
  <p><strong>Background:</strong></p>
  
  <p>When setting up a VPN tunnel in GCP there are three options for routing
  BGP
  Route based
  Policy based</p>
  
  <p>When creating a Route based VPN tunnel in GCP you need to specify the remote subnets. If you are creating a Policy based VPN tunnel you also need to specify local subnets.</p>
  
  <p>Since I want to create a route based VPN tunnel I only need to provide remote subnets.</p>
  
  <p><strong>The problem:</strong></p>
  
  <p>However in Terraform, there is no option for the resource "google_compute_vpn_tunnel" that has to do with what routing type to use.
  Okay maybe its determined by the lack of "local_traffic_selector" and then becomes a route based VPN tunnel.
  But even if I ommit the "local_traffic_selector" option in my main.tf it is still there in the plan.</p>
  
  <p>' + local_traffic_selector  = (known after apply)</p>
  
  <p>Since I have not specified any value for it, Terraform tries to use it with an empty value, which is not possible.</p>
  
  <pre><code>Error: Error creating VpnTunnel: googleapi: Error 400: Invalid value for field 'resource.localTrafficSelector[0]': ''. The local_traffic_selector field cannot be empty for network in custom subnet mode., invalid
  
    on main.tf line 51, in resource "google_compute_vpn_tunnel" "tunnel1":
    51: resource "google_compute_vpn_tunnel" "tunnel1" {
  </code></pre>
  
  <p>If I do specify it, the VPN tunnel will be of type Policy based instead of Route based.</p>
  
  <p>Is there no support for Terraform to create a route based classic VPN tunnel in GCP?</p>
  
  <p>Another strange thing is when creating the VPN gateway. When you do it in the GCP console you need to specify what external IP address the VPN gateway have. That is a pretty important property. But Terraform has no option for setting the IP address for the resource "google_compute_vpn_gateway"
  In the examples here: <a href="https://www.terraform.io/docs/providers/google/r/compute_vpn_gateway.html" rel="nofollow noreferrer">https://www.terraform.io/docs/providers/google/r/compute_vpn_gateway.html</a> they create an static IP object, but its never assigned to the VPN gateway in the configuration.</p>