Due to the way the new Plugin Framework works, all configuration values with null value must remain this value, otherwise, during apply user will get this error:
When applying changes to ... provider produced an
unexpected new value: .FIELD: was null, but now cty.StringVal("").
That is known behavior because of underlying RouterOS client implementation and the way of mapping from RouterOS model to Terraform model.
Here are the ways to solve this issue:
Update mapping of zero values to Terraform model
Mark all optional fields as Compouted: true so Plugin Framework accepts change to the field after terraform apply
Option 2 is easier at the moment and doesn't logic update which could potentially break something.
Due to the way the new
Plugin Framework
works, all configuration values withnull
value must remain this value, otherwise, during apply user will get this error:That is known behavior because of underlying RouterOS client implementation and the way of mapping from RouterOS model to Terraform model.
Here are the ways to solve this issue:
zero
values to Terraform modelCompouted: true
so Plugin Framework accepts change to the field afterterraform apply
Option 2 is easier at the moment and doesn't logic update which could potentially break something.