terraform-provider-fortios
terraform-provider-fortios copied to clipboard
`fortios_router_bgp` enable redistribute, and each time a terraform apply is executed it detects a change
my Terraform configuration
Using fortinetdev/fortios/1.13.2
resource "fortios_router_bgp" "fgt01conf_rtbgp" {
provider = fortios.fgt01_intpub
as = 65111
router_id = "172.26.255.47"
neighbor {
ip = "172.26.255.50"
next_hop_self = "enable"
soft_reconfiguration = "enable"
description = "FGT04MICRO"
remote_as = 65111
send_community = "standard"
update_source = fortios_system_interface.fgt01conf_int_loopback.id
password = random_password.rnd_passwd_bgp["01"].result
}
# redistribute {
# name = "connected"
# status = "disable"
# }
# redistribute {
# name = "rip"
# status = "disable"
# }
# redistribute {
# name = "ospf"
# status = "disable"
# }
redistribute {
name = "static"
status = "enable"
}
# redistribute {
# name = "isis"
# status = "disable"
# }
# redistribute6 {
# name = "connected"
# status = "disable"
# }
# redistribute6 {
# name = "rip"
# status = "disable"
# }
# redistribute6 {
# name = "ospf"
# status = "disable"
# }
# redistribute6 {
# name = "static"
# status = "disable"
# }
# redistribute6 {
# name = "isis"
# status = "disable"
# }
}
each terraform apply
is detected as a change, and even mismatch redistribute static and change to connected, even thou there is already a redistribute connected enable
So this is a quirk with the provider, either uncomment the other redist blocks (order matters) or try setting dynamic_sort_subtable to true
Hi @afmoreno1982,
Thank you for raising this issue. Argument redistribute
is type of list of block, and current logic is comparing them by the sequence. Team is working on this issue. We will fix it in the future release.
Thanks, Xing