Closed maikelpoot closed 2 months ago
Hi @maikelpoot ,
Thank you for raising this issue, I can reproduce it, this issue is similar with https://github.com/fortinetdev/terraform-provider-fortios/issues/267#issue-1660584313, I have reported them to the development team for further investigation.
Thanks, Maxx
Hi @maikelpoot
I try to reproduce this issue with Terraform FOS 1.21.0, but it did not recur after running exportFORTIOS_IMPORT_TABLE=true
and importing the fortios_firewall_vip. Therefore, I will proceed to close this case. If you have any further questions or need additional assistance, please feel free to reopen this case or open a new one, and we will be happy to help.
Thank you, Maxx
When importing an existing virtual server into terraform the
real_servers
block isn't loaded into the state.This causes 2 problems:
Terraform doesn't update the state on a refresh, so changes made outside of terraform are not noticed and doesn't trigger an update to enforce terraform configuration.
First plan/apply after the import triggers a in-place update to add the real server config. In my tests this doesn't cause an error or duplicate real_servers in fortigate but you can't see if this changes the live configuration.
Using:
Reproduce:
Import virtual server:
Check state, should return 2 lines, but returns 0