Closed edudppaz closed 2 weeks ago
I quickly tested it with this config and changing the IP of the subinterface, which worked for me..
resource "iosxr_interface" "main" {
interface_name = "GigabitEthernet0/0/0/3"
ipv4_address = "1.1.1.3"
ipv4_netmask = "255.255.255.0"
}
resource "iosxr_interface" "sub" {
interface_name = "GigabitEthernet0/0/0/3.200"
encapsulation_dot1q_vlan_id = 200
ipv4_address = "2.1.1.4"
ipv4_netmask = "255.255.255.0"
}
Could you maybe try the same and see if that works for you?
Hi @danischm im currently not configuring anything on the main interface, only touching the subinterface configuration. But i will try doing "something" on the main interface (a description, for example) and try again.
This seems to work when we also configured the physical interface and then the subinterface.
After the iosxr_interface has configured a subinterface, changing the ip address on the same interface throws an error:
Plan result:
Apply:
Manually using "taint" to destroy the resource before re-creating, or running a terraform destroy on that specific resource before a new plan/apply, correctly configures the new ip address (after removing the interface and re-applying).
This is a basic change that should be supported in the resource.