Describe the bug
Not an expert for RouterOS but when I want to create a bridge interface without setting the pvid parameter, I'm getting following error:
When applying changes to routeros_interface_bridge.bridge, provider "provider[\"registry.terraform.io/gnewbury1/routeros\"]" produced an unexpected new value: Root resource was present, but now absent.
After looking into Terraform debug logs I noticed following line:
{"@level":"warn","@message":"unexpected data","@timestamp":"2022-10-23T14:04:28.141949+02:00","registry.terraform.io/gnewbury1/routeros:stdout":"value of pvid out of range (1..4094)"}
Based on the error and according to the [docs[(https://help.mikrotik.com/docs/display/ROS/Bridging+and+Switching) I'm assuming that default value should be 1 and not 0 as in the current state:
"pvid": {
Type: schema.TypeInt,
Optional: true,
Default: 0,
},
To Reproduce
Try to apply example configuration of routeros_interface_bridge
Expected behavior
Successful creation of bridge interface
Stack Trace
routeros_interface_bridge.bridge: Modifying... [id=*<id>]
....
{"@level":"trace","@message":"received data","@module":"provider.stdio","@timestamp":"2022-10-23T14:04:28.141913+02:00","channel":"STDOUT","len":36}
{"@level":"warn","@message":"unexpected data","@timestamp":"2022-10-23T14:04:28.141949+02:00","registry.terraform.io/gnewbury1/routeros:stdout":"value of pvid out of range (1..4094)"}
....
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to routeros_interface_bridge.bridge, provider "provider[\"registry.terraform.io/gnewbury1/routeros\"]" produced an unexpected new value: Root resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Additional context
Versions:
Terraform: 1.3.3
Provider: 0.3.4
RouterOS: 7.5
bug