Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aci_tenants.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ locals {
preference = try(sr.preference, local.defaults.apic.tenants.l3outs.node_profiles.nodes.static_routes.preference)
bfd = try(sr.bfd, local.defaults.apic.tenants.l3outs.node_profiles.nodes.static_routes.bfd)
track_list = try("${sr.track_list}${local.defaults.apic.tenants.policies.track_lists.name_suffix}", null)
next_hops = [for nh in try(sr.next_hops, []) : {
next_hops = [for nh in length(try(sr.next_hops, [])) > 0 ? try(sr.next_hops, []) : [{ ip = "0.0.0.0/0", type = "none", description = null, preference = 0, ip_sla_policy = null, track_list = null }] : {
ip = nh.ip
description = try(nh.description, "")
preference = try(nh.preference, local.defaults.apic.tenants.l3outs.node_profiles.nodes.static_routes.next_hops.preference)
Expand Down Expand Up @@ -1129,7 +1129,7 @@ locals {
preference = try(sr.preference, local.defaults.apic.tenants.l3outs.nodes.static_routes.preference)
bfd = try(sr.bfd, local.defaults.apic.tenants.l3outs.node_profiles.nodes.static_routes.bfd)
track_list = try("${sr.track_list}${local.defaults.apic.tenants.policies.track_lists.name_suffix}", null)
next_hops = [for nh in try(sr.next_hops, []) : {
next_hops = [for nh in length(try(sr.next_hops, [])) > 0 ? try(sr.next_hops, []) : [{ ip = "0.0.0.0/0", type = "none", description = null, preference = 0, ip_sla_policy = null, track_list = null }] : {
ip = nh.ip
description = try(nh.description, "")
preference = try(nh.preference, local.defaults.apic.tenants.l3outs.nodes.static_routes.next_hops.preference)
Expand Down
22 changes: 16 additions & 6 deletions modules/terraform-aci-l3out-node-profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,31 @@ module "aci_l3out_node_profile" {
description = "Default Route"
preference = 10
bfd = true
next_hops = [{
ip = "3.3.3.3"
description = "Next Hop Description"
preference = 10
type = "prefix"
track_list = "TRACK_LIST1"
next_hops = [
{
ip = "3.3.3.3"
description = "Next Hop Description"
preference = 10
type = "prefix"
track_list = "TRACK_LIST1"
},
{
ip = "5.5.5.5"
description = "Next Hop Description"
preference = 10
type = "prefix"
ip_sla_policy = "IP_SLA_POLICY1"
track_list = "TRACK_LIST1"
}
]
},
{
prefix = "192.168.1.1/32"
next_hops = [{
ip = "0.0.0.0/0"
preference = 0
type = "none"
}]
}]
}]
bgp_peers = [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,31 @@ module "aci_l3out_node_profile" {
description = "Default Route"
preference = 10
bfd = true
next_hops = [{
ip = "3.3.3.3"
description = "Next Hop Description"
preference = 10
type = "prefix"
track_list = "TRACK_LIST1"
next_hops = [
{
ip = "3.3.3.3"
description = "Next Hop Description"
preference = 10
type = "prefix"
track_list = "TRACK_LIST1"
},
{
ip = "5.5.5.5"
description = "Next Hop Description"
preference = 10
type = "prefix"
ip_sla_policy = "IP_SLA_POLICY1"
track_list = "TRACK_LIST1"
}
]
},
{
prefix = "192.168.1.1/32"
next_hops = [{
ip = "0.0.0.0/0"
preference = 0
type = "none"
}]
}]
}]
bgp_peers = [{
Expand Down
24 changes: 17 additions & 7 deletions modules/terraform-aci-l3out-node-profile/examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,31 @@ module "aci_l3out_node_profile" {
description = "Default Route"
preference = 10
bfd = true
next_hops = [{
ip = "3.3.3.3"
description = "Next Hop Description"
preference = 10
type = "prefix"
track_list = "TRACK_LIST1"
next_hops = [
{
ip = "3.3.3.3"
description = "Next Hop Description"
preference = 10
type = "prefix"
track_list = "TRACK_LIST1"
},
{
ip = "5.5.5.5"
description = "Next Hop Description"
preference = 10
type = "prefix"
ip_sla_policy = "IP_SLA_POLICY1"
track_list = "TRACK_LIST1"
}
]
},
{
prefix = "192.168.1.1/32"
next_hops = [{
ip = "0.0.0.0/0"
preference = 0
type = "none"
}]
}]
}]
bgp_peers = [{
Expand Down Expand Up @@ -65,4 +75,4 @@ module "aci_l3out_node_profile" {
export_route_control = "ERC"
import_route_control = "IRC"
}]
}
}