-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform stuck in a prefix-lists configuration change loop #338
Comments
I also have similar issues with the |
Thank you for bringing this issue to my attention. I was able to reproduce it, and it appears that the flag argument is hidden from the FOS CLI but is still functional via the API. I have reported this to the development team for resolution. Would it be possible for you to share one of your fortios_router_routemap configurations? I believe the match_flags and set_flags might be accessible when specific arguments are configured, but I haven’t yet found the way. Please feel free to reach out if you have any further questions. Thanks, |
Sure, here's one that was giving me trouble:
I found that terraform would remove my local preference config the first time I ran There were also a number of other resources that ended up causing issues. If I get some time later this afternoon, I can provide you with some more details. |
We are having the same issue moving from 1.20.0 to 1.21.0. Rolling back to 1.20.0 fixed the problems. the match_flags and set_flags were causing the apply to continuously keep having to update values (one apply would set some things correctly, but clearing the flags caused the others to reset). It definitely has something to do with the null support |
Hi @chriswiggins , We sincerely apologize for the inconvenience. We have documented this issue and are currently monitoring for any similar occurrences. This issue arises from Terraform FOS provider’s new support for the unset feature when certain configurations are not specified in the TF files. If you encounter the same issue with other resources, it would greatly assist us in addressing them collectively. Once again, we apologize for any trouble this may have caused and appreciate your understanding. Thanks, |
@MaxxLiu22 Here are a few other issues I had when upgrading to 1.21.0:
After accepting this and running
Let me know if you'd like any more specific details about any of these. |
Hi @ebarrett-Ocient , Thank you so much for your support of our community. The information you've provided is sufficient for us to resolve the issue. I have documented all the resources you mentioned. Thanks, |
The prefix lists apply loop also has an issue with CIDR notation even with 1.20.0. For example:
this is with a resource such as this in the common module:
where the variables are cidr string attributes from objects passed from parent module. |
Upgrading from FortiOS 7.0.14 to 7.2.10 resulted in terraform wanting to make further changes. First, it wanted to update the
Here's my terraform code for this resource:
The only reason I had set either The other thing terraform wanted to do was remove the
Although I have an |
Hi all, Terraform FOS 1.21.1 has been released, addressing several unexpected change issues. The netmask incompatibility for IP arguments should now be resolved. Additionally, the argument prefix may require special handling @zapotah , which I will report to the development team. Please note that the argument as may need to be adjusted depending on your FOS version—it can be either an integer or a string. Terraform has introduced as and as_string options to accommodate this change. In @ebarrett-Ocient’s case, it appears that as is a string in your FOS version, so you may need to replace as with as_string for compatibility. Another customer encountered a similar issue, which you can review here. let me know if you still have issues. Thanks, |
I'm noticing some very strange behavior with prefix-lists since upgrading from 1.14.0 to 1.21.0. I have the following resource defined in my terraform code:
On my Fortigate, my configuration looks like the following:
When I run
terraform plan
, it wants to make the following changes:If I run
terraform apply
and accept the changes, my Fortigate configuration then looks like the following:As you can see, under
edit 1
,le
is no longer set to 32 and, underedit 100
, myprefix
is set to255.255.255.255 255.255.255.255
instead ofany
.At this point, if I run
terraform apply
, it wants to revert those changes:If I accept those changes, we're back we're we started in terms of configuration on the Fortigate. However, if I run
terraform plan
again, it once again wants to update myflags
:If I accept these changes, it once again makes edits to my
le
andprefix
values. Essentially, terraform is stuck in a loop where it either updates those two values or reverts them back to the intended configuration over and over.As a workaround, I have added the
flags
values terraform wants to apply to my configuration to my code:This is definitely more than a little hokey as the
flags
config evidently doesn't do anything, but it seems to have resolved my issue for now.The text was updated successfully, but these errors were encountered: