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
It seems that when you change the VRF on an interface, the provider is smart enough to detect that the interface IP needs to be reapplied as NXOS removes the IP (stealthy). However, this does not seem to be the case with HSRP config. I request the same functionality for HSRP config so it persists after an interface VRF assignment change.
The text was updated successfully, but these errors were encountered:
In the example you mentioned, after modifying the VRF name, Terraform is smart enough to re-create the IP address resource (nxos_ipv4_interface_address) because the vrf attribute is marked internally as RequiresReplace().
Unfortunately, the same approach cannot be taken for the HSRP resources, as those resources do not have any relationship with the VRF objects inside the DME tree. However, you could leverage the attribute replace_triggered_by inside the meta-argument lifecycle, which as the name implies forces a resource to be re-created if a specific attribute of another resource changes. Here is a basic example:
resource"nxos_rest""hsrpIf" {
dn="${nxos_rest.hsrpInst.id}/if-[eth1/11]"class_name="hsrpIf"content={
id ="eth1/11"
version ="v2"
}
lifecycle {
replace_triggered_by=[
nxos_ipv4_interface_address.example.id
]
}
}
It seems that when you change the VRF on an interface, the provider is smart enough to detect that the interface IP needs to be reapplied as NXOS removes the IP (stealthy). However, this does not seem to be the case with HSRP config. I request the same functionality for HSRP config so it persists after an interface VRF assignment change.
The text was updated successfully, but these errors were encountered: