Describe the bug
I setup a RouterOS with two addresses (*1 and *2, using 10.0.9.1/24 and 192.168.88.1/24), the REST api also returns the correct values.
Using the terraform provider, the list contains the same address twice and is missing the first one. When I create a third address, the array contains three times the last one.
This is also reproducable for the interfaces and routes datasource.
ip_addresses = {
"addresses" = tolist([
{
"actual_interface" = "ether1"
"address" = "192.168.88.1/24"
"disabled" = true
"dynamic" = false
"id" = "*2"
"interface" = "ether1"
"invalid" = false
"network" = "192.168.88.0"
},
{
"actual_interface" = "ether1"
"address" = "192.168.88.1/24"
"disabled" = true
"dynamic" = false
"id" = "*2"
"interface" = "ether1"
"invalid" = false
"network" = "192.168.88.0"
},
])
"id" = "terraform-20220120102446891700000001"
}
To Reproduce
Setup multiple routes, addresses or interfaces and query those.
Minimal terraform example:
provider "routeros" {
hosturl = "https://10.0.9.150"
username = "admin"
password = ""
insecure = true
}
data "routeros_interfaces" "interfaces" {}
data "routeros_ip_routes" "routes" {}
data "routeros_ip_addresses" "addresses" {}
output "interfaces" {
value = data.routeros_interfaces.interfaces
}
output "ip_addresses" {
value = data.routeros_ip_addresses.addresses
}
output "routes" {
value = data.routeros_ip_routes.routes
}
Expected behavior
Array with the correct entries.
bug