I use Terraform to create a virtual machine from a VyOS image using cloud-init for initial setup of the eth0 interface.
Then I continue configuring this virtual machine using your provider. One of the tasks is to modify the settings of this interface (add a description) and create a virtual interface.
I use Terraform to create a virtual machine from a VyOS image using cloud-init for initial setup of the eth0 interface.
Then I continue configuring this virtual machine using your provider. One of the tasks is to modify the settings of this interface (add a description) and create a virtual interface.
resource "vyos_config" "interface-servers" { count = var.config.zones.servers.count path = "interfaces ethernet ${var.config.zones.servers.interface}" value = jsonencode({ "description" = "SERVERS" }) lifecycle { create_before_destroy = true } }
resource "vyos_config" "interface-lan" { count = var.config.zones.lan.count
path = "interfaces ethernet ${var.config.zones.lan.interface}" value = jsonencode({ "vif" = { "100" = { "description" = "LAN" "address" = "${cidrhost(var.networks.lan, 1)}/30" } } }) lifecycle { create_before_destroy = true } }
However, an error occurs because this resource already exists. How can this problem be resolved?