-
Notifications
You must be signed in to change notification settings - Fork 9
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
Question: Help for configuring mutually exclusive elements in a data source #242
Comments
I would say having both attributes set to
|
Thanks for your support Daniel,
Version 0.5.0 with the following patch 8cb79b6
Please note that I later noticed that some This patch is NOT included in the troubleshooting logs below. And although I think it's unrelated, it's worth mentioning, since it also configures Using Cisco IOS-XR Version 7.11.1 on CML.
https://gist.github.com/shebang42/85a3fb03d1836fc487690edf8e719676 |
Update: I assumed that I introduced this behaviour with the Also noticed similar behaviour, where the TF data-source seems to 'hallucinate' configuration. Will create an issue for this shortly. |
Is there anything now that is not working as expected? |
I think this is still an issue, but be no longer relevant to us. Feel free to close this. |
Hello,
I have added /router/bgp/as/vrfs/vrf/neighbors/neighbor/use/neighbor-group . See main...shebang42:terraform-provider-iosxr:feature/router-bgp-wip#diff-8b07de0d9611ac267890e0f303cb77e3cc0bb818f062500377db9d5f74623fef
This introduces an issue where
neighbors/local_as_dual_as
andneighbors/local_as_replace_as
appear to be mutually exclusive withneighbors/use_neighbor_group
in the configuration. However, I retrieve all of them in the data source. When configuring a new resource with the data from the data source, this results in an "Invalid configuration item." error.So: I want the "local_as_dual_as" and "local_as_replace_as" from the data source to return "null" and not some boolean value when "use_neighbor_group" has a value. Is this possible, or is this a restriction of the YANG model?
Details:
Workflow:
Retrieve config
iosxr_router_bgp_vrf
data sourceConfigure device
iosxr_router_bgp_vrf
resource.This results in a "BGP' detected the 'warning' condition 'Invalid configuration item." error.
Cisco configuration
Note that this configuration contains a
use neighbor-group
.RP/0/RP0/CPU0:xr9kv-0#sh run router bgp 65002 vrf Azure_small
router bgp 65002
vrf Azure_small
address-family ipv4 unicast
<..>
!
neighbor 10.
use neighbor-group Azure-group
bfd fast-detect
address-family ipv4 unicast
route-policy rAzure-out(50) out
!
Retrieve data
Output of
terraform apply
Note that this output contains
use_neighbor_group
, as well aslocal_as_dual_as
andlocal_as_replace_as
Configure device:
However, when
local_as_dual_as
andlocal_as_replace_as
are removed from the yaml file, the configuration is oke:So, to summarize: I want the "local_as_dual_as" and "local_as_replace_as" from the data source to return "null" and not some boolean value when "use_neighbor_group" has a value.
Do you have any suggestions how to fix this? Do I overlook something?
I would be able to fix this in the TF code with a local variable. Something like below, but this would be a workaround for a limitation in the provider, so this is not the preferred solution.
The text was updated successfully, but these errors were encountered: