Skip to content

Commit

Permalink
adding support for floating svi secondary ip (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
robvand authored Dec 18, 2024
1 parent 78e8a0d commit 91884d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/terraform-aci-l3out-interface-profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ module "aci_l3out_interface_profile" {
| [aci_rest_managed.l3extIp](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
| [aci_rest_managed.l3extIp_A](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
| [aci_rest_managed.l3extIp_B](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
| [aci_rest_managed.l3extIp_float](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
| [aci_rest_managed.l3extLIfP](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
| [aci_rest_managed.l3extMember_A](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
| [aci_rest_managed.l3extMember_B](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource |
Expand Down
10 changes: 10 additions & 0 deletions modules/terraform-aci-l3out-interface-profile/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ locals {
node_id = int.node_id
pod_id = int.pod_id
scope = int.scope
ip_shared = int.ip_shared
}
} if int.floating_svi == true
])
Expand Down Expand Up @@ -371,6 +372,15 @@ resource "aci_rest_managed" "l3extRsDynPathAtt" {
}
}

resource "aci_rest_managed" "l3extIp_float" {
for_each = { for item in local.floating_interfaces : item.key => item.value if item.value.ip_shared != null }
dn = "${aci_rest_managed.l3extVirtualLIfP[each.value.floating_key].dn}/addr-[${each.value.ip_shared}]"
class_name = "l3extIp"
content = {
addr = each.value.ip_shared
}
}

resource "aci_rest_managed" "l3extVirtualLIfPLagPolAtt" {
for_each = { for item in local.floating_paths : item.key => item.value if item.value.elag != null }
dn = "${aci_rest_managed.l3extRsDynPathAtt[each.key].dn}/vlifplagpolatt"
Expand Down

0 comments on commit 91884d8

Please sign in to comment.