diff --git a/modules/net-vpn-ha/README.md b/modules/net-vpn-ha/README.md
index 164e009f..aca124a1 100644
--- a/modules/net-vpn-ha/README.md
+++ b/modules/net-vpn-ha/README.md
@@ -213,9 +213,9 @@ module "vpn_ha" {
| [region](variables.tf#L52) | Region used for resources. | string
| ✓ | |
| [router_config](variables.tf#L57) | Cloud Router configuration for the VPN. If you want to reuse an existing router, set create to false and use name to specify the desired router. | object({…})
| ✓ | |
| [peer_gateways](variables.tf#L27) | Configuration of the (external or GCP) peer gateway. | map(object({…}))
| | {}
|
-| [tunnels](variables.tf#L72) | VPN tunnel configurations. | map(object({…}))
| | {}
|
-| [vpn_gateway](variables.tf#L108) | HA VPN Gateway Self Link for using an existing HA VPN Gateway. Ignored if `vpn_gateway_create` is set to `true`. | string
| | null
|
-| [vpn_gateway_create](variables.tf#L114) | Create HA VPN Gateway. Set to null to avoid creation. | object({…})
| | {}
|
+| [tunnels](variables.tf#L72) | VPN tunnel configurations. | map(object({…}))
| | {}
|
+| [vpn_gateway](variables.tf#L106) | HA VPN Gateway Self Link for using an existing HA VPN Gateway. Ignored if `vpn_gateway_create` is set to `true`. | string
| | null
|
+| [vpn_gateway_create](variables.tf#L112) | Create HA VPN Gateway. Set to null to avoid creation. | object({…})
| | {}
|
## Outputs
diff --git a/modules/net-vpn-ha/main.tf b/modules/net-vpn-ha/main.tf
index bbb7ca02..a86491cd 100644
--- a/modules/net-vpn-ha/main.tf
+++ b/modules/net-vpn-ha/main.tf
@@ -104,11 +104,7 @@ resource "google_compute_router_peer" "bgp_peer" {
? "CUSTOM"
: "DEFAULT"
)
- advertised_groups = concat(
- try(each.value.bgp_peer.custom_advertise.all_subnets, false) ? ["ALL_SUBNETS"] : [],
- try(each.value.bgp_peer.custom_advertise.all_vpc_subnets, false) ? ["ALL_VPC_SUBNETS"] : [],
- try(each.value.bgp_peer.custom_advertise.all_peer_vpc_subnets, false) ? ["ALL_PEER_VPC_SUBNETS"] : []
- )
+ advertised_groups = try(each.value.bgp_peer.custom_advertise.all_subnets, false) ? ["ALL_SUBNETS"] : []
dynamic "advertised_ip_ranges" {
for_each = try(each.value.bgp_peer.custom_advertise.ip_ranges, {})
iterator = range
diff --git a/modules/net-vpn-ha/variables.tf b/modules/net-vpn-ha/variables.tf
index ba86eee6..cae4c253 100644
--- a/modules/net-vpn-ha/variables.tf
+++ b/modules/net-vpn-ha/variables.tf
@@ -77,10 +77,8 @@ variable "tunnels" {
asn = number
route_priority = optional(number, 1000)
custom_advertise = optional(object({
- all_subnets = bool
- all_vpc_subnets = bool
- all_peer_vpc_subnets = bool
- ip_ranges = map(string)
+ all_subnets = bool
+ ip_ranges = map(string)
}))
md5_authentication_key = optional(object({
name = string