Reusable Terraform module for Google Cloud VPN gateway and tunnel resources.
This module provisions Google Cloud VPN gateways and tunnels for GCP. It supports single VPN gateway, HA VPN gateway, external VPN gateway peers, and configurable tunnel definitions.
See examples/simple.tf and examples/full.tf for usage patterns.
No modules.
| Name |
Description |
Type |
Default |
Required |
| external_vpn_gateway_interface |
A list of interface for the External VPN Gateway. |
list(object({ id = optional(number) ip_address = optional(string) })) |
null |
no |
| external_vpn_gateway_labels |
A map of labels for the External VPN Gateway. |
map(string) |
null |
no |
| external_vpn_gateway_name |
The name for the External VPN Gateway. |
string |
null |
no |
| external_vpn_gateway_redundancy_type |
The redundancy type for the External VPN Gateway. |
string |
"SINGLE_IP_INTERNALLY_REDUNDANT" |
no |
| gateway_ip_version |
The IP version for the VPN Gateway. |
string |
"IPV4" |
no |
| ha_vpn_gateway_name |
The name for the VPN Gateway. |
string |
null |
no |
| ha_vpn_interfaces |
A list of VPN interfaces for the VPN Gateway. |
list(object({ id = optional(number) interconnect_attachment = optional(string) })) |
[] |
no |
| ha_vpn_stack_type |
The stack type for the VPN Gateway. |
string |
"IPV4_ONLY" |
no |
| network |
The network for the VPN Gateway. |
string |
n/a |
yes |
| project |
The project for the VPN Gateway. |
string |
n/a |
yes |
| region |
The region for the VPN Gateway. |
string |
n/a |
yes |
| remote_router_self_link |
The self link for the remote router. |
string |
null |
no |
| vpn_gateway_description |
A description for the VPN Gateway. |
string |
null |
no |
| vpn_gateway_name |
The name for the VPN Gateway. |
string |
null |
no |
| vpn_tunnel |
The VPN Tunnel(s) for the VPN Gateway. |
map(object({ shared_secret = optional(string) description = optional(string) target_vpn_gateway = optional(string) vpn_gateway = optional(string) vpn_gateway_interface = optional(number) peer_external_gateway = optional(string) peer_external_gateway_interface = optional(number) peer_gcp_gateway = optional(string) router = optional(string) peer_ip = optional(string) ike_version = optional(string) local_traffic_selector = optional(list(string)) remote_traffic_selector = optional(list(string)) labels = optional(map(string)) region = optional(string) project = optional(string) })) |
{} |
no |