Skip to content

Commit 380d763

Browse files
authored
feat!: add support for BGP keepalive_interval (#42)
1 parent f5bca54 commit 380d763

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ resource "google_compute_router" "router" {
2929
# This forces the config to explicitly state what subnets and ip ranges
3030
# to advertise. To advertise the same range as DEFAULT, set
3131
# `advertise_groups = ["ALL_SUBNETS"]`.
32-
advertise_mode = "CUSTOM"
33-
advertised_groups = lookup(var.bgp, "advertised_groups", null)
32+
advertise_mode = "CUSTOM"
33+
advertised_groups = lookup(var.bgp, "advertised_groups", null)
34+
keepalive_interval = lookup(var.bgp, "keepalive_interval", null)
3435

3536
dynamic "advertised_ip_ranges" {
3637
for_each = lookup(var.bgp, "advertised_ip_ranges", [])

test/fixtures/simple_example/main.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
provider "random" {
18-
version = "~> 2.0"
19-
}
20-
2117
resource "random_pet" "main" {
2218
length = 1
2319
prefix = "simple-example"

test/fixtures/simple_example/versions.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,11 @@
1616

1717
terraform {
1818
required_version = ">=0.12.6"
19+
required_providers {
20+
21+
random = {
22+
source = "hashicorp/random"
23+
version = ">= 2.0"
24+
}
25+
}
1926
}

variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ variable "description" {
5050
# - advertised_ip_ranges (list(object), optional): User-specified list of individual IP ranges to advertise.
5151
# - range (string, required): The IP range to advertise.
5252
# - description (string, optional): User-specified description for the IP range.
53+
# - keepalive_interval (integer, optional): Period of time in seconds to wait before sending a new BGP keepalive message to the peer.
5354
variable "bgp" {
5455
description = "BGP information specific to this router."
5556
type = any

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ terraform {
2020

2121
google = {
2222
source = "hashicorp/google"
23-
version = ">= 3.53, < 5.0"
23+
version = ">= 4.13, < 5.0"
2424
}
2525
}
2626

0 commit comments

Comments
 (0)