Co-authored-by: Luca Prete <lucaprete@google.com> |
||
---|---|---|
.. | ||
README.md | ||
main.tf | ||
outputs.tf | ||
variables.tf | ||
versions.tf |
README.md
Cloud VPN Route-based Module
Example
module "vpn" {
source = "./modules/net-vpn-static"
project_id = var.project_id
region = var.region
network = var.network
name = "remote"
# gateway_address = var.gateway_address
remote_ranges = [var.remote_ranges]
tunnels = {
remote-0 = {
ike_version = 2
peer_ip = var.remote_vpn_gateway_address
shared_secret = ""
traffic_selectors = { local = ["0.0.0.0/0"], remote = null }
}
}
}
Variables
name | description | type | required | default |
---|---|---|---|---|
name | VPN gateway name, and prefix used for dependent resources. | string |
✓ | |
network | VPC used for the gateway and routes. | string |
✓ | |
project_id | Project where resources will be created. | string |
✓ | |
region | Region used for resources. | string |
✓ | |
gateway_address | Optional address assigned to the VPN gateway. Ignored unless gateway_address_create is set to false. | string |
|
|
gateway_address_create | Create external address assigned to the VPN gateway. Needs to be explicitly set to false to use address in gateway_address variable. | bool |
true |
|
remote_ranges | Remote IP CIDR ranges. | list(string) |
[] |
|
route_priority | Route priority, defaults to 1000. | number |
1000 |
|
tunnels | VPN tunnel configurations. | map(object({...})) |
{} |
Outputs
name | description | sensitive |
---|---|---|
address | VPN gateway address. | |
gateway | VPN gateway resource. | |
name | VPN gateway name. | |
random_secret | Generated secret. | ✓ |
self_link | VPN gateway self link. | |
tunnel_names | VPN tunnel names. | |
tunnel_self_links | VPN tunnel self links. | |
tunnels | VPN tunnel resources. |