Skip to content

Commit f7a2990

Browse files
authored
docs: update the ha vpn module documentation
Signed-off-by: GitHub <[email protected]>
1 parent d40bc48 commit f7a2990

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

modules/vpn_ha/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ module "vpn_ha" {
283283
| router\_asn | Router ASN used for auto-created router. | `number` | `64514` | no |
284284
| router\_name | Name of router, leave blank to create one. | `string` | `""` | no |
285285
| stack\_type | The IP stack type will apply to all the tunnels associated with this VPN gateway. | `string` | `"IPV4_ONLY"` | no |
286-
| tunnels | VPN tunnel configurations, bgp\_peer\_options is usually null. | <pre>map(object({<br> bgp_peer = object({<br> address = string<br> asn = number<br> })<br> bgp_session_name = optional(string)<br> bgp_peer_options = optional(object({<br> ip_address = optional(string)<br> advertise_groups = optional(list(string))<br> advertise_ip_ranges = optional(map(string))<br> advertise_mode = optional(string)<br> route_priority = optional(number)<br> import_policies = optional(list(string))<br> export_policies = optional(list(string))<br> }))<br> bgp_session_range = optional(string)<br> ike_version = optional(number)<br> vpn_gateway_interface = optional(number)<br> peer_external_gateway_self_link = optional(string, null)<br> peer_external_gateway_interface = optional(number)<br> shared_secret = optional(string, "")<br> }))</pre> | `{}` | no |
286+
| tunnels | VPN tunnel configurations, bgp\_peer\_options is usually null. | <pre>map(object({<br> bgp_peer = object({<br> address = string<br> asn = number<br> })<br> bgp_session_name = optional(string)<br> bgp_peer_options = optional(object({<br> ip_address = optional(string)<br> advertise_groups = optional(list(string))<br> advertise_ip_ranges = optional(map(string))<br> advertise_mode = optional(string)<br> custom_learned_ip_ranges = optional(map(string))<br> route_priority = optional(number)<br> import_policies = optional(list(string))<br> export_policies = optional(list(string))<br> }))<br> bgp_session_range = optional(string)<br> ike_version = optional(number)<br> vpn_gateway_interface = optional(number)<br> peer_external_gateway_self_link = optional(string, null)<br> peer_external_gateway_interface = optional(number)<br> shared_secret = optional(string, "")<br> custom_learned_route_priority = optional(number)<br> }))</pre> | `{}` | no |
287287
| vpn\_gateway\_self\_link | self\_link of existing VPN gateway to be used for the vpn tunnel. create\_vpn\_gateway should be set to false | `string` | `null` | no |
288288

289289
## Outputs

modules/vpn_ha/main.tf

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@ resource "google_compute_router" "router" {
106106
}
107107

108108
resource "google_compute_router_peer" "bgp_peer" {
109-
provider = google-beta
110-
for_each = var.tunnels
111-
region = var.region
112-
project = var.project_id
113-
name = each.value.bgp_session_name != null ? each.value.bgp_session_name : "${var.name}-${each.key}"
114-
router = local.router
115-
peer_ip_address = each.value.bgp_peer.address
116-
peer_asn = each.value.bgp_peer.asn
109+
provider = google-beta
110+
for_each = var.tunnels
111+
region = var.region
112+
project = var.project_id
113+
name = each.value.bgp_session_name != null ? each.value.bgp_session_name : "${var.name}-${each.key}"
114+
router = local.router
115+
peer_ip_address = each.value.bgp_peer.address
116+
peer_asn = each.value.bgp_peer.asn
117117
custom_learned_route_priority = each.value.custom_learned_route_priority == null ? null : each.value.custom_learned_route_priority
118-
ip_address = each.value.bgp_peer_options == null ? null : each.value.bgp_peer_options.ip_address
118+
ip_address = each.value.bgp_peer_options == null ? null : each.value.bgp_peer_options.ip_address
119119
advertised_route_priority = (
120120
each.value.bgp_peer_options == null ? var.route_priority : (
121121
each.value.bgp_peer_options.route_priority == null
@@ -157,12 +157,12 @@ resource "google_compute_router_peer" "bgp_peer" {
157157
dynamic "custom_learned_ip_ranges" {
158158
for_each = (
159159
each.value.bgp_peer_options == null ? {} : (
160-
each.value.bgp_peer_options.custom_learned_ip_ranges
160+
each.value.bgp_peer_options.custom_learned_ip_ranges
161161
)
162162
)
163163
iterator = range
164164
content {
165-
range = range.key
165+
range = range.key
166166
}
167167
}
168168
interface = google_compute_router_interface.router_interface[each.key].name

modules/vpn_ha/variables.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,22 @@ variable "tunnels" {
108108
})
109109
bgp_session_name = optional(string)
110110
bgp_peer_options = optional(object({
111-
ip_address = optional(string)
112-
advertise_groups = optional(list(string))
113-
advertise_ip_ranges = optional(map(string))
114-
advertise_mode = optional(string)
111+
ip_address = optional(string)
112+
advertise_groups = optional(list(string))
113+
advertise_ip_ranges = optional(map(string))
114+
advertise_mode = optional(string)
115115
custom_learned_ip_ranges = optional(map(string))
116-
route_priority = optional(number)
117-
import_policies = optional(list(string))
118-
export_policies = optional(list(string))
116+
route_priority = optional(number)
117+
import_policies = optional(list(string))
118+
export_policies = optional(list(string))
119119
}))
120120
bgp_session_range = optional(string)
121121
ike_version = optional(number)
122122
vpn_gateway_interface = optional(number)
123123
peer_external_gateway_self_link = optional(string, null)
124124
peer_external_gateway_interface = optional(number)
125125
shared_secret = optional(string, "")
126-
custom_learned_route_priority = optional(number)
126+
custom_learned_route_priority = optional(number)
127127
}))
128128
default = {}
129129
}

0 commit comments

Comments
 (0)