Open reckio123 opened 4 months ago
Hey @reckio123 Thanks for raising this issue.
That was the limitation from the NetScaler's resource. There is a threshold max length for the attribute commandlines.
But we have a workaround for the same.
Please split your commandlines and create different resource. Below is the alternative configuration for your above provided configuration.
resource "citrixadc_routerdynamicrouting" "tf_dynamicrouting" {
# provider = citrixadc
# commandlines = local.bgp_file
commandlines = [
"ns route-install default",
"!",
"ns route-install bgp",
"!",
"bgp extended-asn-cap",
"!",
"ip prefix-list PL_DENY_DEFAULT_ROUTE seq 5 deny [0.0.0.0/0](http://0.0.0.0/0)",
"ip prefix-list PL_PERMIT_VIP_NET_ADV seq 5 permit [10.100.200.128/25](http://10.100.200.128/25)",
"!",
"route-map RM_BGP_ADVERTISE permit 10",
"match ip address prefix-list PL_PERMIT_VIP_NET_ADV",
"!",
"route-map RM_BGP_ADVERTISE deny 15",
"match ip address prefix-list PL_DENY_DEFAULT_ROUTE",
"!",
]
}
resource "citrixadc_routerdynamicrouting" "tf_dynamicrouting_1" {
# provider = citrixadc
# commandlines = local.bgp_file
commandlines = [
"router bgp 4205696395",
"max-paths ebgp 2",
"bgp graceful-restart",
"network [10.100.200.128/25](http://10.100.200.128/25)",
"redistribute kernel",
"neighbor 10.100.250.1 remote-as 4205016395",
"neighbor 10.100.250.1 fall-over bfd",
"neighbor 10.100.250.1 soft-reconfiguration inbound",
"neighbor 10.100.250.1 route-map RM_BGP_ADVERTISE out",
"neighbor 10.100.250.5 remote-as 4205016395",
"neighbor 10.100.250.5 fall-over bfd",
"neighbor 10.100.250.5 soft-reconfiguration inbound",
"neighbor 10.100.250.5 route-map RM_BGP_ADVERTISE out",
]
}
Terraform Core Version
1.9.1
citrixadc Provider Version
1.39.0
Operating system
Windows
Affected Resource(s)
citrixadc_routerdynamicrouting
Equivalent NetScaler CLI Command
ns route-install default ! ns route-install bgp ! bgp extended-asn-cap ! ip prefix-list PL_DENY_DEFAULT_ROUTE seq 5 deny 0.0.0.0/0 ip prefix-list PL_PERMIT_VIP_NET_ADV seq 5 permit 10.100.200.128/25 ! route-map RM_BGP_ADVERTISE permit 10 match ip address prefix-list PL_PERMIT_VIP_NET_ADV ! route-map RM_BGP_ADVERTISE deny 15 match ip address prefix-list PL_DENY_DEFAULT_ROUTE ! router bgp 4205696395 max-paths ebgp 2 bgp graceful-restart network 10.100.200.128/25 redistribute kernel neighbor 10.100.250.1 remote-as 4205016395 neighbor 10.100.250.1 fall-over bfd neighbor 10.100.250.1 soft-reconfiguration inbound neighbor 10.100.250.1 route-map RM_BGP_ADVERTISE out neighbor 10.100.250.5 remote-as 4205016395 neighbor 10.100.250.5 fall-over bfd neighbor 10.100.250.5 soft-reconfiguration inbound neighbor 10.100.250.5 route-map RM_BGP_ADVERTISE out ! end
Expected Behavior
The provider should install the bgp routes on the NetScaler appliance
Actual Behavior
The provider is presenting an error to execute because the configuration is longer than 711 characters
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
terraform apply -auto-approve
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response