Skip to content

Commit

Permalink
fix: Add check_gateway field to routeros_ip_route (#187)
Browse files Browse the repository at this point in the history
Fixes #186
  • Loading branch information
vaerh authored Apr 23, 2023
1 parent 46b16d6 commit 20b84ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions routeros/resource_ip_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ func ResourceIPRoute() *schema.Resource {
Default: false,
Description: "It's a blackhole route.",
},
"check_gateway": {
Type: schema.TypeString,
Optional: true,
Description: "Currently used check-gateway option.",
ValidateFunc: validation.StringInSlice([]string{"arp", "bfd", "bfd-multihop", "none", "ping"}, false),
},
KeyComment: PropCommentRw,
"dhcp": {
Type: schema.TypeBool,
Expand Down
9 changes: 5 additions & 4 deletions routeros/resource_ip_route_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ provider "routeros" {
}
resource "routeros_ip_route" "test_route" {
distance = 1
dst_address = "10.0.0.0/24"
gateway = "192.168.103.1"
}
distance = 1
dst_address = "10.0.0.0/24"
gateway = "192.168.103.1"
check_gateway = "bfd-multihop"
}
`
}

0 comments on commit 20b84ae

Please sign in to comment.