Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marked google_compute_router_peer.peer_ip_address as default from api #15095

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/8256.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
compute: made `google_compute_router_peer.peer_ip_address` optional
```
9 changes: 0 additions & 9 deletions google/resource_compute_router_bgp_peer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,16 +482,13 @@ resource "google_compute_router_interface" "foobar" {
name = "%s"
router = google_compute_router.foobar.name
region = google_compute_router.foobar.region
ip_range = "169.254.3.1/30"
vpn_tunnel = google_compute_vpn_tunnel.foobar.name
}

resource "google_compute_router_peer" "foobar" {
name = "%s"
router = google_compute_router.foobar.name
region = google_compute_router.foobar.region
ip_address = "169.254.3.1"
peer_ip_address = "169.254.3.2"
peer_asn = 65515
advertised_route_priority = 100
interface = google_compute_router_interface.foobar.name
Expand Down Expand Up @@ -558,7 +555,6 @@ resource "google_compute_router_interface" "foobar" {
name = "%s"
router = google_compute_router.foobar.name
region = google_compute_router.foobar.region
ip_range = "169.254.3.1/30"
vpn_tunnel = google_compute_vpn_tunnel.foobar.name
}
`, routerName, routerName, routerName, routerName, routerName, routerName, routerName, routerName)
Expand Down Expand Up @@ -888,15 +884,13 @@ resource "google_compute_router_interface" "foobar" {
name = "%s"
router = google_compute_router.foobar.name
region = google_compute_router.foobar.region
ip_range = "169.254.3.1/30"
vpn_tunnel = google_compute_vpn_tunnel.foobar.name
}

resource "google_compute_router_peer" "foobar" {
name = "%s"
router = google_compute_router.foobar.name
region = google_compute_router.foobar.region
peer_ip_address = "169.254.3.2"
peer_asn = 65515
advertised_route_priority = 100
interface = google_compute_router_interface.foobar.name
Expand Down Expand Up @@ -964,16 +958,13 @@ resource "google_compute_router_interface" "foobar" {
name = "%s"
router = google_compute_router.foobar.name
region = google_compute_router.foobar.region
ip_range = "169.254.3.1/30"
vpn_tunnel = google_compute_vpn_tunnel.foobar.name
}

resource "google_compute_router_peer" "foobar" {
name = "%s"
router = google_compute_router.foobar.name
region = google_compute_router.foobar.region
ip_address = "169.254.3.1"
peer_ip_address = "169.254.3.2"
peer_asn = 65515
advertised_route_priority = 100
interface = google_compute_router_interface.foobar.name
Expand Down
13 changes: 7 additions & 6 deletions google/services/compute/resource_compute_router_peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@ except the last character, which cannot be a dash.`,
Required: true,
Description: `Peer BGP Autonomous System Number (ASN).
Each BGP interface may use a different value.`,
},
"peer_ip_address": {
Type: schema.TypeString,
Required: true,
Description: `IP address of the BGP interface outside Google Cloud Platform.
Only IPv4 is supported.`,
},
"router": {
Type: schema.TypeString,
Expand Down Expand Up @@ -241,6 +235,13 @@ Only IPv4 is supported.`,
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_ip_address": {
Type: schema.TypeString,
Computed: true,
Optional: true,
Description: `IP address of the BGP interface outside Google Cloud Platform.
Only IPv4 is supported. Required if 'ip_address' is set.`,
},
"peer_ipv6_nexthop_address": {
Type: schema.TypeString,
Expand Down
11 changes: 5 additions & 6 deletions website/docs/r/compute_router_peer.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ resource "google_compute_router_peer" "peer" {
name = "my-router-peer"
router = "my-router"
region = "us-central1"
peer_ip_address = "169.254.1.2"
peer_asn = 65513
advertised_route_priority = 100
interface = "interface-1"
Expand Down Expand Up @@ -215,11 +214,6 @@ The following arguments are supported:
(Required)
Name of the interface the BGP peer is associated with.

* `peer_ip_address` -
(Required)
IP address of the BGP interface outside Google Cloud Platform.
Only IPv4 is supported.

* `peer_asn` -
(Required)
Peer BGP Autonomous System Number (ASN).
Expand All @@ -238,6 +232,11 @@ The following arguments are supported:
IP address of the interface inside Google Cloud Platform.
Only IPv4 is supported.

* `peer_ip_address` -
(Optional)
IP address of the BGP interface outside Google Cloud Platform.
Only IPv4 is supported. Required if `ip_address` is set.

* `advertised_route_priority` -
(Optional)
The priority of routes advertised to this BGP peer.
Expand Down