Skip to content

Commit 8c31e1c

Browse files
Marked google_compute_router_peer.peer_ip_address as default from api (#8256) (#15095)
Signed-off-by: Modular Magician <[email protected]>
1 parent 19493c7 commit 8c31e1c

File tree

4 files changed

+15
-21
lines changed

4 files changed

+15
-21
lines changed

.changelog/8256.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
compute: made `google_compute_router_peer.peer_ip_address` optional
3+
```

google/resource_compute_router_bgp_peer_test.go

-9
Original file line numberDiff line numberDiff line change
@@ -482,16 +482,13 @@ resource "google_compute_router_interface" "foobar" {
482482
name = "%s"
483483
router = google_compute_router.foobar.name
484484
region = google_compute_router.foobar.region
485-
ip_range = "169.254.3.1/30"
486485
vpn_tunnel = google_compute_vpn_tunnel.foobar.name
487486
}
488487
489488
resource "google_compute_router_peer" "foobar" {
490489
name = "%s"
491490
router = google_compute_router.foobar.name
492491
region = google_compute_router.foobar.region
493-
ip_address = "169.254.3.1"
494-
peer_ip_address = "169.254.3.2"
495492
peer_asn = 65515
496493
advertised_route_priority = 100
497494
interface = google_compute_router_interface.foobar.name
@@ -558,7 +555,6 @@ resource "google_compute_router_interface" "foobar" {
558555
name = "%s"
559556
router = google_compute_router.foobar.name
560557
region = google_compute_router.foobar.region
561-
ip_range = "169.254.3.1/30"
562558
vpn_tunnel = google_compute_vpn_tunnel.foobar.name
563559
}
564560
`, routerName, routerName, routerName, routerName, routerName, routerName, routerName, routerName)
@@ -888,15 +884,13 @@ resource "google_compute_router_interface" "foobar" {
888884
name = "%s"
889885
router = google_compute_router.foobar.name
890886
region = google_compute_router.foobar.region
891-
ip_range = "169.254.3.1/30"
892887
vpn_tunnel = google_compute_vpn_tunnel.foobar.name
893888
}
894889
895890
resource "google_compute_router_peer" "foobar" {
896891
name = "%s"
897892
router = google_compute_router.foobar.name
898893
region = google_compute_router.foobar.region
899-
peer_ip_address = "169.254.3.2"
900894
peer_asn = 65515
901895
advertised_route_priority = 100
902896
interface = google_compute_router_interface.foobar.name
@@ -964,16 +958,13 @@ resource "google_compute_router_interface" "foobar" {
964958
name = "%s"
965959
router = google_compute_router.foobar.name
966960
region = google_compute_router.foobar.region
967-
ip_range = "169.254.3.1/30"
968961
vpn_tunnel = google_compute_vpn_tunnel.foobar.name
969962
}
970963
971964
resource "google_compute_router_peer" "foobar" {
972965
name = "%s"
973966
router = google_compute_router.foobar.name
974967
region = google_compute_router.foobar.region
975-
ip_address = "169.254.3.1"
976-
peer_ip_address = "169.254.3.2"
977968
peer_asn = 65515
978969
advertised_route_priority = 100
979970
interface = google_compute_router_interface.foobar.name

google/services/compute/resource_compute_router_peer.go

+7-6
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,6 @@ except the last character, which cannot be a dash.`,
8888
Required: true,
8989
Description: `Peer BGP Autonomous System Number (ASN).
9090
Each BGP interface may use a different value.`,
91-
},
92-
"peer_ip_address": {
93-
Type: schema.TypeString,
94-
Required: true,
95-
Description: `IP address of the BGP interface outside Google Cloud Platform.
96-
Only IPv4 is supported.`,
9791
},
9892
"router": {
9993
Type: schema.TypeString,
@@ -241,6 +235,13 @@ Only IPv4 is supported.`,
241235
The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64.
242236
If you do not specify the next hop addresses, Google Cloud automatically
243237
assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you.`,
238+
},
239+
"peer_ip_address": {
240+
Type: schema.TypeString,
241+
Computed: true,
242+
Optional: true,
243+
Description: `IP address of the BGP interface outside Google Cloud Platform.
244+
Only IPv4 is supported. Required if 'ip_address' is set.`,
244245
},
245246
"peer_ipv6_nexthop_address": {
246247
Type: schema.TypeString,

website/docs/r/compute_router_peer.html.markdown

+5-6
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ resource "google_compute_router_peer" "peer" {
4040
name = "my-router-peer"
4141
router = "my-router"
4242
region = "us-central1"
43-
peer_ip_address = "169.254.1.2"
4443
peer_asn = 65513
4544
advertised_route_priority = 100
4645
interface = "interface-1"
@@ -215,11 +214,6 @@ The following arguments are supported:
215214
(Required)
216215
Name of the interface the BGP peer is associated with.
217216

218-
* `peer_ip_address` -
219-
(Required)
220-
IP address of the BGP interface outside Google Cloud Platform.
221-
Only IPv4 is supported.
222-
223217
* `peer_asn` -
224218
(Required)
225219
Peer BGP Autonomous System Number (ASN).
@@ -238,6 +232,11 @@ The following arguments are supported:
238232
IP address of the interface inside Google Cloud Platform.
239233
Only IPv4 is supported.
240234

235+
* `peer_ip_address` -
236+
(Optional)
237+
IP address of the BGP interface outside Google Cloud Platform.
238+
Only IPv4 is supported. Required if `ip_address` is set.
239+
241240
* `advertised_route_priority` -
242241
(Optional)
243242
The priority of routes advertised to this BGP peer.

0 commit comments

Comments
 (0)