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

fix: routeros_ipv6_dhcp_client prefix_hint validation issue #611

Merged
merged 1 commit into from
Dec 2, 2024
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
1 change: 0 additions & 1 deletion routeros/resource_ipv6_dhcp_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ func ResourceIPv6DhcpClient() *schema.Resource {
Optional: true,
Computed: true,
Description: "Include a preferred prefix length.",
ValidateFunc: validation.IsIPv6Address,
DiffSuppressFunc: AlwaysPresentNotUserProvided,
},
"rapid_commit": {
Expand Down
10 changes: 6 additions & 4 deletions routeros/resource_ipv6_dhcp_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func TestAccIPv6DhcpClient_basic(t *testing.T) {
resource.TestCheckResourceAttr(testIPv6DhcpClient, "interface", "ether1"),
resource.TestCheckResourceAttr(testIPv6DhcpClient, "pool_name", "inet-provider-pool"),
resource.TestCheckResourceAttr(testIPv6DhcpClient, "request.0", "prefix"),
resource.TestCheckResourceAttr(testIPv6DhcpClient, "prefix_hint", "::/60"),
),
},
},
Expand All @@ -38,10 +39,11 @@ func testAccIPv6DhcpClientConfig() string {
return providerConfig + `

resource "routeros_ipv6_dhcp_client" "client" {
request = ["prefix"]
pool_name = "inet-provider-pool"
pool_prefix_length = 64
interface = "ether1"
request = ["prefix"]
pool_name = "inet-provider-pool"
pool_prefix_length = 64
interface = "ether1"
prefix_hint = "::/60"
}

`
Expand Down