Community discussions

MikroTik App
 
cytadelle
just joined
Topic Author
Posts: 3
Joined: Mon Jan 13, 2025 10:56 pm

Router OS 7.18 beta 6 & Terraform Provider v1.76.3 & -> Error: unknown RouterOS reply word: !empty

Fri Feb 14, 2025 10:16 pm

Hello,

I have uncounter a bug with the Terraform Module with this Beta version: https://github.com/terraform-routeros/t ... issues/661

Describe the bug
When using terraform with RouterOS on a Mikrotik Switch CCR2116 I have this error when something is not found.

provider registry.terraform.io/terraform-routeros/routeros v1.76.3
To Reproduce
Don't know how to reproduce it but seams to be frequent on multiple ressources.

Expected behavior
Not an unknown reply word

Debug Information
Error: unknown RouterOS reply word: !empty

│ with module.l3-routers.routeros_ip_route.ip-routes["VRF-XXX-WAN_DST-0.0.0.0/0_GW-XXX"],
│ on ../../shared/src/mikrotik-l3-routers/main.tf line 38, in resource "routeros_ip_route" "ip-routes":
│ 38: resource "routeros_ip_route" "ip-routes" {

Thanks for your support
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4694
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: Router OS 7.18 beta 6 & Terraform Provider v1.76.3 & -> Error: unknown RouterOS reply word: !empty

Sat Feb 15, 2025 12:52 am

It's noted in the release notes:

*) console - put !empty sentence when API query returns nothing;
 
cytadelle
just joined
Topic Author
Posts: 3
Joined: Mon Jan 13, 2025 10:56 pm

Re: Router OS 7.18 beta 6 & Terraform Provider v1.76.3 & -> Error: unknown RouterOS reply word: !empty

Sat Feb 15, 2025 1:05 am

It's noted in the release notes:

*) console - put !empty sentence when API query returns nothing;
Thank you, I have relayed the info to the Mikrotik Terraform Provider team
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4694
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: Router OS 7.18 beta 6 & Terraform Provider v1.76.3 & -> Error: unknown RouterOS reply word: !empty

Sat Feb 15, 2025 3:35 am

Well, it likely the https://github.com/go-routeros/routeros team that will have to fix it. I think it's just another case "!empty" that does nothing would fix it here: https://github.com/go-routeros/routeros ... en.go#L113

Also, you should be able to use REST API mode in Terraform, and that would avoid the issue in 7.18beta for now.

On the Mikrotik side, the !empty should be documented in https://help.mikrotik.com/docs/spaces/R ... #API-!trap.
 
cytadelle
just joined
Topic Author
Posts: 3
Joined: Mon Jan 13, 2025 10:56 pm

Re: Router OS 7.18 beta 6 & Terraform Provider v1.76.3 & -> Error: unknown RouterOS reply word: !empty

Mon Feb 17, 2025 8:19 pm

Express fix by the RouterOS Provider