Skip to content

Commit

Permalink
Adding ipv6 support for bgp router peer, router interface and router (#…
Browse files Browse the repository at this point in the history
…10375) (#17797)

[upstream:4838a3707d954dd1f8187968266ef7e4623d3416]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician committed Apr 8, 2024
1 parent 105fcd0 commit 07d44c7
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .changelog/10375.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```release-note:enhancement
compute: added `identifier_range` field to `google_compute_router` resource (beta)
```
```release-note:enhancement
compute: added `ip_version` field to `google_compute_router_interface` resource (beta)
```
```release-note:enhancement
compute: added `enable_ipv4`, `ipv4_nexthop_address` and `peer_ipv4_nexthop_address` fields to `google_compute_router_peer` resource (beta)
```
Original file line number Diff line number Diff line change
Expand Up @@ -1421,8 +1421,8 @@ resource "google_compute_router_peer" "foobar" {
peer_asn = 65515
advertised_route_priority = 100
interface = google_compute_router_interface.foobar.name
enable_ipv6 = %v
}
`, routerName, routerName, routerName, routerName, routerName, routerName, routerName, routerName, enableIpv6)
}
Expand Down Expand Up @@ -1497,7 +1497,6 @@ resource "google_compute_router_peer" "foobar" {
peer_asn = 65515
advertised_route_priority = 100
interface = google_compute_router_interface.foobar.name
enable_ipv6 = %v
ipv6_nexthop_address = "2600:2d00:0000:0002:0000:0000:0000:0001"
peer_ipv6_nexthop_address = "2600:2d00:0:2::2"
Expand Down
8 changes: 8 additions & 0 deletions website/docs/r/compute_router.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ The following arguments are supported:
between the two peers. If set, this value must be between 20 and 60.
The default is 20.

* `identifier_range` -
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
Explicitly specifies a range of valid BGP Identifiers for this Router.
It is provided as a link-local IPv4 range (from 169.254.0.0/16), of
size at least /30, even if the BGP sessions are over IPv6. It must
not overlap with any IPv4 BGP session ranges. Other vendors commonly
call this router ID.


<a name="nested_advertised_ip_ranges"></a>The `advertised_ip_ranges` block supports:

Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/compute_router_interface.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ In addition to the above required fields, a router interface must have specified
* `ip_range` - (Optional) IP address and range of the interface. The IP range must be
in the RFC3927 link-local IP space. Changing this forces a new interface to be created.

* `ip_version` - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
IP version of this interface. Can be either IPV4 or IPV6.

* `vpn_tunnel` - (Optional) The name or resource link to the VPN tunnel this
interface will be linked to. Changing this forces a new interface to be created. Only
one of `vpn_tunnel`, `interconnect_attachment` or `subnetwork` can be specified.
Expand Down
12 changes: 12 additions & 0 deletions website/docs/r/compute_router_peer.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -282,20 +282,32 @@ The following arguments are supported:
(Optional)
Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default.

* `enable_ipv4` -
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4.

* `ipv6_nexthop_address` -
(Optional)
IPv6 address of the interface inside Google Cloud Platform.
The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64.
If you do not specify the next hop addresses, Google Cloud automatically
assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you.

* `ipv4_nexthop_address` -
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
IPv4 address of the interface inside Google Cloud Platform.

* `peer_ipv6_nexthop_address` -
(Optional)
IPv6 address of the BGP interface outside Google Cloud Platform.
The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64.
If you do not specify the next hop addresses, Google Cloud automatically
assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you.

* `peer_ipv4_nexthop_address` -
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
IPv4 address of the BGP interface outside Google Cloud Platform.

* `region` -
(Optional)
Region where the router and BgpPeer reside.
Expand Down

0 comments on commit 07d44c7

Please sign in to comment.