terraform-provider-fortios icon indicating copy to clipboard operation
terraform-provider-fortios copied to clipboard

fortios_routerbgp_neighbor default weight

Open zippanto opened this issue 1 year ago • 1 comments

Hi,

We are testing on FortiOS 7.2.8 and it seems on the firewall the default weight value for a BGP neighbor is 4294967295. This seems incorrect even according to the CLI:

weight    Enter an integer value from <0> to <65535> (default: <0>).

Default value:

FW (192.168.0.1) # show full-configuration
config neighbor
    edit "192.168.0.1"
        .
        .
        .
        set weight 4294967295

Not sure if this is fixed in any future FortiOS version. However we are unable to set this default value using terraform as it only allows values 0 - 65535.

Please advise.

Thanks.

zippanto avatar Oct 09 '24 13:10 zippanto

Hi @zippanto ,

Thank you for your question. I have noticed this behavior as well, and it may be an intentional design choice. This also applies to the 'keep-alive-timer' and 'connect-timer,' which are designed as integers without assigned default values. In some cases, a value of 0 can have specific meaning, so FOS might use the highest unsigned 32-bit integer (4294967295) to represent that these arguments are non-functional. However, I will reach out to the API team for further clarification and to confirm the correct procedure for unsetting these values via the API.

Thanks, Maxx

MaxxLiu22 avatar Oct 09 '24 22:10 MaxxLiu22

Hi, I am proceeding to close this case. If you have any further questions, please feel free to reopen it or create a new case.

MaxxLiu22 avatar Jan 13 '25 22:01 MaxxLiu22

Hi @MaxxLiu22,

Did you hear back from the API team? What is the correct way to set the default value?

Thanks.

zippanto avatar Jan 14 '25 13:01 zippanto

Hi @zippanto,

This issue should have been addressed in Terraform FOS 1.22.0. If you set the weight to -1, it will unset the weight to 4294967295. Please try it at your convenience. Additionally, starting with FOS 7.6.3 (which has not been released yet), they will improve the helper message to introduce 4294967295 more clearly, Thank you for supporting our community.

Thank you, Maxx

MaxxLiu22 avatar Mar 04 '25 00:03 MaxxLiu22

Hi, I am proceeding to close this case. If you have any further questions, please feel free to reopen it or create a new case.

MaxxLiu22 avatar Mar 13 '25 17:03 MaxxLiu22