Elazar
Elazar

Reputation: 292

Terraform - GCP adding IP section on google_compute_vpn_gateway

Trying to make a VPN Gateway using Terraform and I need to refer my reserved GCP IP when creating it.

There's nothing on the GCP documentation that refers to such a thing. Only arguments you may set are network / region

While in GUI it'll prompt you asking for an IP Address:

enter image description here

I've added the terraform snippet here

// Provisions a VPN Gateway
resource "google_compute_vpn_gateway" "target_gateway" {
  name    = "vpn-network"
  network = google_compute_network.vpn.id
  region  = var.gcp_region
}

Upvotes: -1

Views: 267

Answers (1)

Alejandro F.
Alejandro F.

Reputation: 473

From reference you can use:

vpn_gw_ip

As input to set your reserved IP

Upvotes: 2

Related Questions