Closed seth1972 closed 1 year ago
In the picture can you see a apic gui hardcopy about which settings I´m talking about
@seth1972 There is a resource called aci_l3out_path_attachment_secondary_ip in the ACI provider which is used to configure secondary IP addresses. The resource aci_l3out_vpc_member needs to be passed as a reference to the attribute: _l3out_path_attachment_dn_ in the resource aci_l3out_path_attachment_secondary_ip I suggest using the following example in your configuration to attach the IP addresses.
#Create SVI Interface for Node 1 and Node 2
resource "aci_l3out_path_attachment" "node1_2_ipv4" {
logical_interface_profile_dn = aci_logical_interface_profile.logical_interface_profile_node1_2_ipv4.id
target_dn = "topology/pod-${var.pod_id_1}/protpaths-${var.node1}-${var.node2}/pathep-[LPG_Content_${var.contentname1}]"
if_inst_t = "ext-svi"
encap = var.vlan_id
mode = "regular"
}
resource "aci_l3out_vpc_member" "vpc_node_1_2_a_ipv4" {
leaf_port_dn = aci_l3out_path_attachment.node1_2_ipv4.id
side = "A"
addr = var.svinode1ipv4
ipv6_dad = "enabled"
}
resource "aci_l3out_vpc_member" "vpc_node_1_2_b_ipv4" {
leaf_port_dn = aci_l3out_path_attachment.node1_2_ipv4.id
side = "B"
addr = var.svinode2ipv4
ipv6_dad = "enabled"
}
resource "aci_l3out_path_attachment_secondary_ip" "secondary_ip_addr_A" {
l3out_path_attachment_dn = aci_l3out_vpc_member.vpc_node_1_2_a_ipv4.id
addr = "Your secondary IP address A"
ipv6_dad = "enabled"
}
resource "aci_l3out_path_attachment_secondary_ip" "secondary_ip_addr_B" {
l3out_path_attachment_dn = aci_l3out_vpc_member.vpc_node_1_2_b_ipv4.id
addr = "Your secondary IP address B"
ipv6_dad = "enabled"
}
Please give it a try and let me know if you have any questions.
@seth1972 Please let us know if the suggested configuration worked for you or if you have other questions.
Hi today I had time to test the new resource. For my use case it does not work. If you create a logical interface profile inside of ACI you can define if you want to work with a router interface or sub-router interface or SVI interface. In my case i want to work with a SVI.
Inside of the resource "aci_l3out_path_attachment_secondary_ip" you can not define which interface type you are using. The resource map in my case, the secondary ip not to the svi interface.
I will upload tomorrow a few picture where you can see the details
Kind regards
Stefan
resource "aci_l3out_path_attachment_secondary_ip" "node1_2_ipv4" { l3out_path_attachment_dn = aci_l3out_path_attachment.node1_2_ipv4.id addr = var.svinodesecondaryipv4 }
The resource will add the secondary ip not to the SVI interface.
Please let me know when you will need more feedback
@seth1972 Let me look into it
@seth1972 If you provide a reference in the resource "aci_l3out_path_attachment_secondary_ip" to the resource "aci_l3out_path_attachment" which has the attribute if_inst_t = "ext-svi", then the secondary IP address will be automatically configured in the SVI.
In the example below I am setting l3out_path_attachment_dn with a reference _aci_l3out_pathattachment.path.id which is referring to the resource aci_l3out_path_attachment.path which has if_inst_t set to ext-svi.
resource "aci_tenant" "tenant" {
name = "tf_tenant_l3out"
}
resource "aci_l3_outside" "l3" {
tenant_dn = aci_tenant.tenant.id
name = "demo_l3out"
}
resource "aci_logical_node_profile" "node_profile" {
l3_outside_dn = aci_l3_outside.l3.id
name = "demo_node"
}
resource "aci_logical_interface_profile" "interface_profile" {
logical_node_profile_dn = aci_logical_node_profile.node_profile.id
name = "demo_int_prof"
}
resource "aci_l3out_path_attachment" "path" {
logical_interface_profile_dn = aci_logical_interface_profile.interface_profile.id
target_dn = "topology/pod-1/paths-101/pathep-[eth1/1]"
if_inst_t = "ext-svi"
addr = "0.0.0.0"
annotation = "example"
autostate = "disabled"
encap = "vlan-1"
encap_scope = "ctx"
ipv6_dad = "disabled"
ll_addr = "::"
mac = "0F:0F:0F:0F:FF:FF"
mode = "native"
mtu = "inherit"
target_dscp = "AF11"
}
resource "aci_l3out_path_attachment_secondary_ip" "secondary" {
l3out_path_attachment_dn = aci_l3out_path_attachment.path.id
addr = "10.0.0.1/24"
annotation = "example"
ipv6_dad = "disabled"
name_alias = "example"
}
Please give it a try and let me know if it worked.
@seth1972 Did you get a chance to try the example I posted above?
Closing this issue as we have provided an example of a solution and did not hear back. Please re-open an issue if you still need help.
Community Note
Description
Hello Team, I´m using the ressource aci_l3out_vpc_member to configure the layer3 out inside of ACI With the aci.provider version 2.5.2 it is not possible to configure a SVI secondary additional address for Ipv4 and IPv6. (for vpc members)
To make it possible to configure the secondary ip I used at the noment the "rest" ressource. It would be great if you could add this functionality to the ressource aci_l3out_vpc_member to make it possible to handle that in future in a easier way.
Below can you see how I handle it in the moment with the rest resource.
Here can you see the part where I confiugre the secondary ip address for side a / b
New or Affected Resource(s) + ACI Class(es):
aci_l3out_vpc_member
APIC version and APIC Platform
4.2.5(n) 5.2.3(g) 5.2.6(e)
Potential Terraform Configuration
References
0000