CiscoDevNet / terraform-provider-iosxr

Terraform Cisco IOS-XR Provider
https://registry.terraform.io/providers/CiscoDevNet/iosxr
Mozilla Public License 2.0
6 stars 9 forks source link

BGP questions/missing features #197

Closed rjoensen closed 1 year ago

rjoensen commented 1 year ago

Hello,

We’re just getting to implementing BGP into Terraform and I am a little bit confused as to what is the best practice here.

I have started to use iosxr_router_bgp, but I see there is vrf for all of the resources as well. It appears that VRF has been equipped with route policies, however its not implemented in all of the vrf resources either. So this is a little bit confusing.

Example:

router bgp #ASN timers bgp 30 90 60 bgp router-id #snipped bgp bestpath compare-routerid address-family ipv4 unicast maximum-paths ibgp 2 nexthop trigger-delay critical 0 nexthop trigger-delay non-critical 0 network prefix/network route-policy #POLICY redistribute connected route-policy #POLICY redistribute static route-policy #POLICY

(This is for both IPv4 and IPv6).

neighbor configuration seems to be lacking this ability as well.

Example:

neighbor #neighbor address-family ipv4 unicast route-policy #POLICY in/out

Best wishes, rjoensen

danischm commented 1 year ago

Thanks for raising the issue. We are looking to add support for this.

rjoensen commented 1 year ago

Thank you! Appreciate all of the work you have done on this provider!

Best wishes, rjoensen

summed commented 1 year ago

Hi @danischm,

If we wanted to assist with fixing this issue, where should we start?

atb!

danischm commented 1 year ago

All the code and documentation is auto-generated from YANG models and definitions being maintained here (https://github.com/CiscoDevNet/terraform-provider-iosxr/tree/main/gen/definitions). To add support for additional BGP neighbor configurations you would need to add the relevant attributes here (https://github.com/CiscoDevNet/terraform-provider-iosxr/blob/main/gen/definitions/router_bgp.yaml) and then run go generate to generate the code, documentation and tests.

summed commented 1 year ago

@danischm Hi again Daniel. I just can find the strength/time to dive into this. Any chance of purchasing a couple of hours from you to finish this? :)

danischm commented 1 year ago

https://github.com/CiscoDevNet/terraform-provider-iosxr/commit/c4af7dfda1f4f45e968a6e5e79962c72d90da24a

danischm commented 1 year ago

Added in v0.3.2 release.