You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using full variable names/paths for attaching a device template to a device, it is not possible to omit optional values.
In this example a BGP feature template has 2 optional ipv4_neighbors and only 1 of them gets configured with variables during device template attachment, and the following error message is received:
sdwan_attach_feature_device_template.TEST: Creating...
╷
│ Error: Client Error
│
│ with sdwan_attach_feature_device_template.TEST,
│ on test.tf line 72, in resource "sdwan_attach_feature_device_template" "TEST":
│ 72: resource "sdwan_attach_feature_device_template" "TEST" {
│
│ Failed to attach device template, got error: Action push_feature_template_configuration-8660bda5-4921-4911-b778-af308089ec35 for device
│ C8K-BC7066AD-2D0C-2344-E3E8-106432172654 failed. Activity log: ["[26-Nov-2023 12:10:00 UTC] Configuring device with feature template:
│ ANB-Test","[26-Nov-2023 12:10:00 UTC] Failed to update configuration - Error invalid value for: address in
│ /templates/template/vpn/vpn-instance/router/bgp/neighbor/address\n"]
It is possible to leave out the optional BGP neighbor when configuring the same device template attachment through the GUI.
To reproduce:
resource"sdwan_cisco_bgp_feature_template""TEST" {
name="Test-BGP"description="Test BGP template"device_types=["vedge-C8000V"]
as_number="65000"ipv4_neighbors=[
{
address_variable ="neighbor_0_address"
remote_as_variable ="neighbor_0_remote_as"
optional =true
},
{
address_variable ="neighbor_1_address"
remote_as_variable ="neighbor_1_remote_as"
optional =true
}
]
}
resource"sdwan_attach_feature_device_template""TEST" {
devices=[
{
id ="C8K-BC7066AD-2D0C-2344-E3E8-106432172654"
variables = {
"//system/host-name"="TF-Router3""//system/site-id"="12""//system/system-ip"="1.1.2.2""/0//router/bgp/neighbor/neighbor_0_address/address"="10.11.22.12""/0//router/bgp/neighbor/neighbor_0_address/remote-as"="65012"
}
},
]
id=sdwan_feature_device_template.TEST.id
}
resource"sdwan_feature_device_template""TEST" {
name="ANB-Test"description="Test template"device_type="vedge-C8000V"device_role="sdwan-edge"general_templates=[
{
id = data.sdwan_cisco_system_feature_template.default.id
type ="cisco_system"
sub_templates = [
{
id = data.sdwan_cisco_logging_feature_template.default.id
type ="cisco_logging"
}
]
},
{
id = data.sdwan_cisco_bfd_feature_template.default.id
type ="cisco_bfd"
},
{
id = data.sdwan_cisco_omp_feature_template.default.id
type ="cisco_omp"
},
{
id = data.sdwan_cisco_security_feature_template.default.id
type ="cisco_security"
},
{
id = data.sdwan_cedge_global_feature_template.default.id
type ="cedge_global"
},
{
type ="cisco_vpn"
id = data.sdwan_cisco_vpn_feature_template.default512.id
},
{
type ="cisco_vpn"
id = data.sdwan_cisco_vpn_feature_template.default0.id
sub_templates = [{
id = sdwan_cisco_bgp_feature_template.TEST.id
type ="cisco_bgp"
}]
}
]
}
data"sdwan_cisco_vpn_feature_template""default0" {
name="Default_AWS_TGW_CSR_VPN0_V01"
}
data"sdwan_cisco_vpn_feature_template""default512" {
name="Default_AWS_TGW_CSR_VPN512_V01"
}
data"sdwan_cisco_system_feature_template""default" {
name="Default_BootStrap_Cisco_System_Template"
}
data"sdwan_cedge_global_feature_template""default" {
name="Default_EQUINIX_C8000V_GLOBAL_CISCO_V01"
}
data"sdwan_cisco_logging_feature_template""default" {
name="Default_Logging_Cisco_V01"
}
data"sdwan_cisco_bfd_feature_template""default" {
name="Default_BFD_Cisco_V01"
}
data"sdwan_cisco_omp_feature_template""default" {
name="Default_AWS_TGW_CSR_OMP_IPv46_V01"
}
data"sdwan_cisco_security_feature_template""default" {
name="Default_Security_Cisco_V01"
}
Adding the second optional BGP neighbor variables allows the template to be configured successfully.
Apologies for the long delay, could you maybe provide the captured payload when attaching the device template via the GUI (with one optional variable being configured)?
When using full variable names/paths for attaching a device template to a device, it is not possible to omit optional values.
In this example a BGP feature template has 2 optional ipv4_neighbors and only 1 of them gets configured with variables during device template attachment, and the following error message is received:
It is possible to leave out the optional BGP neighbor when configuring the same device template attachment through the GUI.
To reproduce:
Adding the second optional BGP neighbor variables allows the template to be configured successfully.
The text was updated successfully, but these errors were encountered: