Open ebarrett-Ocient opened 1 month ago
Hi @ebarrett-Ocient ,
Thank you for bringing this issue to our attention. Currently, Terraform FOS does not support the unset function, such as unset route_map_out in CLI. However, I have reported this issue to the development team, and they are considering adding this feature. Sorry for any inconvenience.
Thanks, Maxx
Thanks for the info. Would I have the same issue if I used fortios_routerbgp_neighbor
instead of defining my neighbors under fortios_router_bgp
?
Hi @ebarrett-Ocient ,
I believe that the issue also occurs when using fortios_routerbgp_neighbor
. If it is feasible in your environment, you might consider deleting the fortios_routerbgp_neighbor
and then recreating it to achieve the unset function for now. Sorry for the inconvenience.
Thanks, Maxx
I think this is the case at multiple places. For example if you add a rule before another rule to a route map and the new rule does not have a property set which has been set on the former one, you'll end up with a wrong rule configuration. It would be nice if the provider called unset in appropriate places in case the property is not defined or is set to null.
Hi @misastovicek ,
Thank you for your valuable suggestion. We’re pleased to inform you that the development team has included the unset function in our Terraform provider for the upcoming release. If an argument does not have a default value and can be set to empty, Terraform will handle it accordingly.
Thanks, Maxx
If
route_map_out
is configured under aneighbor
within thefortios_router_bgp
resource and subsequently removed, executingterraform apply
does not reflect this change.Steps to Reproduce:
Remove the line
route_map_out = "neighbor-out"
from the configuration:Expected Behavior: Terraform should detect the removal of
route_map_out
and apply the change accordingly.Actual Behavior: Terraform finds no changes to apply, despite the removal of
route_map_out
from the configuration.I have experienced this issue on versions 1.16.0 and 1.20.0.