Skip to content

Commit

Permalink
fix: ip/route dst_address should not be mandatory (#185)
Browse files Browse the repository at this point in the history
Fixes #184
  • Loading branch information
vaerh authored Apr 22, 2023
1 parent 61ed31c commit 9cf42c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion routeros/resource_ip_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func ResourceIPRoute() *schema.Resource {
},
"dst_address": {
Type: schema.TypeString,
Required: true,
Optional: true,
Default: "0.0.0.0/0", // Without the default setting, a non-empty plan is returned.
Description: "IP prefix of route, specifies destination addresses that this route can be used for.",
ValidateFunc: validation.IsCIDR,
},
Expand Down
8 changes: 7 additions & 1 deletion routeros/resource_ipv6_address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,13 @@ resource "routeros_ipv6_address" "test_v6_address" {
no_dad = true
// address = "::1/64"
// from_pool = "pool1"
}
}
resource "routeros_ip_route" "d2_rmark_isp22" {
distance = 2
gateway = "10.10.10.1"
routing_table = "main"
target_scope = 12
}
`
}

0 comments on commit 9cf42c7

Please sign in to comment.